Johan Compagner wrote:
> 
> what doesnt work?
> it will throw a page expire now and that works.
> It should work now just as normal links.
> 

*My page* doesn't work in that situation, since wicket thinks it's expired.



>> It's an ajax request that makes changes to the current page (without
>> going
>> to another page). What does that have to do with redirecting?
> 
> redirect is only relevant if you redirect to a page
> If it is a "normal" ajax request that just renders some components then
> redirect boolean is used at all.
> Then you just have an AjaxRequestTarget that does its work.
> 

Have you read my previous messages?
BookmarkablePageRequestTarget.getPage(RequestCycle) checks for isRedirect
before calling newPage.
isRedirect ALWAYS returns true for ajax requests (WHY???)
I had to override a method to workaround this problem.



> So you are just rendering a few components then the rendering/response
> phase
> shouldnt touch the redirect at all see above
> you just have a AjaxRequestTarget
> 

No, the original request target is never an AjaxRequestTarget.
Normally it's a BehaviorRequestTarget but I'm using a
BookmarkableListenerInterfaceRequestTarget instead.
Only after the initial processing (which in my case has the problems I
mentioned above), the target is changed to an AjaxRequestTarget.



> see above, AjaxRequestTarget should then handle the response and that one
> doesnt look at the redirect
> and the redirect boolean is only relevant for the Response not the
> request.
> 

See above, the target is not an AjaxRequestTarget yet, it is
BookmarkableListenerInterfaceRequestTarget.
And it looks at isRedirect(), which doesn't even look at the redirect
boolean because it checks for isAjax first and returns true.
Again, why does isRedirect() always return true for ajax requests?



> then just use statefull pages
> I dont get why you have partial updated pages, that are constantly created
> as the original again because
> you want stateless pages.
> Dont you want to keep that partial updated page in memory?
> I guess you dont have any callbacks in the things you update? that is just
> text/images?
> 

The initial pages are stateless because this way I can cache them and serve
up to 6000 requests per second or more, instead of 0.5 to 25 requests per
second.
In over 95% of the cases, users won't click on the ajax link. No wicket code
will be executed.
For the few cases when they do click, only one page will be created per
session (I had to trick wicket to put it in the session, that was one of the
other problems I mentioned). The component I am adding through the ajax
request is a stateful form. I wanted to make it stateless, but there doesn't
seem to be any reasonable way to do that, because it includes a captcha
field.
Anyway, everything is working now, but I wanted some answers to those
questions.

Regards,
Adrian
-- 
View this message in context: 
http://www.nabble.com/Stateless-AJAX-links-tp20031309p20184803.html
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to