You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Mischa Neumann (JIRA)" <ji...@apache.org> on 2013/06/12 08:34:19 UTC

[jira] [Commented] (WICKET-5225) Inconsistent behaviour of org.apache.wicket.Page.isPageStateless()

    [ https://issues.apache.org/jira/browse/WICKET-5225?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13680989#comment-13680989 ] 

Mischa Neumann commented on WICKET-5225:
----------------------------------------

i think it is correct, that the page claims to be stateless at the first request - there is no component that will save any state.
but if the stateless flag depends on the visibility of components, any functionality that changes the visiblity must be called at the beginning of Component.isStateless().

also think about if the assumptions taken in ListenerInterfaceRequestHandler.respond(IRequestCycle) are correct: a former stateless page might be stateful at the time of the the submit if any stateful component is now visible. even if the targeted component is still statelless, the request will be treated as targeting a stale page.
                
> Inconsistent behaviour of org.apache.wicket.Page.isPageStateless()
> ------------------------------------------------------------------
>
>                 Key: WICKET-5225
>                 URL: https://issues.apache.org/jira/browse/WICKET-5225
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket-auth-roles
>    Affects Versions: 6.8.0
>         Environment: any
>            Reporter: Mischa Neumann
>
> 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

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira