Author
Rich:comboBox
Jordan Smith
Ranch Hand
Joined: Apr 06, 2008
Messages: 88
posted Feb 09, 2010 07:47:32
Hi!
I wrote the following code:
my bean is:
the data in servicesNames is full with service names.
But on the screen it doesn't display any value when clicking on the arrow neither when starting to type the first letter.
What is the problem?
Sridhar Santhanakrishnan
Ranch Hand
Joined: Mar 20, 2007
Messages: 167
posted Feb 09, 2010 09:03:36
Check if you have a getter for servicesNames. If so, then you should have called getCustomerServices() from your getter.
Sumeet Singh Aryan
Ranch Hand
Joined: Jul 30, 2008
Messages: 31
posted Feb 09, 2010 23:06:02
try the following code in your JSF
<f:selectItems value="#{fileUploadBean.customerServices}" />
you are using servicesNames instead of customerServices.... this is the problem.. try to use the name of getter not the list
The woods are lovely, dark and deep, But I have promises to keep; And miles to go before I sleep, And miles to go before I sleep. - Robert Frost
Jordan Smith
Ranch Hand
Joined: Apr 06, 2008
Messages: 88
posted Feb 10, 2010 00:17:26
Hi
I fixed the code to this:
and the bean:
The function is being filled in the constructor.
Then i have getter and setter for servicesNames.
What is the problem?
Sridhar Santhanakrishnan
Ranch Hand
Joined: Mar 20, 2007
Messages: 167
posted Feb 10, 2010 07:35:34
Just put the code in getCustomerServices() to getServicesNames().