The moose likes JSF and the fly likes Rich:comboBox Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Java » JSF
Reply Bookmark "Rich:comboBox" Watch "Rich:comboBox" New topic
Author

Rich:comboBox

Jordan Smith
Ranch Hand

Joined: Apr 06, 2008
Posts: 89
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
Posts: 317
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
Posts: 43
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
Posts: 89
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
Posts: 317
Just put the code in getCustomerServices() to getServicesNames().
 
 
subject: Rich:comboBox
 
developer file tools

cast iron skillet 49er

more from paul wheaton's glorious empire of web junk: cast iron skillet diatomaceous earth rocket mass heater sepp holzer raised garden beds raising chickens lawn care CFL flea control missoula heat permaculture