Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

<h:selectManyListbox giving problem while submitting.  RSS feed

Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I am using <h:selectManyListbox control. I have list of names. On click on a button i am passing the selected contacts to another selectmanylistbox using javascript.

when I submit i am getting below error.

sourceId=emailTemplate_1:emailTemplateForm:toList[severity=(ERROR 2), summary=(emailTemplate_1:emailTemplateForm:toList: Validation Error: Value is not valid), detail=(emailTemplate_1:emailTemplateForm:toList: Validation Error: Value is not valid)]

here is the code snippet:

<h:selectManyListbox id="contactRoleList" size="10" value="#{emailTemplateBean.rolesList1}" style="width:200px">
<f:selectItems value="#{emailTemplateBean.list11}" /> - > getting data from backing bean.

<button type="button" name="addTO" value="Add to Send List" onclick="javascript:processChange(this)">Add to Send List</button>

<h:selectManyListbox id="toList" size="6" value="#{emailTemplateBean.rolesList2}" style="width:200px">
<f:selectItems value="#{emailTemplateBean.list22}" /> - > list22 initialized at backing bean. - this will be having the data from first list box.

on submit i am getting above mentioned error.

can you please help me in this.. i struckup here...

here is the javascript code.

if($("#emailTemplate_1\\:emailTemplateForm\\:contactRoleList option:selected").length>0)
$("#emailTemplate_1\\:emailTemplateForm\\:contactRoleList option:selected").appendTo('#emailTemplate_1\\:emailTemplateForm\\:toList');

  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!