You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "lars geidel (JIRA)" <ji...@apache.org> on 2011/09/06 13:39:10 UTC

[jira] [Updated] (WW-3676) javatemplates - no radiobutton is selected if property 'name' is not of type integer or string (e.g. short)

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

lars geidel updated WW-3676:
----------------------------

    Description: 
org.apache.struts2.views.java.simple.RadioHandler:62
//Namevalue needs to cast to a string from object. It's object because the 
//Property can be defined as String or as Integer
String itemNameValueStr;
if (nameValue instanceof java.lang.Integer || nameValue instanceof java.lang.String)
    itemNameValueStr = nameValue.toString();
else
    itemNameValueStr = null;


possible sollution?:
String itemNameValueStr = StringUtils.defaultString(nameValue == null ? null : nameValue.toString());


  was:
org.apache.struts2.views.java.simple.RadioHandler:62
//Namevalue needs to cast to a string from object. It's object because the 
//Property can be defined as String or as Integer
String itemNameValueStr;
if (nameValue instanceof java.lang.Integer || nameValue instanceof java.lang.String)
    itemNameValueStr = nameValue.toString();
else
    itemNameValueStr = null;


possible sollution?:
String itemNameValueStr = StringUtils.defaultString(nameValue == null ? null : nameValue .toString());



> javatemplates - no radiobutton is selected if property 'name' is not of type integer or string (e.g. short)
> -----------------------------------------------------------------------------------------------------------
>
>                 Key: WW-3676
>                 URL: https://issues.apache.org/jira/browse/WW-3676
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Plugin - Java Templates
>    Affects Versions: 2.2.3
>            Reporter: lars geidel
>
> org.apache.struts2.views.java.simple.RadioHandler:62
> //Namevalue needs to cast to a string from object. It's object because the 
> //Property can be defined as String or as Integer
> String itemNameValueStr;
> if (nameValue instanceof java.lang.Integer || nameValue instanceof java.lang.String)
>     itemNameValueStr = nameValue.toString();
> else
>     itemNameValueStr = null;
> possible sollution?:
> String itemNameValueStr = StringUtils.defaultString(nameValue == null ? null : nameValue.toString());

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira