File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

<h:selectManyListbox giving problem while submitting.

 
kiran_kumar
Greenhorn
Posts: 18
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

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.
</h:selectManyListbox>

<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.
</h:selectManyListbox>

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');
}

-Kiran
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic