wood burning stoves 2.0*
The moose likes JSF and the fly likes getting label of selectonemenu by findcomponent Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "getting label of selectonemenu by findcomponent" Watch "getting label of selectonemenu by findcomponent" New topic
Author

getting label of selectonemenu by findcomponent

ihsan kocak
Ranch Hand

Joined: Mar 14, 2012
Posts: 31
hi, i should access a selectonemenu's selected item's label, i can get value but what about label?
Regards.
Brendan Healey
Ranch Hand

Joined: May 12, 2009
Posts: 218
I think this will do it:

UIComponent comp;
comp = ... findComponent ...
String label = (String) comp.getAttributes().get("label");

Regards,
Brendan.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: getting label of selectonemenu by findcomponent
 
Similar Threads
SWT - Wrap label
WA #1.....word association
Label/Component/Listener
Label/Component/Listener
Reading value of Label