Martin Grigorov píše v Út 18. 09. 2012 v 10:02 +0300:

> Hi,
> 
> See https://issues.apache.org/jira/browse/WICKET-4594
> The problem is that Wicket cannot differentiate between page
> parameters and ajax request parameters 

Maybe Wicket could off-load some of the AJAX params to headers?
xmlhttp.setRequestHeader("Wicket-AJAX-param","foo=bar");
Disclaimer: Just an idea, might be nonsense.



> and in case of page re-creation
> all of them were used as page parameters for the new page instance.
> When a page is automatically re-created due to expiration the callback
> method (like onClick, onChange, etc) is not executed because the
> component/behavior may not be visible/enabled in the page's initial
> state. So the page is recreated and rendered in its initial state, no
> callbacks are executed at all.
> 
> The whole thing started as simple feature request in WICKET-4014 but
> since then it causes only problems ... :-/
> 
> On Tue, Sep 18, 2012 at 4:49 AM, Ondrej Zizka <ozi...@redhat.com> wrote:
> >
> >
> >> > Is there a mechanism to let the page be re-created with the original
> >> > PageParameters?
> >> > Maybe they could be kept within JS of the page and sent with the AJAX
> >> > request?  That would probably need a change in Wicket's AJAX code.
> >> > (Wicket 1.5)
> >>
> >> That was the case until recently but there was no way to differentiate
> >> between original page parameters and custom request parameters for the
> >> Ajax request itself. So we took the safest way by dropping all
> >> parameters when a page is being auto-recreated.
> >
> >
> > Could this be made optional?  Because, in case the developer knows that
> > the URL has all the data the page needs to be recreated, he could
> > setSendPageParametersOnAjaxRequests(true) or such... That would make
> > life with Ajax components easier... would it? :-)
> > Or maybe I don't get this fully, as I don't know the Wicket internals...
> > in which case, I believe you there was no way.  If you have a minute,
> > could you briefly explain that or point me to some wiki?
> >
> > Thanks.
> > Ondra
> 
> 
> 


Reply via email to