Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

ListBox Selection  RSS feed

 
Jubri Siji
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have added a list Box to my application and it is binded to a datasource
it is defined as
*************************************************************************
<h:selectOneListbox binding="#{Page1.listbox1}" id="listbox1" size="5" style="height: 48px; left: 384px; top: 240px; position: absolute; width: 168px">
<f:selectItems binding="#{Page1.listbox1SelectItems}" id="listbox1SelectItems" value="#{Page1.customer_tblRowSet.selectItems['NAME,NAME']}"/>
</h:selectOneListbox>
*************************************************************************
i am trying to print the selected value using a textfield the code is as follows

$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
textField2.setValue(listbox1.???);

$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
please does any one know what ??? should be in order words what method returns the selected Value
 
Mike London
Ranch Hand
Posts: 1340
8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
To print (get) the selected value, check out the selectOne and SelectMany tags which have the value attributes fro the selected items.

Hope this helps.

-- Mike
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!