Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

getting label of selectonemenu by findcomponent

 
ihsan kocak
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi, i should access a selectonemenu's selected item's label, i can get value but what about label?
Regards.
 
Brendan Healey
Ranch Hand
Posts: 218
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think this will do it:

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

Regards,
Brendan.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic