Uploaded image for project: 'Struts 2'
  1. Struts 2
  2. WW-3676

javatemplates - no radiobutton is selected if property 'name' is not of type integer or string (e.g. short)

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.2.3
    • 2.3.15
    • None

    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());
      

      Attachments

        Activity

          People

            lukaszlenart Lukasz Lenart
            lgeidel lars geidel
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: