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

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.4.18, 1.5-RC5.1
    • 1.4.19
    • wicket
    • 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. wicket-3962.zip
          11 kB
          Olaf Siefart
        2. select-option-uuid.patch
          5 kB
          Sven Meier
        3. PageScopedValue.patch
          11 kB
          Martin Tzvetanov Grigorov
        4. Select.java
          7 kB
          Olaf Siefart

        Issue Links

          Activity

            People

              svenmeier Sven Meier
              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