You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Jasper Rosenberg (JIRA)" <ji...@apache.org> on 2007/07/18 14:54:12 UTC

[jira] Created: (WW-2045) Can no longer select null in radiomap

Can no longer select null in radiomap
-------------------------------------

                 Key: WW-2045
                 URL: https://issues.apache.org/struts/browse/WW-2045
             Project: Struts 2
          Issue Type: Bug
          Components: Views
    Affects Versions: 2.0.8
         Environment: freemarker
            Reporter: Jasper Rosenberg


In my action, have setter getter for myMap property:

private Map<String, String> myMap = new HashMap<String, String>();

<@s.radio name="myMap['name']" list='#@java.util.HashMap@{"Opt.":"Opt.", "Std.":"Std.", "":"N/A"}' theme="simple"/>

In struts 2.0.6, if "name" had no value in the map, then "N/A" would be selected.

In struts 2.0.8, if "name" has no value in the map, then no option is selected.

I have tried variations on the list such as '#@java.util.HashMap@{"Opt.":"Opt.", "Std.":"Std.", null:"N/A"}' to work around this issue without luck.

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


[jira] Updated: (WW-2045) Can no longer select null in radiomap

Posted by "James Holmes (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/struts/browse/WW-2045?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

James Holmes updated WW-2045:
-----------------------------

    Fix Version/s:     (was: Future)
                   2.0.11

> Can no longer select null in radiomap
> -------------------------------------
>
>                 Key: WW-2045
>                 URL: https://issues.apache.org/struts/browse/WW-2045
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Views
>    Affects Versions: 2.0.8
>         Environment: freemarker
>            Reporter: Jasper Rosenberg
>             Fix For: 2.0.11
>
>
> In my action, have setter getter for myMap property:
> private Map<String, String> myMap = new HashMap<String, String>();
> <@s.radio name="myMap['name']" list='#@java.util.HashMap@{"Opt.":"Opt.", "Std.":"Std.", "":"N/A"}' theme="simple"/>
> In struts 2.0.6, if "name" had no value in the map, then "N/A" would be selected.
> In struts 2.0.8, if "name" has no value in the map, then no option is selected.
> I have tried variations on the list such as '#@java.util.HashMap@{"Opt.":"Opt.", "Std.":"Std.", null:"N/A"}' to work around this issue without luck.

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


[jira] Updated: (WW-2045) Can no longer select null in radiomap

Posted by "Ted Husted (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/struts/browse/WW-2045?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ted Husted updated WW-2045:
---------------------------

    Fix Version/s: Future

Setting Fix Version to "future" for issues without a set fix version. 


> Can no longer select null in radiomap
> -------------------------------------
>
>                 Key: WW-2045
>                 URL: https://issues.apache.org/struts/browse/WW-2045
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Views
>    Affects Versions: 2.0.8
>         Environment: freemarker
>            Reporter: Jasper Rosenberg
>             Fix For: Future
>
>
> In my action, have setter getter for myMap property:
> private Map<String, String> myMap = new HashMap<String, String>();
> <@s.radio name="myMap['name']" list='#@java.util.HashMap@{"Opt.":"Opt.", "Std.":"Std.", "":"N/A"}' theme="simple"/>
> In struts 2.0.6, if "name" had no value in the map, then "N/A" would be selected.
> In struts 2.0.8, if "name" has no value in the map, then no option is selected.
> I have tried variations on the list such as '#@java.util.HashMap@{"Opt.":"Opt.", "Std.":"Std.", null:"N/A"}' to work around this issue without luck.

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


[jira] Commented: (WW-2045) Can no longer select null in radiomap

Posted by "Aymeric Levaux (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/struts/browse/WW-2045?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_42407 ] 

Aymeric Levaux commented on WW-2045:
------------------------------------

Ok this fixes the rendering of the radio map. 
But I still get a conversion error on form submit when the selected value is "" (to get a null) .
This is due to the method convertFromString in com.opensymphony.xwork2.util.EnumTypeConverter that does not check for empty string before calling Enum.valueOf. 

Simply adding 

if(value == null || "".equals(value)){
  return null;
}

makes it for me. I didn't checked this thoroughly so it might requires more investigations.

> Can no longer select null in radiomap
> -------------------------------------
>
>                 Key: WW-2045
>                 URL: https://issues.apache.org/struts/browse/WW-2045
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Views
>    Affects Versions: 2.0.8
>         Environment: freemarker
>            Reporter: Jasper Rosenberg
>            Assignee: Don Brown
>             Fix For: 2.0.10
>
>
> In my action, have setter getter for myMap property:
> private Map<String, String> myMap = new HashMap<String, String>();
> <@s.radio name="myMap['name']" list='#@java.util.HashMap@{"Opt.":"Opt.", "Std.":"Std.", "":"N/A"}' theme="simple"/>
> In struts 2.0.6, if "name" had no value in the map, then "N/A" would be selected.
> In struts 2.0.8, if "name" has no value in the map, then no option is selected.
> I have tried variations on the list such as '#@java.util.HashMap@{"Opt.":"Opt.", "Std.":"Std.", null:"N/A"}' to work around this issue without luck.

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


[jira] Resolved: (WW-2045) Can no longer select null in radiomap

Posted by "Don Brown (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/struts/browse/WW-2045?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Don Brown resolved WW-2045.
---------------------------

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

> Can no longer select null in radiomap
> -------------------------------------
>
>                 Key: WW-2045
>                 URL: https://issues.apache.org/struts/browse/WW-2045
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Views
>    Affects Versions: 2.0.8
>         Environment: freemarker
>            Reporter: Jasper Rosenberg
>            Assignee: Don Brown
>             Fix For: 2.0.10
>
>
> In my action, have setter getter for myMap property:
> private Map<String, String> myMap = new HashMap<String, String>();
> <@s.radio name="myMap['name']" list='#@java.util.HashMap@{"Opt.":"Opt.", "Std.":"Std.", "":"N/A"}' theme="simple"/>
> In struts 2.0.6, if "name" had no value in the map, then "N/A" would be selected.
> In struts 2.0.8, if "name" has no value in the map, then no option is selected.
> I have tried variations on the list such as '#@java.util.HashMap@{"Opt.":"Opt.", "Std.":"Std.", null:"N/A"}' to work around this issue without luck.

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


[jira] Updated: (WW-2045) Can no longer select null in radiomap

Posted by "Aymeric Levaux (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/struts/browse/WW-2045?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Aymeric Levaux updated WW-2045:
-------------------------------

    Priority: Critical  (was: Major)

> Can no longer select null in radiomap
> -------------------------------------
>
>                 Key: WW-2045
>                 URL: https://issues.apache.org/struts/browse/WW-2045
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Views
>    Affects Versions: 2.0.8
>         Environment: freemarker
>            Reporter: Jasper Rosenberg
>            Assignee: Don Brown
>            Priority: Critical
>             Fix For: 2.0.10
>
>
> In my action, have setter getter for myMap property:
> private Map<String, String> myMap = new HashMap<String, String>();
> <@s.radio name="myMap['name']" list='#@java.util.HashMap@{"Opt.":"Opt.", "Std.":"Std.", "":"N/A"}' theme="simple"/>
> In struts 2.0.6, if "name" had no value in the map, then "N/A" would be selected.
> In struts 2.0.8, if "name" has no value in the map, then no option is selected.
> I have tried variations on the list such as '#@java.util.HashMap@{"Opt.":"Opt.", "Std.":"Std.", null:"N/A"}' to work around this issue without luck.

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