Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Rich:comboBox  RSS feed

 
Jordan Smith
Ranch Hand
Posts: 89
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 317
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Check if you have a getter for servicesNames. If so, then you should have called getCustomerServices() from your getter.
 
Sumeet Singh Aryan
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Jordan Smith
Ranch Hand
Posts: 89
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 317
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just put the code in getCustomerServices() to getServicesNames().
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!