struts-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David H. DeWolf (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (WW-1557) multiple="true" does not work in s:select tag
Date Wed, 03 Jan 2007 02:59:16 GMT

     [ https://issues.apache.org/struts/browse/WW-1557?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

David H. DeWolf resolved WW-1557.
---------------------------------

    Resolution: Cannot Reproduce

I've successfully used these parameters to put an example in the showcase app.  Check out:

http://localhost:8080/tags/ui/lotsOfOptiontransferselect!input.action

and 

    <s:select label="Favourite Cities"
        list="availableCities"
        name="favouriteCities"
        value="%{defaultFavouriteCities}"
        multiple="true" size="4"/>

Make sure that the value list include the *KEYS* of the values, not the entities in the list.

> multiple="true" does not work in s:select tag
> ---------------------------------------------
>
>                 Key: WW-1557
>                 URL: https://issues.apache.org/struts/browse/WW-1557
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Views
>    Affects Versions: 2.0.1
>            Reporter: Dale Newfield
>         Assigned To: David H. DeWolf
>             Fix For: 2.0.3
>
>
> The comments in the code for the multiple attribute in the SelectTag states:
> "Creates a multiple select. The tag will pre-select multiple values if the values are
passed as an Array (of appropriate types) via the value attribute. Passing a Collection may
work too? Haven't tested this."
> I have tried to use this both with a Collection, an Array, and a single value, and as
far as I can tell none work.  It does generate a select with the multiple attribute set, but
I cannot figure out how to get any of the options to be marked as selected.
> In the following tag I have tried value="%{event.communities}" value="%{event.communities.toArray()}"
value="%{event.communities[0]}" and many other variants, with no success.  I have displayed
the content of event.communities (and lots of other variations) using s:property tags, so
I know that the values are there...
> <s:select label="%{getText('event.communities')}"
>   name="eventCommunityShortNames"
>   multiple="true"
>   value="%{event.communities}"
>   list="%{user.canCreateEventsForCommunities}"
>   listKey="shortName"
>   listValue="fullName"
>   size="4"/>

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/struts/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message