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

s:select tag does not support keys of type Byte (and possibly others)

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • 2.0.2
    • 2.0.6
    • None
    • None
    • windows xp, java 6, tomcat 5.5.17

    Description

      <s:select size="1"
      name="rate"
      list="rates"
      listKey="id"
      listValue="name"
      emptyOption="false"
      label="...."/>

      Action has properties
      private Byte rate;
      private ArrayList<OptionBean> rates;

      class OptionBean implements Serializable {
      private Byte id;
      private String name;
      }

      generated select tag does not recognize selected value.
      If I switch Byte to String then it works.

      I would like set OptionBean containing 'id' of type Object.
      And I tried it with different types of Objects (String, Byte) but only String worked.
      I believe it should support all object types with correctly implemented 'equals'.

      If it matters - form is of theme "ajax".

      Attachments

        Issue Links

          Activity

            People

              rgielen René Gielen
              dwojtas@gmail.com Dariusz Wojtas
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: