• Post Reply Bookmark Topic Watch Topic
  • New Topic

Getting validation error in jsf1.2 for h:selectManyListbox  RSS feed

garlapati kumar
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
when i try to select multilist box and click on submit ,displaying an error sourceId=assignRoleForm:list2[severity=(ERROR 2), summary=(assignRoleForm:list2: Validation Error: Value is not valid), detail=(assignRoleForm:list2: Validation Error: Value is not valid)]

my .xhtml code as follows


<h:selectManyListbox style="width: 210px;" id="list2" size="10"
value ="#{userRoleMappingManager.selAssgnedRoleList}">
<f:selectItems value="#{userRoleMappingManager.assignedRoleList}" />

<td> <a4j:commandButton
styleClass="cmdButton ui-button ui-widget ui-state-default ui-corner-all"
id="assignRoleMngerBtn2" value="Assign"
onclick="showBusyMask('Searching Role ...');"
oncomplete="jQuery('#tabs-2 :button').button();hideBusyMask();"
reRender="resultMsg,assignRoleForm ">

And my java class

public class UserRoleMappingManager {

private static final Logger LOG = Logger.getLogger(UserRoleMappingManager.class);

private RoleMappingDao roleMappingDao;
private List<SelectItem> availableRoleList = new ArrayList<SelectItem>();
private List<SelectItem> assignedRoleList = new ArrayList<SelectItem> (); // with setters and getters
private List<String> selectedRoleList ;
private List<String> selAssgnedRoleList;

i passing and retreving the string as key for mulilist box but still i face the error,Can any provide help
Tim Holloway
Posts: 18777
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the JavaRanch, Garlapati!

There is a "Code" button in our message editor. You can use it to make your Java code and XML samples easier to read.

The usual cause of a validation error in a JSF selection control is that the value isn't being found in the selection list. One common cause for that is if you use Request Scope for the JSF backing bean that contains the selection list model data.

Request scope is almost totally useless in JSF.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!