Forums Register Login

ListBox Selection

+Pie Number of slices to send: Send
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
+Pie Number of slices to send: Send
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
Normally trees don't drive trucks. Does this tiny ad have a license?
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 2055 times.
Similar Threads
"bind" property
h:selectOneListbox - causing navigation to fail
Strange validation error
2 - Questions regarding <h:selectOneListbox...>
how to over come conversion error
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 20:01:53.