Thanks Eric for posting your solution, this helped me remember that unusual
OGNL syntax on the value attribute.

Because I have not found so many working examples out there, I'll post mine
too:

    <s:select
       label="%{getText('caseFile.sentence')}" 
       name="caseFile.sentences.qualifierId"
       value="caseFile.sentences.{qualifierId}"
       list="availableQualifiers" 
       listKey="qualifierId" 
       listValue="display" 
       emptyOption="false"
       multiple="true"
       theme="css_xhtml" 
       required="false" 
       cssClass="text medium" 
       cssStyle="width:300px" />

CaseFile contains List<Qualifier> called 'sentences'.  
Qualifier looks like
    private Long qualifierId;
    private String code;
    private String description;
    // Transients
    private String display;  // Just transiently defined as code + " - " +
description


Thanks -


Stanley, Eric wrote:
> 
> Figured it out in case anyone has this same issue. Added a value
> attribute, and used OGNL to grab a list of id's from List<Group> instead
> of just the List<Group> which works just fine in a select where
> multiple="true".
> 
> <s:select label="group" multiple="true" size="4" name="user.groups"
>               value="user.groups.{id}" list='groupList' listKey="id"
>               listValue="name" />
> 
> -Good luck 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Multiple-select-tp22564208p25803112.html
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org

Reply via email to