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

Preselect multiple options not working in <s:optgroup> when key is not a string

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.3.16.3
    • Fix Version/s: 2.3.20
    • Component/s: None
    • Labels:
    • Flags:
      Patch

      Description

      Below code will NOT preselect options in optgroup because type of key is not a string.

      <s:select name="ids" list="#{1:'AA'}" multiple="true" value="{1, 2, 3}">
          <s:optgroup label="List BB" list="#{2:'BB', 3:'CC'}" />
      </s:select>
      

      Original SO question.

        Attachments

          Activity

            People

            • Assignee:
              lukaszlenart Lukasz Lenart
              Reporter:
              aleksandr-m Aleksandr Mashchenko
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: