Uploaded image for project: 'Wicket'
  1. Wicket
  2. WICKET-3962

the wrong option in select components is rendered (Combination of reusing panels and defaultFormProcessing==false)

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.4.18, 1.5-RC5.1
    • Fix Version/s: 1.4.19
    • Component/s: wicket
    • Environment:
      mac os / windows / java 1.5 / java 1.6 / tomcat

      Description

      We are reusing a panel (let's say a PersonPanel, two instances). There is a forward / back ajax-navigation between the panels, which is implemented with component.replace. So the component path for the select of both panels are the same. The back-function is implemented with setDefaultFormProcessing(false). If now showing PersonPanel1 --> Forward --> PersonPanel2 --> Back --> PersonPanel1 --> Forward --> PersonPanel2, the selects of the panel 2 are showing the values of panel1.

      The Reason:
      In the 'Select.isSelected(...)' the getInputAsArray() is used (instead of the getRawInput()). So request parameters are overruling the raw input, if the component path is the same.

      Wicket-Code:

      if (hasRawInput()) {
      String[] paths = getInputAsArray();

      I think, instead of calling getInputAsArray() the getRawInput()(With a split for the MultiSelect-support) should be used.

        Attachments

        1. PageScopedValue.patch
          11 kB
          Martin Tzvetanov Grigorov
        2. Select.java
          7 kB
          Olaf Siefart
        3. select-option-uuid.patch
          5 kB
          Sven Meier
        4. wicket-3962.zip
          11 kB
          Olaf Siefart

          Issue Links

            Activity

              People

              • Assignee:
                svenmeier Sven Meier
                Reporter:
                osiefart Olaf Siefart
              • Votes:
                1 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - 10m
                  10m
                  Remaining:
                  Remaining Estimate - 10m
                  10m
                  Logged:
                  Time Spent - Not Specified
                  Not Specified