[Wicket-user] ajax causes page to expire when 2 browser tabs are open with bookmarkable pages

2006-11-27 Thread Nili Adoram
Hi all,

I have a 'Item editing' page containing a form. When the form is 
submitted I want to return to the 'Item List' page but with fresh data.
In order to do that, after the form is submitted I look for the last 
instance of the Item List page in the page map, retrieve some of its 
page parameters (sorting, filtering, paging params) ,
and call setResponsePage with this page class and page parameters. This 
constructs a bookmarkable page with fresh data.
In addition this page contains an AjaxEventBehavior that refreshes some 
of the page components once a minute.
This all works great if only one browser tab is open.

However, if two browser tabs are open simultaneously things go wrong:
I open the Item List page in both tabs.
I open the Item page in one tab and submit the form.
I open the Item page in the second tab and submit the form.
When ajax tries to refresh the first tab it fails to find the page 
(inside DefaultRequestTargetResolverStrategyresolveRenderedPage()) and 
'page expired' page is displayed.

getCallBackScript of AjaxEventBehavior is called with false for  
recordPageVersion and false for onlyTargetActivePage.
If I modify onlyTargetActivePage to true one of the tabs stops 
refreshing after the aforementioned scenario.

Any ideas how to avoid this page expired problem ?

Thanks,
Nili

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] ajax causes page to expire when 2 browser tabs are open with bookmarkable pages

2006-11-27 Thread Eelco Hillenius
You should make sure those two tabs each have their own pagemap.
Wicket tries as much as it can to do this automatically, but it helps
if you do this manually as well.

Eelco


On 11/27/06, Nili Adoram [EMAIL PROTECTED] wrote:
 Hi all,

 I have a 'Item editing' page containing a form. When the form is
 submitted I want to return to the 'Item List' page but with fresh data.
 In order to do that, after the form is submitted I look for the last
 instance of the Item List page in the page map, retrieve some of its
 page parameters (sorting, filtering, paging params) ,
 and call setResponsePage with this page class and page parameters. This
 constructs a bookmarkable page with fresh data.
 In addition this page contains an AjaxEventBehavior that refreshes some
 of the page components once a minute.
 This all works great if only one browser tab is open.

 However, if two browser tabs are open simultaneously things go wrong:
 I open the Item List page in both tabs.
 I open the Item page in one tab and submit the form.
 I open the Item page in the second tab and submit the form.
 When ajax tries to refresh the first tab it fails to find the page
 (inside DefaultRequestTargetResolverStrategyresolveRenderedPage()) and
 'page expired' page is displayed.

 getCallBackScript of AjaxEventBehavior is called with false for
 recordPageVersion and false for onlyTargetActivePage.
 If I modify onlyTargetActivePage to true one of the tabs stops
 refreshing after the aforementioned scenario.

 Any ideas how to avoid this page expired problem ?

 Thanks,
 Nili

 -
 Take Surveys. Earn Cash. Influence the Future of IT
 Join SourceForge.net's Techsay panel and you'll get the chance to share your
 opinions on IT  business topics through brief surveys - and earn cash
 http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user