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

Inconsistent behaviour of org.apache.wicket.Page.isPageStateless()

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 6.8.0
    • 6.9.0, 7.0.0-M1
    • wicket-auth-roles
    • None
    • any

    Description

      we have a page with

      • a login form A (org.apache.wicket.markup.html.form.StatelessForm<T>)
      • a standard form B inside a panel which is secured with @AuthorizeAction(action = Action.RENDER...)

      our problem: the user must submit the login form twice.

      reason:

      • when the page is requested the first time, the page is stateless cause none of the visible children are stateful.
      • when the user now submits the login form, the page claims to be stateful, the stateful component is form B.
      • org.apache.wicket.core.request.handler.ListenerInterfaceRequestHandler.respond(IRequestCycle) now handles the page as expired and omits the submit

      possible buggy code:

      • the visiblity of components is computed before rendering in org.apache.wicket.Component.setRenderAllowed()
      • org.apache.wicket.core.request.handler.ListenerInterfaceRequestHandler.respond(IRequestCycle) calls only org.apache.wicket.MarkupContainer.internalInitialize() on the current page to give it a chance for computing its visibility, Component.setRenderAllowed() is not called

      Attachments

        1. wicket-bug-5225-quickstart.zip
          24 kB
          Mischa Neumann

        Activity

          People

            Unassigned Unassigned
            mischa.neumann@init.de Mischa Neumann
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: