I`m trying to do following:

  |             <div class="entry">
  |                     <span class="errors">
  |                             <h:message for="roles"/>
  |                     </span>
  |                     <div class="label">
  |                             <h:outputLabel for="roles" value="Õigused"/>
  |                     </div>
  |                     <div class="input">
  |                             <h:selectManyCheckbox id="roles" 
value="#{user.roles}" 
  |                                     layout="pageDirection">
  |                                     <f:selectItems value="#{rolesMap}"/>
  |                             </h:selectManyCheckbox>
  |                     </div>
  |             </div>
  | In bean:
  | @Out
  |     private Map<String,Role> rolesMap = new HashMap<String,Role>();
  | 
  |     @Factory("rolesMap")
  |     @Begin(join=true)
  |     public void init() {
  | 
  |             List<Role>      roles = 
  |             em.createQuery("from Role msg order by msg.rolename 
desc").getResultList();
  | 
  |             Iterator<Role> it = roles.iterator();
  |             while (it.hasNext()) {
  |                     Role r = it.next();
  |                     rolesMap.put(r.getRolename(),r);
  |             }
  |     }
  | 

If I try to submit this form then it gives this error: "roles": Value is not a 
valid option.

Never used this component before, what am I doing wrong? This is JSF question, 
I know, but I thought that it should work and maybe seam is stepping in?

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3936083#3936083

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3936083


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642
_______________________________________________
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to