• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Junilu Lacar
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Ganesh Patekar
  • Tim Moores
  • Pete Letkeman
  • Stephan van Hulst
Bartenders:
  • Carey Brown
  • Tim Holloway
  • Joe Ess

<h:selectOneListbox with dynamic values submit error  RSS feed

 
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a <h:selectOneListbox that is populated with SelectItems stored in a session variable array. A user can also add or remove values to the list from the JSP.

If the values never change, everything works fine. The problem is when a user adds or removes values from the listBox and submits the form I get errors.
(ERROR example " "msqPseudoCityListBox": " Conversion Error setting value 'TEST1' for 'null Converter'. )

Any ideas on what is causing this?

thanks

<h:selectOneListbox styleClass="selectOneListbox" id="msqPseudoCityListBox" value="#{pc_ActionQueueContent.sessionContainer.testing}"
style="width: 90px" size="2" valueChangeListener="#{pc_ActionQueueContent.handleMsqPseudoCityListBoxValueChange}" onchange="return func_1(this, event);">
<f:selectItems value="#{pc_ActionQueueContent.sessionContainer.msqList}" />
</h:selectOneListbox>
 
Ranch Hand
Posts: 89
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Dan,

Am facing similar issue. Was able to find any solution for this?

Thanks,
Kapil
 
Ranch Hand
Posts: 2458
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You may find this article useful then: http://balusc.blogspot.com/2007/09/objects-in-hselectonemenu.html
 
kapil Gupta
Ranch Hand
Posts: 89
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I was able to implement a dynamic combo with the help of this blog.
JSF SelectBox

Hope this will help you. The key here is that your managed bean should be in session scope. Other ways to implement this is also discussed in this blog
 
Bauke Scholtz
Ranch Hand
Posts: 2458
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You're welcome.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!