• Post Reply Bookmark Topic Watch Topic
  • New Topic

<h:selectOneListbox with dynamic values submit error

 
Dan MacLeod
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>
 
kapil Gupta
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
 
Bauke Scholtz
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.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!