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

Bookmarkable / Stateless form submit bug

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.3.3, 1.4-M1
    • 1.4-M3
    • wicket
    • None
    • Any

    Description

      A stateless bookmarkable form submission isn't working correctly for submissions after reboot or session expiration. This may be due to the use of MixedParamUrlCodingStrategy:

      believe I've tracked down the problem to this code in BookmarkablePageRequestTargetUrlCodingStrategy:

      // do some extra work for checking whether this is a normal request to a
      // bookmarkable page, or a request to a stateless page (in which case a
      // wicket:interface parameter should be available
      final String interfaceParameter = (String)parameters
      .remove(WebRequestCodingStrategy.INTERFACE_PARAMETER_NAME);

      if (interfaceParameter != null)

      { WebRequestCodingStrategy.addInterfaceParameters(interfaceParameter, requestParameters); return new BookmarkableListenerInterfaceRequestTarget(pageMapName, (Class)bookmarkablePageClassRef.get(), parameters, requestParameters .getComponentPath(), requestParameters.getInterfaceName(), requestParameters.getVersionNumber()); }

      The issue is that the 'parameters' will never contain the INTERFACE_PARAMETER_NAME because it would have been removed in WebRequestCodingStrategy:decode:215 which as far as I can tell is always called first (from RequestCycle.step.RESOLVE_TARGET:1233).

      The 'requestParameters' should already have the interface parameters, so it isn't clear why the addInterfaceParameters() logic is being called again (it is already called in WebRequestCodingStrategy:decode:200).

      I've got a patch forthcoming.

      Attachments

        1. 1643.patch
          4 kB
          Doug Donohoe

        Activity

          People

            jcompagner Johan Compagner
            donohoedigital Doug Donohoe
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: