Re: how to submit a collection via ww:select ?

tm_jee <[email protected]>
Newsgroups gmane.comp.java.open-symphony.webwork
Message-ID <18267430.1149006563063.JavaMail.os-j2ee@opensymphony01.managed.contegix.com>
try 

[code]
<ww:select 
    label="available" 
    name="allroles" 
    list="#SysInfo.sysroledefs" 
    listKey="roleid" 
    listValue="rolename" size="3"
    ondblclick="addto(roles,this,this.selectedIndex)"/>
<ww:select 
    label="assigned" 
    name="assignedRoles" 
    list="roles" size="3"/>
[/code]

with the action class
[code]
  public class MyAction extends ActionSupport {
       public List getAllRoles() { ... }
       public void setAllRoles(List allRoles) { ... }

       public List getAssignedRoles() { ... }
       public void setAssignedRoles(List assignedRoles) { ... }
  }
[/code]

assuming 
- #SysInfo.sysroledefs returns a Collection with each of its element having getter/setter for roleid and rolename.
- roles returns a Map.

It should work. There's a an example in showcase that you might want to have a look.
---------------------------------------------------------------------
Posted via Jive Forums
http://forums.opensymphony.com/thread.jspa?threadID=32758&messageID=63603#63603

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.