Thanks. but some of the things don't really make sense:

Johan Compagner wrote:
> 
>> - Why does wicket always do redirect for ajax requests?
> 
> Because how else would you render the resulting page?
> 

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?



> Do you really want to replace the complete dom with a new page without the
> browser doing a normal get?
> Then the url thats in the browser wouldnt point at all anymore to the
> right
> page (if a user would do refresh in a browser)
> 

No, I just replace part of the dom of the current page.
If the user refreshes the page, he/she will see the original page again
(like it was before the changes).



>> - Why does BookmarkablePageRequestTarget.getPage(RequestCycle) only call
>> newPage if isRedirect is false? And why is it final?
> 
> see eriks reply, again the redirect is done through the browser as a
> second
> request
> else the url in the browser doesnt point to the right page.
> 

Well, then how can it possibly know what to redirect to, if it has no page?
Furthermore, BookmarkableListenerInterfaceRequestTarget.processEvents simply
assumes that the page is not null after calling getPage(requestCycle)



> if you click an ajax link and you want to show a different page then yes a
> redirect to that page has to happen
> else we have to replace the complete document with the new page, dont know
> if we really support that and if that will go fine in all the browsers.
> 

Yeah, *if* I want to show a different page. (By the way, a 302 redirect
won't help in that case, but I see that it automatically uses another way
for ajax requests).
However I *don't* want to show a different page.



>> - Is there any better way to do what I am trying to do?
> 
> yes why have ajax links that could be just normal links if you want to
> have
> a stateless page.
> 

That could work, but I'd rather not render and send the whole updated page
to the browser, when most of it doesn't change. How would that be better?

Adrian
-- 
View this message in context: 
http://www.nabble.com/Stateless-AJAX-links-tp20031309p20175375.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