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

Don Brown resolved WW-1519.
---------------------------

       Resolution: Fixed
    Fix Version/s:     (was: 2.0.8)
         Assignee: Don Brown

>From what I can tell, this has already been fixed.  I added the unit test 
>SelectTag.testEnumList and it seems to work just fine. Please reopen with a 
>patch if the test doesn't properly replicate it.

> 'select' tag cannot bind jdk5.0 enum type
> -----------------------------------------
>
>                 Key: WW-1519
>                 URL: https://issues.apache.org/struts/browse/WW-1519
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Views
>    Affects Versions: 2.0.1
>         Environment: null
>            Reporter: zhouyanming
>         Assigned To: Don Brown
>            Priority: Minor
>
> public enum Status {
>       INIT("init"), COMPLETED("completed");
>         private String displayName;
>         Status(String displayName){
>                 this.displayName=displayName;
>         }
>         public String getName(){
>                 return name();
>         }
>          public String getDisplayName(){
>                 return displayName;
>         }
> }
> public class TestAction extends ActionSupport {
>       private Status stauts = Status.COMPLETED;
>       public List<Status> getStatusList() {
>               return Arrays.asList(Status.values());
>       }
>       public String input() {
>               return INPUT;
>       }
> }
> <s:select label="%{getText('status')}" name="status" list="statusList" 
> listKey="name" listValue="displayName" />
> this tag doesn't bind value  'COMPLETED',the problem can resolved by modify 
> the template file of select tag.
> in file template/simple/select.ftl line 32 and line 53,change 
> 'parameters.nameValue'  to 'parameters.nameValue?if_exists?string',It works 
> fine now,I think this problem also existed in webwork2

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to