Details

    • Type: Task
    • Status: Resolved
    • Priority: Minor
    • Resolution: Duplicate
    • Affects Version/s: 1.4.18
    • Fix Version/s: 1.5.1
    • Component/s: wicket, wicket-extensions
    • Labels:
      None

      Description

      Wickettester always submits the value of a formcomponent.

      see: BaseWickettTester:1459

      Its not possible to override this behavior.

      Selectcomponent (wicket extension) for example expects the optionpath(s) to convert the browser input to modelvalue. The value (modelvalue) doesnt match this so unittests crash at Select:132 with IndexOutOfBoundException

      please let developers override the "getValueBehavior" depending on the formcomponent:

      ...

      String name = formComponent.getInputName();
      //String value = formComponent.getValue();
      String value = getRequestParameterValueForComponent(formComponent);
      ...

      protected String getRequestParameterValueForComponent(FormComponent<?> formComponent){
      return formComponent.getValue();
      }

      so developers can overide the method to support individual components:

      protected String getRequestParameterValueForComponent(FormComponent<?> formComponent){
      if (formComponent instanceof xxxx)

      { return something;; }

      else

      { return super.getRequestParameterValueForComponent(formComponent); }

      }

        Issue Links

          Activity

          There are no comments yet on this issue.

            People

            • Assignee:
              ivaynberg Igor Vaynberg
              Reporter:
              aelsholz Alexander Elsholz
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development