Re: [Wicket-user] pagemap problem with late arriving ajax request

2006-05-26 Thread Ari Suutari

Hi,

Great work again! I cannot reproduce the error with my test application
any more.

We still have one page which hits page expired, but after looking
it I think it is a different case (I'll get back if necessary after I have
taken a better look at it).

Thaks for help,

   Ari S.

- Original Message - 
From: Igor Vaynberg [EMAIL PROTECTED]

To: wicket-user@lists.sourceforge.net
Sent: Thursday, May 25, 2006 7:49 PM
Subject: Re: [Wicket-user] pagemap problem with late arriving ajax request


hmm, i guess really the only way to fix it would be to sync around my patch

can you try that and see if it fixes the problem?

Index:
D:/ws/wicket_1_2/src/java/wicket/request/compound/DefaultRequestTargetResolverStrategy.java
===
---
D:/ws/wicket_1_2/src/java/wicket/request/compound/DefaultRequestTargetResolverStrategy.java
(revision 5854)
+++
D:/ws/wicket_1_2/src/java/wicket/request/compound/DefaultRequestTargetResolverStrategy.java
(working copy)
@@ -92,6 +92,7 @@
final String path = requestParameters.getPath();
if (requestParameters.getComponentPath() != null)
{
+synchronized (requestCycle.getSession()) {
// we need to check if this request has been flagged as
// process-only-if-path-is-active and if so make sure this
condition
// is met
@@ -138,6 +139,7 @@
}
}
}
+
}

if (processRequest)
@@ -149,6 +151,7 @@
return EmptyRequestTarget.getInstance();
}
}
+}
// see whether this request points to a bookmarkable page
else if (requestParameters.getBookmarkablePageClass() != null)
{


-Igor


On 5/24/06, Ari Suutari [EMAIL PROTECTED] wrote:


Hi,

Sorry it took some time to respond - I sat down and wrote a somewhat
simple
test program that I can redistribute if required.

ok here is my first pass. i cannot reproduce the problem, so i am kinda
flying blind here - all i know for sure is that it compiles

it seems to me that as soon as you change the page the browser dumps the
old
javascript, in my case looks like it also dumps any running ajax
requests. i
tried both ie and ffox.

i added a self upating counter that keeps updating every 1 sec and a link
to
go to another page, havent been able to catch the right timing i guess

I did some more testing also. As I mentioned in my first e-mail, our setup
is *similar* to self updating timer. The difference to timer is that we
have an
applet receiving events from server. The applet then executes javascript
function to fire ajax update when needed.

It looks like that the threads in applet continue to run for some time
even
after link is clicked (ie. applet is not stopped immediately)
and seem to be able to run javascript on page also.

At least using an applet here is the easiest way to reproduce the
situation.
(And I understand that we are bending wicket a lot here :) - but compared
to what we had earlier wicket+ajax is very elegant and simple)

anyways, i am attaching the patch, let me know if it works for you and we
can take it from here

The patch mostly works; however, there seems to be a small window where
two threads (one from click and other one from ajax) can be executing at
DefaultRequestTargetResolverStrategy which still results in page
expired.

My test application is available at:
http://download.syncrontech.com/public/wicket-ajax-race.zip

How to test:

- load ExpireTestPage1
- click on page 2 link
- click on to page 1. Without your Igor's patch, you'll get page
expired almost always

With Igor's patch, it requires some rather mad and rapid clicking of links
to get
the requests generated so that error still occurs. But it is still there.

Ari S.


- Original Message -

On 5/23/06, Igor Vaynberg [EMAIL PROTECTED] wrote:

 i got up extra early to take care of this, so by the end of the day

 -igor


 On 5/23/06, Ari Suutari [EMAIL PROTECTED] wrote:
 
  This is so great !
 
  TIA,
 
  Ari S.
 
  - Original Message -
  From: Johan Compagner [EMAIL PROTECTED]
  To:  wicket-user@lists.sourceforge.net
  Sent: Tuesday, May 23, 2006 11:37 AM
  Subject: Re: [Wicket-user] pagemap problem with late arriving ajax
  request
 
 
  We will fix it in the 1.2 branch.
 
  I am currently a bit full of work for at least 2 days. So i can only
  look at
  it by the end of this week.
 
  johan
 
 
  On 5/23/06, Ari Suutari [EMAIL PROTECTED] wrote:
  
   Hi,
  
   best thing todo currently is to have that -1 check in the pagemap
and
 
   make
   your own version of wicket 1.2
  
   We already decided to put my modified version to production and
   if there are no side effects from my change we can keep it for
  some
   time.
  
   in trunk (2.0) this is already fixed in the default setting because
  we
   refactored the pagemap
   and have now a different

Re: [Wicket-user] pagemap problem with late arriving ajax request

2006-05-25 Thread Igor Vaynberg
hmm, i guess really the only way to fix it would be to sync around my patchcan you try that and see if it fixes the problem?Index: D:/ws/wicket_1_2/src/java/wicket/request/compound/DefaultRequestTargetResolverStrategy.java
===--- D:/ws/wicket_1_2/src/java/wicket/request/compound/DefaultRequestTargetResolverStrategy.java (revision 5854)+++ D:/ws/wicket_1_2/src/java/wicket/request/compound/DefaultRequestTargetResolverStrategy.java (working copy)
@@ -92,6 +92,7 @@  final String path = requestParameters.getPath();  if (requestParameters.getComponentPath() != null)  {+   synchronized (requestCycle.getSession()) {
   // we need to check if this request has been flagged as   // process-only-if-path-is-active and if so make sure this condition   // is met@@ -138,6 +139,7 @@  }
 }}+  }   if (processRequest)@@ -149,6 +151,7 @@return EmptyRequestTarget.getInstance();   }
  }+  }  // see whether this request points to a bookmarkable page  else if (requestParameters.getBookmarkablePageClass() != null)  {
-IgorOn 5/24/06, Ari Suutari [EMAIL PROTECTED] wrote:
Hi,Sorry it took some time to respond - I sat down and wrote a somewhat simpletest program that I can redistribute if required.ok here is my first pass. i cannot reproduce the problem, so i am kinda
flying blind here - all i know for sure is that it compilesit seems to me that as soon as you change the page the browser dumps the old_javascript_, in my case looks like it also dumps any running ajax requests. i
tried both ie and ffox.i added a self upating counter that keeps updating every 1 sec and a link togo to another page, havent been able to catch the right timing i guessI did some more testing also. As I mentioned in my first e-mail, our setup
is *similar* to self updating timer. The difference to timer is that we have anapplet receiving events from server. The applet then executes _javascript_function to fire ajax update when needed.It looks like that the threads in applet continue to run for some time even
after link is clicked (ie. applet is not stopped immediately)and seem to be able to run _javascript_ on page also.At least using an applet here is the easiest way to reproduce the situation.(And I understand that we are bending wicket a lot here :) - but compared
to what we had earlier wicket+ajax is very elegant and simple)anyways, i am attaching the patch, let me know if it works for you and wecan take it from hereThe patch mostly works; however, there seems to be a small window where
two threads (one from click and other one from ajax) can be executing atDefaultRequestTargetResolverStrategy which still results in page expired.My test application is available at:
http://download.syncrontech.com/public/wicket-ajax-race.zipHow to test:- load ExpireTestPage1- click on page 2 link- click on to page 1. Without your Igor's patch, you'll get page expired almost always
With Igor's patch, it requires some rather mad and rapid clicking of links to getthe requests generated so that error still occurs. But it is still there.Ari S.- Original Message -
On 5/23/06, Igor Vaynberg [EMAIL PROTECTED] wrote: i got up extra early to take care of this, so by the end of the day -igor
 On 5/23/06, Ari Suutari [EMAIL PROTECTED] wrote:   This is so great !   TIA,
   Ari S.   - Original Message -  From: Johan Compagner [EMAIL PROTECTED]  To:  
wicket-user@lists.sourceforge.net  Sent: Tuesday, May 23, 2006 11:37 AM  Subject: Re: [Wicket-user] pagemap problem with late arriving ajax
  requestWe will fix it in the 1.2 branch.   I am currently a bit full of work for at least 2 days. So i can only  look at  it by the end of this week.
   johanOn 5/23/06, Ari Suutari [EMAIL PROTECTED] wrote: Hi,
 best thing todo currently is to have that -1 check in the pagemap andmake   your own version of wicket 1.2  
   We already decided to put my modified version to production and   if there are no side effects from my change we can keep it for  some   time.  
   in trunk (2.0) this is already fixed in the default setting because  we   refactored the pagemap   and have now a different default pagemap and httpsessionstore.
 You mean that if I would use 2.0 from trunk the problem would go   away ? If so, would it be possible to back-port the new pagemap   to 1.2 branch ? Not as default, but something that I could turn on
from   application settings ? Another point: when 1.2 is released, someone else might also   hit this problem so it might be necessary to implement some kind
   of fix anyway (at least for us, some pages were almost unusable   because of this as other pages worked quite ok - it seems that  YMMV). Ari S.
 On 5/23/06, Ari Suutari [EMAIL PROTECTED]  wrote:   Hi,   
It is very important for us to get this fixed, preferably for 1.2.If any wicket committer is willing to help us, we will payfor the work (please contact me directly by e

Re: [Wicket-user] pagemap problem with late arriving ajax request

2006-05-24 Thread Johan Compagner
you could debug it with a breakpoint in the ajax handler Then let the ajax call hit but don't go futher. And then first ask for the new page.Let that happen en then let the ajax call continue.johan
On 5/23/06, Igor Vaynberg [EMAIL PROTECTED] wrote:
ok here is my first pass. i cannot reproduce the problem, so i am kinda flying blind here - all i know for sure is that it compilesit seems to me that as soon as you change the page the browser dumps the old _javascript_, in my case looks like it also dumps any running ajax requests. i tried both ie and ffox.
i added a self upating counter that keeps updating every 1 sec and a link to go to another page, havent been able to catch the right timing i guessanyways, i am attaching the patch, let me know if it works for you and we can take it from here
-IgorOn 5/23/06, Igor Vaynberg 
[EMAIL PROTECTED] wrote:
i got up extra early to take care of this, so by the end of the day

-igorOn 5/23/06, Ari Suutari 

[EMAIL PROTECTED] wrote:
This is so great !TIA,Ari S.- Original Message -From: Johan Compagner 

[EMAIL PROTECTED]To: 
wicket-user@lists.sourceforge.netSent: Tuesday, May 23, 2006 11:37 AMSubject: Re: [Wicket-user] pagemap problem with late arriving ajax requestWe will fix it in the 1.2 branch.I am currently a bit full of work for at least 2 days. So i can only look at
it by the end of this week.johanOn 5/23/06, Ari Suutari [EMAIL PROTECTED]
 wrote: Hi, best thing todo currently is to have that -1 check in the pagemap and
 make your own version of wicket 1.2 We already decided to put my modified version to production and if there are no side effects from my change we can keep it for some

 time. in trunk (2.0) this is already fixed in the default setting because we refactored the pagemap and have now a different default pagemap and httpsessionstore.


 You mean that if I would use 2.0 from trunk the problem would go away ? If so, would it be possible to back-port the new pagemap to 1.2 branch ? Not as default, but something that I could turn on
 from application settings ? Another point: when 1.2 is released, someone else might also hit this problem so it might be necessary to implement some kind of fix anyway (at least for us, some pages were almost unusable
 because of this as other pages worked quite ok - it seems that YMMV). Ari S. On 5/23/06, Ari Suutari 

[EMAIL PROTECTED]
 wrote:   Hi,   It is very important for us to get this fixed, preferably for 1.2.  If any wicket committer is willing to help us, we will pay  for the work (please contact me directly by e-mail for this).
   Ari S.   - Original Message -  From: Igor Vaynberg 

[EMAIL PROTECTED]  To: 
wicket-user@lists.sourceforge.net  Sent: Monday, May 22, 2006 6:21 PM  Subject: Re: [Wicket-user] pagemap problem with late arriving ajax

 requestproblem is, not every ajax behavior uses version -1. i guess we need to  have  the ability to tag a request as process-only-if-page-is-active


   -IgorOn 5/22/06, Ari Suutari [EMAIL PROTECTED]
  wrote: If I modify the 
PageMap.java like this: final Page get(final int id, int versionNumber)   {   final IPageMapEntry entry =   (IPageMapEntry)session.getAttribute(attributeForId(id));
   if (entry != null)   {  if (versionNumber == -1) {


Access a = peekAccess(); 

if (a.getId() != id) 

return null;  } So this kludgery piece of the code checks that if request is coming from   ajax   (ie. versionNumber == -1) and the topmost page is not the one being
   requested   - return null. After adding this it looks like I cannot reproduce the problem any more. Ari S.
 - Original Message -   From: Johan Compagner 

[EMAIL PROTECTED]   To:  
wicket-user@lists.sourceforge.net   Sent: Monday, May 22, 2006 2:37 PM   Subject: Re: [Wicket-user] pagemap problem with late arriving ajax  request  


 So what request comes first?   The ajax request should always do -1 (so latest release)   So if the request from the new page did come first then the ajax


 request   shouild work on that new page.   If the ajax request did come a bit earlier then there shouldn't be a   problem   at all because   the last reqest will be the normal link click for a new page.
 johan   On 5/22/06, Ari Suutari 

[EMAIL PROTECTED] wrote:   
I cannot figure out any workaround myself. UnversionedBehaviorListenerseems to use -1 aspage version number, would it make any sense to try to alter PageMap
  sothatif version is -1 the page stack is not cleared ?   Ari S.   - Original Message -
From: Matej Knopp [EMAIL PROTECTED]To: 

wicket-user@lists.sourceforge.net
Sent: Monday, May 22, 2006 11:44 AMSubject: Re: [Wicket-user] pagemap problem with late arriving ajax   request  
I guess this is because in 1.2 pagemap behaves like stack. Johan? -Matej Ari Suutari wrote:
 Hi, I'm having a problem with wicket's ajax stuff where an ajax request fired by previous page

Re: [Wicket-user] pagemap problem with late arriving ajax request

2006-05-24 Thread Ari Suutari

Hi,

Sorry it took some time to respond - I sat down and wrote a somewhat simple
test program that I can redistribute if required.


ok here is my first pass. i cannot reproduce the problem, so i am kinda
flying blind here - all i know for sure is that it compiles

it seems to me that as soon as you change the page the browser dumps the old
javascript, in my case looks like it also dumps any running ajax requests. i
tried both ie and ffox.

i added a self upating counter that keeps updating every 1 sec and a link to
go to another page, havent been able to catch the right timing i guess


I did some more testing also. As I mentioned in my first e-mail, our setup
is *similar* to self updating timer. The difference to timer is that we have an
applet receiving events from server. The applet then executes javascript
function to fire ajax update when needed.

It looks like that the threads in applet continue to run for some time even
after link is clicked (ie. applet is not stopped immediately)
and seem to be able to run javascript on page also.

At least using an applet here is the easiest way to reproduce the situation.
(And I understand that we are bending wicket a lot here :) - but compared
to what we had earlier wicket+ajax is very elegant and simple)


anyways, i am attaching the patch, let me know if it works for you and we
can take it from here


The patch mostly works; however, there seems to be a small window where
two threads (one from click and other one from ajax) can be executing at
DefaultRequestTargetResolverStrategy which still results in page expired.

My test application is available at:
http://download.syncrontech.com/public/wicket-ajax-race.zip

How to test:

- load ExpireTestPage1
- click on page 2 link
- click on to page 1. Without your Igor's patch, you'll get page expired 
almost always

With Igor's patch, it requires some rather mad and rapid clicking of links to 
get
the requests generated so that error still occurs. But it is still there.

   Ari S.


- Original Message - 


On 5/23/06, Igor Vaynberg [EMAIL PROTECTED] wrote:


i got up extra early to take care of this, so by the end of the day

-igor


On 5/23/06, Ari Suutari [EMAIL PROTECTED] wrote:

 This is so great !

 TIA,

 Ari S.

 - Original Message -
 From: Johan Compagner [EMAIL PROTECTED]
 To:  wicket-user@lists.sourceforge.net
 Sent: Tuesday, May 23, 2006 11:37 AM
 Subject: Re: [Wicket-user] pagemap problem with late arriving ajax
 request


 We will fix it in the 1.2 branch.

 I am currently a bit full of work for at least 2 days. So i can only
 look at
 it by the end of this week.

 johan


 On 5/23/06, Ari Suutari [EMAIL PROTECTED] wrote:
 
  Hi,
 
  best thing todo currently is to have that -1 check in the pagemap and

  make
  your own version of wicket 1.2
 
  We already decided to put my modified version to production and
  if there are no side effects from my change we can keep it for
 some
  time.
 
  in trunk (2.0) this is already fixed in the default setting because
 we
  refactored the pagemap
  and have now a different default pagemap and httpsessionstore.
 
  You mean that if I would use 2.0 from trunk the problem would go
  away ? If so, would it be possible to back-port the new pagemap
  to 1.2 branch ? Not as default, but something that I could turn on

  from
  application settings ?
 
  Another point: when 1.2 is released, someone else might also
  hit this problem so it might be necessary to implement some kind
  of fix anyway (at least for us, some pages were almost unusable
  because of this as other pages worked quite ok - it seems that
 YMMV).
 
  Ari S.
 
  On 5/23/06, Ari Suutari [EMAIL PROTECTED]  wrote:
  
   Hi,
  
   It is very important for us to get this fixed, preferably for 1.2.
   If any wicket committer is willing to help us, we will pay
   for the work (please contact me directly by e-mail for this).
  
   Ari S.
  
   - Original Message -
   From: Igor Vaynberg [EMAIL PROTECTED]
   To:  wicket-user@lists.sourceforge.net
   Sent: Monday, May 22, 2006 6:21 PM
   Subject: Re: [Wicket-user] pagemap problem with late arriving ajax
  request
  
  
   problem is, not every ajax behavior uses version -1. i guess we need
 to
   have
   the ability to tag a request as process-only-if-page-is-active
  
   -Igor
  
  
   On 5/22/06, Ari Suutari [EMAIL PROTECTED]  wrote:
   
If I modify the PageMap.java like this:
   
final Page get(final int id, int versionNumber)
{
final IPageMapEntry entry =
(IPageMapEntry)session.getAttribute(attributeForId(id));
if (entry != null)
{
 if (versionNumber == -1) {
Access a = peekAccess();
if (a.getId() != id)
return null;
 }
   
So this kludgery piece of the code checks that if request is
 coming
  from
ajax
(ie. versionNumber == -1

Re: [Wicket-user] pagemap problem with late arriving ajax request

2006-05-23 Thread Ari Suutari

Hi,

It is very important for us to get this fixed, preferably for 1.2.
If any wicket committer is willing to help us, we will pay
for the work (please contact me directly by e-mail for this).

   Ari S.

- Original Message - 
From: Igor Vaynberg [EMAIL PROTECTED]

To: wicket-user@lists.sourceforge.net
Sent: Monday, May 22, 2006 6:21 PM
Subject: Re: [Wicket-user] pagemap problem with late arriving ajax request


problem is, not every ajax behavior uses version -1. i guess we need to have
the ability to tag a request as process-only-if-page-is-active

-Igor


On 5/22/06, Ari Suutari [EMAIL PROTECTED]  wrote:


If I modify the PageMap.java like this:

final Page get(final int id, int versionNumber)
{
final IPageMapEntry entry =
(IPageMapEntry)session.getAttribute(attributeForId(id));
if (entry != null)
{
 if (versionNumber == -1) {
Access a = peekAccess();
if (a.getId() != id)
return null;
 }

So this kludgery piece of the code checks that if request is coming from
ajax
(ie. versionNumber == -1) and the topmost page is not the one being
requested
- return null.

After adding this it looks like I cannot reproduce the problem any more.

Ari S.

- Original Message -
From: Johan Compagner [EMAIL PROTECTED]
To:  wicket-user@lists.sourceforge.net
Sent: Monday, May 22, 2006 2:37 PM
Subject: Re: [Wicket-user] pagemap problem with late arriving ajax request


So what request comes first?
The ajax request should always do -1 (so latest release)
So if the request from the new page did come first then the ajax request
shouild work on that new page.
If the ajax request did come a bit earlier then there shouldn't be a
problem
at all because
the last reqest will be the normal link click for a new page.

johan


On 5/22/06, Ari Suutari [EMAIL PROTECTED] wrote:

 I cannot figure out any workaround myself. UnversionedBehaviorListener
 seems to use -1 as
 page version number, would it make any sense to try to alter PageMap so
 that
 if version is -1 the page stack is not cleared ?

 Ari S.

 - Original Message -
 From: Matej Knopp [EMAIL PROTECTED]
 To: wicket-user@lists.sourceforge.net
 Sent: Monday, May 22, 2006 11:44 AM
 Subject: Re: [Wicket-user] pagemap problem with late arriving ajax
request


 I guess this is because in 1.2 pagemap behaves like stack. Johan?
 
  -Matej
 
  Ari Suutari wrote:
  Hi,
 
  I'm having a problem with wicket's ajax stuff where an ajax request
  fired by previous page hits the web server after user has clicked a
 link
  which has already transferred him to next page.
 
  This might be a problem in my application, but I'm seeking for ideas
  to solve this.
 
  From web server's access log:
 
  First there are some normal ajax requests arriving from browser:
 
  192.168.5.102 - - [22/May/2006:07:46:43 +] GET
 

/wicket?wicket:interface=:0:uiPanel:viewPanel:normalView:panels:0:panel:listTableSpan:-1:IUnversionedBehaviorListenerwicket:behaviorId=0random=

 0.35930677427195573
  HTTP/1.1 200 824
  192.168.5.102 - - [22/May/2006:07:46:43 +] GET
 

/wicket?wicket:interface=:0:uiPanel:viewPanel:normalView:panels:0:panel:listTableSpan:-1:IUnversionedBehaviorListenerwicket:behaviorId=0random=

 0.11935459751117722
  HTTP/1.1 200 824
 
  Here, user clicks a link which transfers application to help page, it
 is displayed ok.
 
  192.168.5.102 - - [22/May/2006:07:46:43 +] GET
 /wicket?wicket:interface=:0:uiPanel:topPanel:showHelp:34:ILinkListener
  HTTP/1.1 302 -
  192.168.5.102 - - [22/May/2006:07:46:43 +] GET
 /wicket?wicket:interface=:34:: HTTP/1.1 200 3191
 
  Now, for some reason a ajax request arrives from previous page, which

 causes to pagemap stack to be
  popped so the page user's browser is on is removed from page map.
 
  192.168.5.102 - - [22/May/2006:07:46:43 +] GET
 

/wicket?wicket:interface=:0:uiPanel:viewPanel:normalView:panels:0:panel:listTableSpan:-1:IUnversionedBehaviorListenerwicket:behaviorId=0random=
 0.2873453536331084
  HTTP/1.1 200 824
 
  Now, user presses a link on the page but gets 'page expired' message,
 because the page
  is no longer in pagemap.
 
  192.168.5.102 - - [22/May/2006:07:46:44 +] GET
 /wicket?wicket:interface=:34:back::ILinkListener HTTP/1.1 404 651
 
  Any ideas what I could do to fix this ? The ajax requests are fired
 asynchronously by a system which is very
  similar to AjaxSelfUpdatingTimerBehaviour stuff.
 
 Ari S.
 
 
 
  ---
  Using Tomcat but need to do more? Need to support web services,
 security?
  Get stuff done quickly with pre-integrated technology to make your
job
 easier
  Download IBM WebSphere Application Server v.1.0.1 based on Apache
 Geronimo
 
 http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642

  ___
  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net
  https

Re: [Wicket-user] pagemap problem with late arriving ajax request

2006-05-23 Thread Johan Compagner
best thing todo currently is to have that -1 check in the pagemap and make your own version of wicket 1.2 I guess to fix it for the AccessStackPageMap (2.0 name) is to have ajax request always check the active 
page first and only do its job when it is the right one. But this is i think pretty tricky to do because we needto synchronize around the right places again.in trunk (2.0) this is already fixed in the default setting because we refactored the pagemap
and have now a different default pagemap and httpsessionstore.johanOn 5/23/06, Ari Suutari 
[EMAIL PROTECTED] wrote:Hi,It is very important for us to get this fixed, preferably for 
1.2.If any wicket committer is willing to help us, we will payfor the work (please contact me directly by e-mail for this).Ari S.- Original Message -From: Igor Vaynberg 
[EMAIL PROTECTED]To: wicket-user@lists.sourceforge.netSent: Monday, May 22, 2006 6:21 PMSubject: Re: [Wicket-user] pagemap problem with late arriving ajax request
problem is, not every ajax behavior uses version -1. i guess we need to havethe ability to tag a request as process-only-if-page-is-active-IgorOn 5/22/06, Ari Suutari 
[EMAIL PROTECTED]  wrote: If I modify the PageMap.java like this: final Page get(final int id, int versionNumber) { final IPageMapEntry entry = (IPageMapEntry)session.getAttribute(attributeForId(id));
 if (entry != null) {if (versionNumber == -1) { Access a = peekAccess(); if (a.getId() != id) return null;
} So this kludgery piece of the code checks that if request is coming from ajax (ie. versionNumber == -1) and the topmost page is not the one being requested - return null.
 After adding this it looks like I cannot reproduce the problem any more. Ari S. - Original Message - From: Johan Compagner 
[EMAIL PROTECTED] To:  wicket-user@lists.sourceforge.net Sent: Monday, May 22, 2006 2:37 PM Subject: Re: [Wicket-user] pagemap problem with late arriving ajax request
 So what request comes first? The ajax request should always do -1 (so latest release) So if the request from the new page did come first then the ajax request shouild work on that new page.
 If the ajax request did come a bit earlier then there shouldn't be a problem at all because the last reqest will be the normal link click for a new page. johan
 On 5/22/06, Ari Suutari [EMAIL PROTECTED] wrote:   I cannot figure out any workaround myself. UnversionedBehaviorListener
  seems to use -1 as  page version number, would it make any sense to try to alter PageMap so  that  if version is -1 the page stack is not cleared ?   Ari S.
   - Original Message -  From: Matej Knopp [EMAIL PROTECTED]  To: 
wicket-user@lists.sourceforge.net  Sent: Monday, May 22, 2006 11:44 AM  Subject: Re: [Wicket-user] pagemap problem with late arriving ajax requestI guess this is because in 
1.2 pagemap behaves like stack. Johan? -Matej Ari Suutari wrote:   Hi, I'm having a problem with wicket's ajax stuff where an ajax request
   fired by previous page hits the web server after user has clicked a  link   which has already transferred him to next page. This might be a problem in my application, but I'm seeking for ideas
   to solve this. From web server's access log: First there are some normal ajax requests arriving from browser:
 192.168.5.102 - - [22/May/2006:07:46:43 +] GET/wicket?wicket:interface=:0:uiPanel:viewPanel:normalView:panels:0:panel:listTableSpan:-1:IUnversionedBehaviorListenerwicket:behaviorId=0random=
  0.35930677427195573   HTTP/1.1 200 824   192.168.5.102 - - [22/May/2006:07:46:43 +] GET  
  /wicket?wicket:interface=:0:uiPanel:viewPanel:normalView:panels:0:panel:listTableSpan:-1:IUnversionedBehaviorListenerwicket:behaviorId=0random=  0.11935459751117722   HTTP/1.1 200 824
 Here, user clicks a link which transfers application to help page, it  is displayed ok. 192.168.5.102
 - - [22/May/2006:07:46:43 +] GET  /wicket?wicket:interface=:0:uiPanel:topPanel:showHelp:34:ILinkListener   HTTP/1.1 302 -   
192.168.5.102 - - [22/May/2006:07:46:43 +] GET  /wicket?wicket:interface=:34:: HTTP/1.1 200 3191 Now, for some reason a ajax request arrives from previous page, which
  causes to pagemap stack to be   popped so the page user's browser is on is removed from page map. 192.168.5.102
 - - [22/May/2006:07:46:43 +] GET/wicket?wicket:interface=:0:uiPanel:viewPanel:normalView:panels:0:panel:listTableSpan:-1:IUnversionedBehaviorListenerwicket:behaviorId=0random=
  0.2873453536331084   HTTP/1.1 200 824 Now, user presses a link on the page but gets 'page expired' message,  because the page
   is no longer in pagemap. 192.168.5.102 - - [22/May/2006:07:46:44 +] GET  /wicket?wicket:interface=:34:back::ILinkListener HTTP/1.1 404 651
 Any ideas what I could do to fix this ? The ajax requests are fired  asynchronously by a system which is very   similar to AjaxSelfUpdatingTimerBehaviour stuff.
Ari S

Re: [Wicket-user] pagemap problem with late arriving ajax request

2006-05-23 Thread Ari Suutari

Hi,


best thing todo currently is to have that -1 check in the pagemap and make
your own version of wicket 1.2


   We already decided to put my modified version to production and
   if there are no side effects from my change we can keep it for some time.


in trunk (2.0) this is already fixed in the default setting because we
refactored the pagemap
and have now a different default pagemap and httpsessionstore.


   You mean that if I would use 2.0 from trunk the problem would go
   away ? If so, would it be possible to back-port the new pagemap
   to 1.2 branch ? Not as default, but something that I could turn on from
   application settings ?

   Another point: when 1.2 is released, someone else might also
   hit this problem so it might be necessary to implement some kind
   of fix anyway (at least for us, some pages were almost unusable
   because of this as other pages worked quite ok - it seems that YMMV).

   Ari S.

On 5/23/06, Ari Suutari [EMAIL PROTECTED] wrote:


Hi,

It is very important for us to get this fixed, preferably for 1.2.
If any wicket committer is willing to help us, we will pay
for the work (please contact me directly by e-mail for this).

Ari S.

- Original Message -
From: Igor Vaynberg [EMAIL PROTECTED]
To: wicket-user@lists.sourceforge.net
Sent: Monday, May 22, 2006 6:21 PM
Subject: Re: [Wicket-user] pagemap problem with late arriving ajax request


problem is, not every ajax behavior uses version -1. i guess we need to
have
the ability to tag a request as process-only-if-page-is-active

-Igor


On 5/22/06, Ari Suutari [EMAIL PROTECTED]  wrote:

 If I modify the PageMap.java like this:

 final Page get(final int id, int versionNumber)
 {
 final IPageMapEntry entry =
 (IPageMapEntry)session.getAttribute(attributeForId(id));
 if (entry != null)
 {
  if (versionNumber == -1) {
 Access a = peekAccess();
 if (a.getId() != id)
 return null;
  }

 So this kludgery piece of the code checks that if request is coming from
 ajax
 (ie. versionNumber == -1) and the topmost page is not the one being
 requested
 - return null.

 After adding this it looks like I cannot reproduce the problem any more.

 Ari S.

 - Original Message -
 From: Johan Compagner [EMAIL PROTECTED]
 To:  wicket-user@lists.sourceforge.net
 Sent: Monday, May 22, 2006 2:37 PM
 Subject: Re: [Wicket-user] pagemap problem with late arriving ajax
request


 So what request comes first?
 The ajax request should always do -1 (so latest release)
 So if the request from the new page did come first then the ajax request
 shouild work on that new page.
 If the ajax request did come a bit earlier then there shouldn't be a
 problem
 at all because
 the last reqest will be the normal link click for a new page.

 johan


 On 5/22/06, Ari Suutari [EMAIL PROTECTED] wrote:
 
  I cannot figure out any workaround myself. UnversionedBehaviorListener
  seems to use -1 as
  page version number, would it make any sense to try to alter PageMap
so
  that
  if version is -1 the page stack is not cleared ?
 
  Ari S.
 
  - Original Message -
  From: Matej Knopp [EMAIL PROTECTED]
  To: wicket-user@lists.sourceforge.net
  Sent: Monday, May 22, 2006 11:44 AM
  Subject: Re: [Wicket-user] pagemap problem with late arriving ajax
 request
 
 
  I guess this is because in 1.2 pagemap behaves like stack. Johan?
  
   -Matej
  
   Ari Suutari wrote:
   Hi,
  
   I'm having a problem with wicket's ajax stuff where an ajax request
   fired by previous page hits the web server after user has clicked a
  link
   which has already transferred him to next page.
  
   This might be a problem in my application, but I'm seeking for
ideas
   to solve this.
  
   From web server's access log:
  
   First there are some normal ajax requests arriving from browser:
  
   192.168.5.102 - - [22/May/2006:07:46:43 +] GET
  
 

/wicket?wicket:interface=:0:uiPanel:viewPanel:normalView:panels:0:panel:listTableSpan:-1:IUnversionedBehaviorListenerwicket:behaviorId=0random=

  0.35930677427195573
   HTTP/1.1 200 824
   192.168.5.102 - - [22/May/2006:07:46:43 +] GET
  
 

/wicket?wicket:interface=:0:uiPanel:viewPanel:normalView:panels:0:panel:listTableSpan:-1:IUnversionedBehaviorListenerwicket:behaviorId=0random=

  0.11935459751117722
   HTTP/1.1 200 824
  
   Here, user clicks a link which transfers application to help page,
it
  is displayed ok.
  
   192.168.5.102 - - [22/May/2006:07:46:43 +] GET
  /wicket?wicket:interface=:0:uiPanel:topPanel:showHelp:34:ILinkListener
   HTTP/1.1 302 -
   192.168.5.102 - - [22/May/2006:07:46:43 +] GET
  /wicket?wicket:interface=:34:: HTTP/1.1 200 3191
  
   Now, for some reason a ajax request arrives from previous page,
which

  causes to pagemap stack to be
   popped so the page user's browser is on is removed from page map.
  
   192.168.5.102 - - [22/May/2006:07:46:43 +] GET
  
 

/wicket

Re: [Wicket-user] pagemap problem with late arriving ajax request

2006-05-23 Thread Johan Compagner
We will fix it in the 1.2 branch.I am currently a bit full of work for at least 2 days. So i can only look at it by the end of this week.johanOn 5/23/06, 
Ari Suutari [EMAIL PROTECTED] wrote:
Hi,best thing todo currently is to have that -1 check in the pagemap and makeyour own version of wicket 1.2We already decided to put my modified version to production andif there are no side effects from my change we can keep it for some time.
in trunk (2.0) this is already fixed in the default setting because werefactored the pagemapand have now a different default pagemap and httpsessionstore.You mean that if I would use 
2.0 from trunk the problem would goaway ? If so, would it be possible to back-port the new pagemapto 1.2 branch ? Not as default, but something that I could turn on fromapplication settings ?
Another point: when 1.2 is released, someone else might alsohit this problem so it might be necessary to implement some kindof fix anyway (at least for us, some pages were almost unusablebecause of this as other pages worked quite ok - it seems that YMMV).
Ari S.On 5/23/06, Ari Suutari [EMAIL PROTECTED] wrote: Hi, It is very important for us to get this fixed, preferably for 
1.2. If any wicket committer is willing to help us, we will pay for the work (please contact me directly by e-mail for this). Ari S. - Original Message - From: Igor Vaynberg 
[EMAIL PROTECTED] To: wicket-user@lists.sourceforge.net Sent: Monday, May 22, 2006 6:21 PM
 Subject: Re: [Wicket-user] pagemap problem with late arriving ajax request problem is, not every ajax behavior uses version -1. i guess we need to have the ability to tag a request as process-only-if-page-is-active
 -Igor On 5/22/06, Ari Suutari [EMAIL PROTECTED]  wrote:   If I modify the PageMap.java like this:
   final Page get(final int id, int versionNumber)  {  final IPageMapEntry entry =  (IPageMapEntry)session.getAttribute(attributeForId(id));  if (entry != null)
  { if (versionNumber == -1) {  Access a = peekAccess();  if (a.getId() != id)  return null;
 }   So this kludgery piece of the code checks that if request is coming from  ajax  (ie. versionNumber == -1) and the topmost page is not the one being
  requested  - return null.   After adding this it looks like I cannot reproduce the problem any more.   Ari S.   - Original Message -
  From: Johan Compagner [EMAIL PROTECTED]  To:  wicket-user@lists.sourceforge.net
  Sent: Monday, May 22, 2006 2:37 PM  Subject: Re: [Wicket-user] pagemap problem with late arriving ajax requestSo what request comes first?
  The ajax request should always do -1 (so latest release)  So if the request from the new page did come first then the ajax request  shouild work on that new page.  If the ajax request did come a bit earlier then there shouldn't be a
  problem  at all because  the last reqest will be the normal link click for a new page.   johanOn 5/22/06, Ari Suutari 
[EMAIL PROTECTED] wrote: I cannot figure out any workaround myself. UnversionedBehaviorListener   seems to use -1 as
   page version number, would it make any sense to try to alter PageMap so   that   if version is -1 the page stack is not cleared ? Ari S.
 - Original Message -   From: Matej Knopp [EMAIL PROTECTED]   To: 
wicket-user@lists.sourceforge.net   Sent: Monday, May 22, 2006 11:44 AM   Subject: Re: [Wicket-user] pagemap problem with late arriving ajax  request  
 I guess this is because in 1.2 pagemap behaves like stack. Johan?   -Matej   Ari Suutari wrote:
Hi,   I'm having a problem with wicket's ajax stuff where an ajax requestfired by previous page hits the web server after user has clicked a
   linkwhich has already transferred him to next page.   This might be a problem in my application, but I'm seeking for ideas
to solve this.   From web server's access log:   First there are some normal ajax requests arriving from browser:
   192.168.5.102 - - [22/May/2006:07:46:43 +] GET   /wicket?wicket:interface=:0:uiPanel:viewPanel:normalView:panels:0:panel:listTableSpan:-1:IUnversionedBehaviorListenerwicket:behaviorId=0random=
0.35930677427195573HTTP/1.1 200 824192.168.5.102 - - [22/May/2006:07:46:43 +] GET
   /wicket?wicket:interface=:0:uiPanel:viewPanel:normalView:panels:0:panel:listTableSpan:-1:IUnversionedBehaviorListenerwicket:behaviorId=0random= 
   0.11935459751117722HTTP/1.1 200 824   Here, user clicks a link which transfers application to help page, it
   is displayed ok.   192.168.5.102 - - [22/May/2006:07:46:43 +] GET   /wicket?wicket:interface=:0:uiPanel:topPanel:showHelp:34:ILinkListener
HTTP/1.1 302 -192.168.5.102 - - [22/May/2006:07:46:43 +] GET   /wicket?wicket:interface=:34:: HTTP/1.1 200 3191
   Now, for some reason a ajax request arrives from previous page, whichcauses to pagemap stack to bepopped so the page user's browser is on is removed from page map.
   192.168.5.102 - - [22/May

Re: [Wicket-user] pagemap problem with late arriving ajax request

2006-05-23 Thread Ari Suutari

This is so great !

   TIA,

   Ari S.

- Original Message - 
From: Johan Compagner [EMAIL PROTECTED]

To: wicket-user@lists.sourceforge.net
Sent: Tuesday, May 23, 2006 11:37 AM
Subject: Re: [Wicket-user] pagemap problem with late arriving ajax request


We will fix it in the 1.2 branch.

I am currently a bit full of work for at least 2 days. So i can only look at
it by the end of this week.

johan


On 5/23/06, Ari Suutari [EMAIL PROTECTED] wrote:


Hi,

best thing todo currently is to have that -1 check in the pagemap and
make
your own version of wicket 1.2

We already decided to put my modified version to production and
if there are no side effects from my change we can keep it for some
time.

in trunk (2.0) this is already fixed in the default setting because we
refactored the pagemap
and have now a different default pagemap and httpsessionstore.

You mean that if I would use 2.0 from trunk the problem would go
away ? If so, would it be possible to back-port the new pagemap
to 1.2 branch ? Not as default, but something that I could turn on
from
application settings ?

Another point: when 1.2 is released, someone else might also
hit this problem so it might be necessary to implement some kind
of fix anyway (at least for us, some pages were almost unusable
because of this as other pages worked quite ok - it seems that YMMV).

Ari S.

On 5/23/06, Ari Suutari [EMAIL PROTECTED] wrote:

 Hi,

 It is very important for us to get this fixed, preferably for 1.2.
 If any wicket committer is willing to help us, we will pay
 for the work (please contact me directly by e-mail for this).

 Ari S.

 - Original Message -
 From: Igor Vaynberg [EMAIL PROTECTED]
 To: wicket-user@lists.sourceforge.net
 Sent: Monday, May 22, 2006 6:21 PM
 Subject: Re: [Wicket-user] pagemap problem with late arriving ajax
request


 problem is, not every ajax behavior uses version -1. i guess we need to
 have
 the ability to tag a request as process-only-if-page-is-active

 -Igor


 On 5/22/06, Ari Suutari [EMAIL PROTECTED]  wrote:
 
  If I modify the PageMap.java like this:
 
  final Page get(final int id, int versionNumber)
  {
  final IPageMapEntry entry =
  (IPageMapEntry)session.getAttribute(attributeForId(id));
  if (entry != null)
  {
   if (versionNumber == -1) {
  Access a = peekAccess();
  if (a.getId() != id)
  return null;
   }
 
  So this kludgery piece of the code checks that if request is coming
from
  ajax
  (ie. versionNumber == -1) and the topmost page is not the one being
  requested
  - return null.
 
  After adding this it looks like I cannot reproduce the problem any
more.
 
  Ari S.
 
  - Original Message -
  From: Johan Compagner [EMAIL PROTECTED]
  To:  wicket-user@lists.sourceforge.net
  Sent: Monday, May 22, 2006 2:37 PM
  Subject: Re: [Wicket-user] pagemap problem with late arriving ajax
 request
 
 
  So what request comes first?
  The ajax request should always do -1 (so latest release)
  So if the request from the new page did come first then the ajax
request
  shouild work on that new page.
  If the ajax request did come a bit earlier then there shouldn't be a
  problem
  at all because
  the last reqest will be the normal link click for a new page.
 
  johan
 
 
  On 5/22/06, Ari Suutari [EMAIL PROTECTED] wrote:
  
   I cannot figure out any workaround myself.
UnversionedBehaviorListener
   seems to use -1 as
   page version number, would it make any sense to try to alter PageMap
 so
   that
   if version is -1 the page stack is not cleared ?
  
   Ari S.
  
   - Original Message -
   From: Matej Knopp [EMAIL PROTECTED]
   To: wicket-user@lists.sourceforge.net
   Sent: Monday, May 22, 2006 11:44 AM
   Subject: Re: [Wicket-user] pagemap problem with late arriving ajax
  request
  
  
   I guess this is because in 1.2 pagemap behaves like stack. Johan?
   
-Matej
   
Ari Suutari wrote:
Hi,
   
I'm having a problem with wicket's ajax stuff where an ajax
request
fired by previous page hits the web server after user has clicked
a
   link
which has already transferred him to next page.
   
This might be a problem in my application, but I'm seeking for
 ideas
to solve this.
   
From web server's access log:
   
First there are some normal ajax requests arriving from browser:
   
192.168.5.102 - - [22/May/2006:07:46:43 +] GET
   
  
 

/wicket?wicket:interface=:0:uiPanel:viewPanel:normalView:panels:0:panel:listTableSpan:-1:IUnversionedBehaviorListenerwicket:behaviorId=0random=
 
   0.35930677427195573
HTTP/1.1 200 824
192.168.5.102 - - [22/May/2006:07:46:43 +] GET
   
  
 

/wicket?wicket:interface=:0:uiPanel:viewPanel:normalView:panels:0:panel:listTableSpan:-1:IUnversionedBehaviorListenerwicket:behaviorId=0random=
 
   0.11935459751117722
HTTP/1.1 200 824
   
Here, user

Re: [Wicket-user] pagemap problem with late arriving ajax request

2006-05-23 Thread Igor Vaynberg
i got up extra early to take care of this, so by the end of the day

-igorOn 5/23/06, Ari Suutari [EMAIL PROTECTED] wrote:
This is so great !TIA,Ari S.- Original Message -From: Johan Compagner [EMAIL PROTECTED]To: 
wicket-user@lists.sourceforge.netSent: Tuesday, May 23, 2006 11:37 AMSubject: Re: [Wicket-user] pagemap problem with late arriving ajax requestWe will fix it in the 1.2 branch.I am currently a bit full of work for at least 2 days. So i can only look at
it by the end of this week.johanOn 5/23/06, Ari Suutari [EMAIL PROTECTED] wrote: Hi, best thing todo currently is to have that -1 check in the pagemap and
 make your own version of wicket 1.2 We already decided to put my modified version to production and if there are no side effects from my change we can keep it for some
 time. in trunk (2.0) this is already fixed in the default setting because we refactored the pagemap and have now a different default pagemap and httpsessionstore.
 You mean that if I would use 2.0 from trunk the problem would go away ? If so, would it be possible to back-port the new pagemap to 1.2 branch ? Not as default, but something that I could turn on
 from application settings ? Another point: when 1.2 is released, someone else might also hit this problem so it might be necessary to implement some kind of fix anyway (at least for us, some pages were almost unusable
 because of this as other pages worked quite ok - it seems that YMMV). Ari S. On 5/23/06, Ari Suutari [EMAIL PROTECTED]
 wrote:   Hi,   It is very important for us to get this fixed, preferably for 1.2.  If any wicket committer is willing to help us, we will pay  for the work (please contact me directly by e-mail for this).
   Ari S.   - Original Message -  From: Igor Vaynberg [EMAIL PROTECTED]  To: 
wicket-user@lists.sourceforge.net  Sent: Monday, May 22, 2006 6:21 PM  Subject: Re: [Wicket-user] pagemap problem with late arriving ajax
 requestproblem is, not every ajax behavior uses version -1. i guess we need to  have  the ability to tag a request as process-only-if-page-is-active
   -IgorOn 5/22/06, Ari Suutari [EMAIL PROTECTED]  wrote: If I modify the 
PageMap.java like this: final Page get(final int id, int versionNumber)   {   final IPageMapEntry entry =   (IPageMapEntry)session.getAttribute(attributeForId(id));
   if (entry != null)   {  if (versionNumber == -1) {


Access a = peekAccess(); 

if (a.getId() != id) 

return null;  } So this kludgery piece of the code checks that if request is coming from   ajax   (ie. versionNumber == -1) and the topmost page is not the one being
   requested   - return null. After adding this it looks like I cannot reproduce the problem any more. Ari S.
 - Original Message -   From: Johan Compagner [EMAIL PROTECTED]   To:  
wicket-user@lists.sourceforge.net   Sent: Monday, May 22, 2006 2:37 PM   Subject: Re: [Wicket-user] pagemap problem with late arriving ajax  request  
 So what request comes first?   The ajax request should always do -1 (so latest release)   So if the request from the new page did come first then the ajax
 request   shouild work on that new page.   If the ajax request did come a bit earlier then there shouldn't be a   problem   at all because   the last reqest will be the normal link click for a new page.
 johan   On 5/22/06, Ari Suutari [EMAIL PROTECTED] wrote:   
I cannot figure out any workaround myself. UnversionedBehaviorListenerseems to use -1 aspage version number, would it make any sense to try to alter PageMap
  sothatif version is -1 the page stack is not cleared ?   Ari S.   - Original Message -
From: Matej Knopp [EMAIL PROTECTED]To: wicket-user@lists.sourceforge.net
Sent: Monday, May 22, 2006 11:44 AMSubject: Re: [Wicket-user] pagemap problem with late arriving ajax   request  
I guess this is because in 1.2 pagemap behaves like stack. Johan? -Matej Ari Suutari wrote:
 Hi, I'm having a problem with wicket's ajax stuff where an ajax request fired by previous page hits the web server after user has clicked
 alink which has already transferred him to next page. This might be a problem in my application, but I'm seeking for
  ideas to solve this. From web server's access log: First there are some normal ajax requests arriving from browser:
 192.168.5.102 - - [22/May/2006:07:46:43 +] GET 
  /wicket?wicket:interface=:0:uiPanel:viewPanel:normalView:panels:0:panel:listTableSpan:-1:IUnversionedBehaviorListenerwicket:behaviorId=0random=  0.35930677427195573
 HTTP/1.1 200 824 192.168.5.102 - - [22/May/2006:07:46:43 +] GET   
/wicket?wicket:interface=:0:uiPanel:viewPanel:normalView:panels:0:panel:listTableSpan:-1:IUnversionedBehaviorListenerwicket:behaviorId=0random=  
0.11935459751117722 HTTP/1.1 200 824 Here, user clicks a link which transfers

Re: [Wicket-user] pagemap problem with late arriving ajax request

2006-05-23 Thread Igor Vaynberg
yeah yeah, i get to do maintenance while you get to do all the fun stuff in the trunk you bastard!-IgorOn 5/23/06, Johan Compagner 
[EMAIL PROTECTED] wrote:Go Igor Go!
On 5/23/06, Igor Vaynberg [EMAIL PROTECTED]
 wrote:
i got up extra early to take care of this, so by the end of the day

-igorOn 5/23/06, Ari Suutari 

[EMAIL PROTECTED] wrote:
This is so great !TIA,Ari S.- Original Message -From: Johan Compagner 

[EMAIL PROTECTED]To: 
wicket-user@lists.sourceforge.netSent: Tuesday, May 23, 2006 11:37 AMSubject: Re: [Wicket-user] pagemap problem with late arriving ajax requestWe will fix it in the 1.2 branch.I am currently a bit full of work for at least 2 days. So i can only look at
it by the end of this week.johanOn 5/23/06, Ari Suutari [EMAIL PROTECTED]
 wrote: Hi, best thing todo currently is to have that -1 check in the pagemap and
 make your own version of wicket 1.2 We already decided to put my modified version to production and if there are no side effects from my change we can keep it for some

 time. in trunk (2.0) this is already fixed in the default setting because we refactored the pagemap and have now a different default pagemap and httpsessionstore.


 You mean that if I would use 2.0 from trunk the problem would go away ? If so, would it be possible to back-port the new pagemap to 1.2 branch ? Not as default, but something that I could turn on
 from application settings ? Another point: when 1.2 is released, someone else might also hit this problem so it might be necessary to implement some kind of fix anyway (at least for us, some pages were almost unusable
 because of this as other pages worked quite ok - it seems that YMMV). Ari S. On 5/23/06, Ari Suutari 

[EMAIL PROTECTED]
 wrote:   Hi,   It is very important for us to get this fixed, preferably for 1.2.  If any wicket committer is willing to help us, we will pay  for the work (please contact me directly by e-mail for this).
   Ari S.   - Original Message -  From: Igor Vaynberg 

[EMAIL PROTECTED]  To: 
wicket-user@lists.sourceforge.net  Sent: Monday, May 22, 2006 6:21 PM  Subject: Re: [Wicket-user] pagemap problem with late arriving ajax

 requestproblem is, not every ajax behavior uses version -1. i guess we need to  have  the ability to tag a request as process-only-if-page-is-active


   -IgorOn 5/22/06, Ari Suutari [EMAIL PROTECTED]
  wrote: If I modify the 
PageMap.java like this: final Page get(final int id, int versionNumber)   {   final IPageMapEntry entry =   (IPageMapEntry)session.getAttribute(attributeForId(id));
   if (entry != null)   {  if (versionNumber == -1) {


Access a = peekAccess(); 

if (a.getId() != id) 

return null;  } So this kludgery piece of the code checks that if request is coming from   ajax   (ie. versionNumber == -1) and the topmost page is not the one being
   requested   - return null. After adding this it looks like I cannot reproduce the problem any more. Ari S.
 - Original Message -   From: Johan Compagner 

[EMAIL PROTECTED]   To:  
wicket-user@lists.sourceforge.net   Sent: Monday, May 22, 2006 2:37 PM   Subject: Re: [Wicket-user] pagemap problem with late arriving ajax  request  


 So what request comes first?   The ajax request should always do -1 (so latest release)   So if the request from the new page did come first then the ajax


 request   shouild work on that new page.   If the ajax request did come a bit earlier then there shouldn't be a   problem   at all because   the last reqest will be the normal link click for a new page.
 johan   On 5/22/06, Ari Suutari 

[EMAIL PROTECTED] wrote:   
I cannot figure out any workaround myself. UnversionedBehaviorListenerseems to use -1 aspage version number, would it make any sense to try to alter PageMap
  sothatif version is -1 the page stack is not cleared ?   Ari S.   - Original Message -
From: Matej Knopp [EMAIL PROTECTED]To: 

wicket-user@lists.sourceforge.net
Sent: Monday, May 22, 2006 11:44 AMSubject: Re: [Wicket-user] pagemap problem with late arriving ajax   request  
I guess this is because in 1.2 pagemap behaves like stack. Johan? -Matej Ari Suutari wrote:
 Hi, I'm having a problem with wicket's ajax stuff where an ajax request fired by previous page hits the web server after user has clicked
 alink which has already transferred him to next page. This might be a problem in my application, but I'm seeking for
  ideas to solve this. From web server's access log: First there are some normal ajax requests arriving from browser:
 192.168.5.102 - - [22/May/2006:07:46:43 +] GET
 
  /wicket?wicket:interface=:0:uiPanel:viewPanel:normalView:panels:0:panel:listTableSpan:-1:IUnversionedBehaviorListenerwicket:behaviorId=0random=  0.35930677427195573


 HTTP/1.1 200 824 192.168.5.102 - - [22/May/2006:07:46:43 +] GET

Re: [Wicket-user] pagemap problem with late arriving ajax request

2006-05-23 Thread Johan Compagner
Go Igor Go!On 5/23/06, Igor Vaynberg [EMAIL PROTECTED] wrote:
i got up extra early to take care of this, so by the end of the day

-igorOn 5/23/06, Ari Suutari 
[EMAIL PROTECTED] wrote:
This is so great !TIA,Ari S.- Original Message -From: Johan Compagner 
[EMAIL PROTECTED]To: 
wicket-user@lists.sourceforge.netSent: Tuesday, May 23, 2006 11:37 AMSubject: Re: [Wicket-user] pagemap problem with late arriving ajax requestWe will fix it in the 1.2 branch.I am currently a bit full of work for at least 2 days. So i can only look at
it by the end of this week.johanOn 5/23/06, Ari Suutari [EMAIL PROTECTED]
 wrote: Hi, best thing todo currently is to have that -1 check in the pagemap and
 make your own version of wicket 1.2 We already decided to put my modified version to production and if there are no side effects from my change we can keep it for some

 time. in trunk (2.0) this is already fixed in the default setting because we refactored the pagemap and have now a different default pagemap and httpsessionstore.

 You mean that if I would use 2.0 from trunk the problem would go away ? If so, would it be possible to back-port the new pagemap to 1.2 branch ? Not as default, but something that I could turn on
 from application settings ? Another point: when 1.2 is released, someone else might also hit this problem so it might be necessary to implement some kind of fix anyway (at least for us, some pages were almost unusable
 because of this as other pages worked quite ok - it seems that YMMV). Ari S. On 5/23/06, Ari Suutari 
[EMAIL PROTECTED]
 wrote:   Hi,   It is very important for us to get this fixed, preferably for 1.2.  If any wicket committer is willing to help us, we will pay  for the work (please contact me directly by e-mail for this).
   Ari S.   - Original Message -  From: Igor Vaynberg 
[EMAIL PROTECTED]  To: 
wicket-user@lists.sourceforge.net  Sent: Monday, May 22, 2006 6:21 PM  Subject: Re: [Wicket-user] pagemap problem with late arriving ajax

 requestproblem is, not every ajax behavior uses version -1. i guess we need to  have  the ability to tag a request as process-only-if-page-is-active

   -IgorOn 5/22/06, Ari Suutari [EMAIL PROTECTED]
  wrote: If I modify the 
PageMap.java like this: final Page get(final int id, int versionNumber)   {   final IPageMapEntry entry =   (IPageMapEntry)session.getAttribute(attributeForId(id));
   if (entry != null)   {  if (versionNumber == -1) {


Access a = peekAccess(); 

if (a.getId() != id) 

return null;  } So this kludgery piece of the code checks that if request is coming from   ajax   (ie. versionNumber == -1) and the topmost page is not the one being
   requested   - return null. After adding this it looks like I cannot reproduce the problem any more. Ari S.
 - Original Message -   From: Johan Compagner 
[EMAIL PROTECTED]   To:  
wicket-user@lists.sourceforge.net   Sent: Monday, May 22, 2006 2:37 PM   Subject: Re: [Wicket-user] pagemap problem with late arriving ajax  request  

 So what request comes first?   The ajax request should always do -1 (so latest release)   So if the request from the new page did come first then the ajax

 request   shouild work on that new page.   If the ajax request did come a bit earlier then there shouldn't be a   problem   at all because   the last reqest will be the normal link click for a new page.
 johan   On 5/22/06, Ari Suutari 
[EMAIL PROTECTED] wrote:   
I cannot figure out any workaround myself. UnversionedBehaviorListenerseems to use -1 aspage version number, would it make any sense to try to alter PageMap
  sothatif version is -1 the page stack is not cleared ?   Ari S.   - Original Message -
From: Matej Knopp [EMAIL PROTECTED]To: 
wicket-user@lists.sourceforge.net
Sent: Monday, May 22, 2006 11:44 AMSubject: Re: [Wicket-user] pagemap problem with late arriving ajax   request  
I guess this is because in 1.2 pagemap behaves like stack. Johan? -Matej Ari Suutari wrote:
 Hi, I'm having a problem with wicket's ajax stuff where an ajax request fired by previous page hits the web server after user has clicked
 alink which has already transferred him to next page. This might be a problem in my application, but I'm seeking for
  ideas to solve this. From web server's access log: First there are some normal ajax requests arriving from browser:
 192.168.5.102 - - [22/May/2006:07:46:43 +] GET
 
  /wicket?wicket:interface=:0:uiPanel:viewPanel:normalView:panels:0:panel:listTableSpan:-1:IUnversionedBehaviorListenerwicket:behaviorId=0random=  0.35930677427195573

 HTTP/1.1 200 824 192.168.5.102 - - [22/May/2006:07:46:43 +] GET
   
/wicket?wicket:interface=:0:uiPanel:viewPanel:normalView:panels:0:panel:listTableSpan:-1:IUnversionedBehaviorListenerwicket:behaviorId=0random

Re: [Wicket-user] pagemap problem with late arriving ajax request

2006-05-23 Thread Igor Vaynberg
ok here is my first pass. i cannot reproduce the problem, so i am kinda flying blind here - all i know for sure is that it compilesit seems to me that as soon as you change the page the browser dumps the old _javascript_, in my case looks like it also dumps any running ajax requests. i tried both ie and ffox.
i added a self upating counter that keeps updating every 1 sec and a link to go to another page, havent been able to catch the right timing i guessanyways, i am attaching the patch, let me know if it works for you and we can take it from here
-IgorOn 5/23/06, Igor Vaynberg [EMAIL PROTECTED] wrote:
i got up extra early to take care of this, so by the end of the day

-igorOn 5/23/06, Ari Suutari 
[EMAIL PROTECTED] wrote:
This is so great !TIA,Ari S.- Original Message -From: Johan Compagner 
[EMAIL PROTECTED]To: 
wicket-user@lists.sourceforge.netSent: Tuesday, May 23, 2006 11:37 AMSubject: Re: [Wicket-user] pagemap problem with late arriving ajax requestWe will fix it in the 1.2 branch.I am currently a bit full of work for at least 2 days. So i can only look at
it by the end of this week.johanOn 5/23/06, Ari Suutari [EMAIL PROTECTED]
 wrote: Hi, best thing todo currently is to have that -1 check in the pagemap and
 make your own version of wicket 1.2 We already decided to put my modified version to production and if there are no side effects from my change we can keep it for some

 time. in trunk (2.0) this is already fixed in the default setting because we refactored the pagemap and have now a different default pagemap and httpsessionstore.

 You mean that if I would use 2.0 from trunk the problem would go away ? If so, would it be possible to back-port the new pagemap to 1.2 branch ? Not as default, but something that I could turn on
 from application settings ? Another point: when 1.2 is released, someone else might also hit this problem so it might be necessary to implement some kind of fix anyway (at least for us, some pages were almost unusable
 because of this as other pages worked quite ok - it seems that YMMV). Ari S. On 5/23/06, Ari Suutari 
[EMAIL PROTECTED]
 wrote:   Hi,   It is very important for us to get this fixed, preferably for 1.2.  If any wicket committer is willing to help us, we will pay  for the work (please contact me directly by e-mail for this).
   Ari S.   - Original Message -  From: Igor Vaynberg 
[EMAIL PROTECTED]  To: 
wicket-user@lists.sourceforge.net  Sent: Monday, May 22, 2006 6:21 PM  Subject: Re: [Wicket-user] pagemap problem with late arriving ajax

 requestproblem is, not every ajax behavior uses version -1. i guess we need to  have  the ability to tag a request as process-only-if-page-is-active

   -IgorOn 5/22/06, Ari Suutari [EMAIL PROTECTED]
  wrote: If I modify the 
PageMap.java like this: final Page get(final int id, int versionNumber)   {   final IPageMapEntry entry =   (IPageMapEntry)session.getAttribute(attributeForId(id));
   if (entry != null)   {  if (versionNumber == -1) {


Access a = peekAccess(); 

if (a.getId() != id) 

return null;  } So this kludgery piece of the code checks that if request is coming from   ajax   (ie. versionNumber == -1) and the topmost page is not the one being
   requested   - return null. After adding this it looks like I cannot reproduce the problem any more. Ari S.
 - Original Message -   From: Johan Compagner 
[EMAIL PROTECTED]   To:  
wicket-user@lists.sourceforge.net   Sent: Monday, May 22, 2006 2:37 PM   Subject: Re: [Wicket-user] pagemap problem with late arriving ajax  request  

 So what request comes first?   The ajax request should always do -1 (so latest release)   So if the request from the new page did come first then the ajax

 request   shouild work on that new page.   If the ajax request did come a bit earlier then there shouldn't be a   problem   at all because   the last reqest will be the normal link click for a new page.
 johan   On 5/22/06, Ari Suutari 
[EMAIL PROTECTED] wrote:   
I cannot figure out any workaround myself. UnversionedBehaviorListenerseems to use -1 aspage version number, would it make any sense to try to alter PageMap
  sothatif version is -1 the page stack is not cleared ?   Ari S.   - Original Message -
From: Matej Knopp [EMAIL PROTECTED]To: 
wicket-user@lists.sourceforge.net
Sent: Monday, May 22, 2006 11:44 AMSubject: Re: [Wicket-user] pagemap problem with late arriving ajax   request  
I guess this is because in 1.2 pagemap behaves like stack. Johan? -Matej Ari Suutari wrote:
 Hi, I'm having a problem with wicket's ajax stuff where an ajax request fired by previous page hits the web server after user has clicked
 alink which has already transferred him to next page. This might be a problem in my application, but I'm seeking for
  ideas to solve this. From web server's access log: First

[Wicket-user] pagemap problem with late arriving ajax request

2006-05-22 Thread Ari Suutari

Hi,

I'm having a problem with wicket's ajax stuff where an ajax request
fired by previous page hits the web server after user has clicked a link
which has already transferred him to next page.

This might be a problem in my application, but I'm seeking for ideas
to solve this.


From web server's access log:


First there are some normal ajax requests arriving from browser:

192.168.5.102 - - [22/May/2006:07:46:43 +] GET 
/wicket?wicket:interface=:0:uiPanel:viewPanel:normalView:panels:0:panel:listTableSpan:-1:IUnversionedBehaviorListenerwicket:behaviorId=0random=0.35930677427195573 
HTTP/1.1 200 824
192.168.5.102 - - [22/May/2006:07:46:43 +] GET 
/wicket?wicket:interface=:0:uiPanel:viewPanel:normalView:panels:0:panel:listTableSpan:-1:IUnversionedBehaviorListenerwicket:behaviorId=0random=0.11935459751117722 
HTTP/1.1 200 824


Here, user clicks a link which transfers application to help page, it is 
displayed ok.

192.168.5.102 - - [22/May/2006:07:46:43 +] GET /wicket?wicket:interface=:0:uiPanel:topPanel:showHelp:34:ILinkListener HTTP/1.1 
302 -

192.168.5.102 - - [22/May/2006:07:46:43 +] GET /wicket?wicket:interface=:34:: 
HTTP/1.1 200 3191

Now, for some reason a ajax request arrives from previous page, which causes to 
pagemap stack to be
popped so the page user's browser is on is removed from page map.

192.168.5.102 - - [22/May/2006:07:46:43 +] GET 
/wicket?wicket:interface=:0:uiPanel:viewPanel:normalView:panels:0:panel:listTableSpan:-1:IUnversionedBehaviorListenerwicket:behaviorId=0random=0.2873453536331084 
HTTP/1.1 200 824


Now, user presses a link on the page but gets 'page expired' message, because 
the page
is no longer in pagemap.

192.168.5.102 - - [22/May/2006:07:46:44 +] GET 
/wicket?wicket:interface=:34:back::ILinkListener HTTP/1.1 404 651

Any ideas what I could do to fix this ? The ajax requests are fired 
asynchronously by a system which is very
similar to AjaxSelfUpdatingTimerBehaviour stuff.

   Ari S.



---
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] pagemap problem with late arriving ajax request

2006-05-22 Thread Matej Knopp

I guess this is because in 1.2 pagemap behaves like stack. Johan?

-Matej

Ari Suutari wrote:

Hi,

I'm having a problem with wicket's ajax stuff where an ajax request
fired by previous page hits the web server after user has clicked a link
which has already transferred him to next page.

This might be a problem in my application, but I'm seeking for ideas
to solve this.


From web server's access log:


First there are some normal ajax requests arriving from browser:

192.168.5.102 - - [22/May/2006:07:46:43 +] GET 
/wicket?wicket:interface=:0:uiPanel:viewPanel:normalView:panels:0:panel:listTableSpan:-1:IUnversionedBehaviorListenerwicket:behaviorId=0random=0.35930677427195573 
HTTP/1.1 200 824
192.168.5.102 - - [22/May/2006:07:46:43 +] GET 
/wicket?wicket:interface=:0:uiPanel:viewPanel:normalView:panels:0:panel:listTableSpan:-1:IUnversionedBehaviorListenerwicket:behaviorId=0random=0.11935459751117722 
HTTP/1.1 200 824


Here, user clicks a link which transfers application to help page, it is 
displayed ok.


192.168.5.102 - - [22/May/2006:07:46:43 +] GET 
/wicket?wicket:interface=:0:uiPanel:topPanel:showHelp:34:ILinkListener 
HTTP/1.1 302 -
192.168.5.102 - - [22/May/2006:07:46:43 +] GET 
/wicket?wicket:interface=:34:: HTTP/1.1 200 3191


Now, for some reason a ajax request arrives from previous page, which 
causes to pagemap stack to be

popped so the page user's browser is on is removed from page map.

192.168.5.102 - - [22/May/2006:07:46:43 +] GET 
/wicket?wicket:interface=:0:uiPanel:viewPanel:normalView:panels:0:panel:listTableSpan:-1:IUnversionedBehaviorListenerwicket:behaviorId=0random=0.2873453536331084 
HTTP/1.1 200 824


Now, user presses a link on the page but gets 'page expired' message, 
because the page

is no longer in pagemap.

192.168.5.102 - - [22/May/2006:07:46:44 +] GET 
/wicket?wicket:interface=:34:back::ILinkListener HTTP/1.1 404 651


Any ideas what I could do to fix this ? The ajax requests are fired 
asynchronously by a system which is very

similar to AjaxSelfUpdatingTimerBehaviour stuff.

   Ari S.



---
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job 
easier

Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user





---
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] pagemap problem with late arriving ajax request

2006-05-22 Thread Ari Suutari

I cannot figure out any workaround myself. UnversionedBehaviorListener seems to 
use -1 as
page version number, would it make any sense to try to alter PageMap so that
if version is -1 the page stack is not cleared ?

   Ari S.

- Original Message - 
From: Matej Knopp [EMAIL PROTECTED]

To: wicket-user@lists.sourceforge.net
Sent: Monday, May 22, 2006 11:44 AM
Subject: Re: [Wicket-user] pagemap problem with late arriving ajax request



I guess this is because in 1.2 pagemap behaves like stack. Johan?

-Matej

Ari Suutari wrote:

Hi,

I'm having a problem with wicket's ajax stuff where an ajax request
fired by previous page hits the web server after user has clicked a link
which has already transferred him to next page.

This might be a problem in my application, but I'm seeking for ideas
to solve this.


From web server's access log:


First there are some normal ajax requests arriving from browser:

192.168.5.102 - - [22/May/2006:07:46:43 +] GET 
/wicket?wicket:interface=:0:uiPanel:viewPanel:normalView:panels:0:panel:listTableSpan:-1:IUnversionedBehaviorListenerwicket:behaviorId=0random=0.35930677427195573 
HTTP/1.1 200 824
192.168.5.102 - - [22/May/2006:07:46:43 +] GET 
/wicket?wicket:interface=:0:uiPanel:viewPanel:normalView:panels:0:panel:listTableSpan:-1:IUnversionedBehaviorListenerwicket:behaviorId=0random=0.11935459751117722 
HTTP/1.1 200 824


Here, user clicks a link which transfers application to help page, it is 
displayed ok.

192.168.5.102 - - [22/May/2006:07:46:43 +] GET /wicket?wicket:interface=:0:uiPanel:topPanel:showHelp:34:ILinkListener 
HTTP/1.1 302 -

192.168.5.102 - - [22/May/2006:07:46:43 +] GET /wicket?wicket:interface=:34:: 
HTTP/1.1 200 3191

Now, for some reason a ajax request arrives from previous page, which causes to 
pagemap stack to be
popped so the page user's browser is on is removed from page map.

192.168.5.102 - - [22/May/2006:07:46:43 +] GET 
/wicket?wicket:interface=:0:uiPanel:viewPanel:normalView:panels:0:panel:listTableSpan:-1:IUnversionedBehaviorListenerwicket:behaviorId=0random=0.2873453536331084 
HTTP/1.1 200 824


Now, user presses a link on the page but gets 'page expired' message, because 
the page
is no longer in pagemap.

192.168.5.102 - - [22/May/2006:07:46:44 +] GET 
/wicket?wicket:interface=:34:back::ILinkListener HTTP/1.1 404 651

Any ideas what I could do to fix this ? The ajax requests are fired 
asynchronously by a system which is very
similar to AjaxSelfUpdatingTimerBehaviour stuff.

   Ari S.



---
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user





---
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user





---
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] pagemap problem with late arriving ajax request

2006-05-22 Thread Johan Compagner
So what request comes first?The ajax request should always do -1 (so latest release)So if the request from the new page did come first then the ajax request shouild work on that new page.If the ajax request did come a bit earlier then there shouldn't be a problem at all because
the last reqest will be the normal link click for a new page.johanOn 5/22/06, Ari Suutari 
[EMAIL PROTECTED] wrote:I cannot figure out any workaround myself. UnversionedBehaviorListener seems to use -1 as
page version number, would it make any sense to try to alter PageMap so thatif version is -1 the page stack is not cleared ?Ari S.- Original Message -From: Matej Knopp 
[EMAIL PROTECTED]To: wicket-user@lists.sourceforge.netSent: Monday, May 22, 2006 11:44 AMSubject: Re: [Wicket-user] pagemap problem with late arriving ajax request
I guess this is because in 1.2 pagemap behaves like stack. Johan? -Matej Ari Suutari wrote: Hi, I'm having a problem with wicket's ajax stuff where an ajax request
 fired by previous page hits the web server after user has clicked a link which has already transferred him to next page. This might be a problem in my application, but I'm seeking for ideas
 to solve this. From web server's access log: First there are some normal ajax requests arriving from browser: 
192.168.5.102 - - [22/May/2006:07:46:43 +] GET /wicket?wicket:interface=:0:uiPanel:viewPanel:normalView:panels:0:panel:listTableSpan:-1:IUnversionedBehaviorListenerwicket:behaviorId=0random=
0.35930677427195573 HTTP/1.1 200 824 192.168.5.102 - - [22/May/2006:07:46:43 +] GET /wicket?wicket:interface=:0:uiPanel:viewPanel:normalView:panels:0:panel:listTableSpan:-1:IUnversionedBehaviorListenerwicket:behaviorId=0random=
0.11935459751117722 HTTP/1.1 200 824 Here, user clicks a link which transfers application to help page, it is displayed ok. 
192.168.5.102 - - [22/May/2006:07:46:43 +] GET /wicket?wicket:interface=:0:uiPanel:topPanel:showHelp:34:ILinkListener HTTP/1.1 302 - 192.168.5.102
 - - [22/May/2006:07:46:43 +] GET /wicket?wicket:interface=:34:: HTTP/1.1 200 3191 Now, for some reason a ajax request arrives from previous page, which causes to pagemap stack to be
 popped so the page user's browser is on is removed from page map. 192.168.5.102 - - [22/May/2006:07:46:43 +] GET /wicket?wicket:interface=:0:uiPanel:viewPanel:normalView:panels:0:panel:listTableSpan:-1:IUnversionedBehaviorListenerwicket:behaviorId=0random=
0.2873453536331084 HTTP/1.1 200 824 Now, user presses a link on the page but gets 'page expired' message, because the page is no longer in pagemap. 
192.168.5.102 - - [22/May/2006:07:46:44 +] GET /wicket?wicket:interface=:34:back::ILinkListener HTTP/1.1 404 651 Any ideas what I could do to fix this ? The ajax requests are fired asynchronously by a system which is very
 similar to AjaxSelfUpdatingTimerBehaviour stuff.Ari S. --- Using Tomcat but need to do more? Need to support web services, security?
 Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo 
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ Wicket-user mailing list 
Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user ---
 Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1
 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net 
https://lists.sourceforge.net/lists/listinfo/wicket-user---Using Tomcat but need to do more? Need to support web services, security?Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimohttp://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___Wicket-user mailing listWicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] pagemap problem with late arriving ajax request

2006-05-22 Thread Matej Knopp

I believe the scenario can be like this:

You are on page A.
You click on ajax link on page A.
Before the request is completed, you go to page B (non ajax link). This 
is little tricky, because during ajax request the session is locked, but 
I guess it can happen (the ajax request is still connecting, for example).
So now you are on page B. Then the ajax request from page A is being 
processed. The page B is removed from pagemap. But you are still on page B.


-Matej

Johan Compagner wrote:

So what request comes first?
The ajax request should always do -1 (so latest release)
So if the request from the new page did come first then the ajax request 
shouild work on that new page.
If the ajax request did come a bit earlier then there shouldn't be a 
problem at all because

the last reqest will be the normal link click for a new page.

johan


On 5/22/06, *Ari Suutari*  [EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED] wrote:


I cannot figure out any workaround myself.
UnversionedBehaviorListener seems to use -1 as
page version number, would it make any sense to try to alter PageMap
so that
if version is -1 the page stack is not cleared ?

Ari S.

- Original Message -
From: Matej Knopp  [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
To: wicket-user@lists.sourceforge.net
mailto:wicket-user@lists.sourceforge.net
Sent: Monday, May 22, 2006 11:44 AM
Subject: Re: [Wicket-user] pagemap problem with late arriving ajax
request


 I guess this is because in 1.2 pagemap behaves like stack. Johan?
 
  -Matej
 
  Ari Suutari wrote:
  Hi,
 
  I'm having a problem with wicket's ajax stuff where an ajax request
  fired by previous page hits the web server after user has
clicked a link
  which has already transferred him to next page.
 
  This might be a problem in my application, but I'm seeking for
ideas
  to solve this.
 
  From web server's access log:
 
  First there are some normal ajax requests arriving from browser:
 
  192.168.5.102 http://192.168.5.102 - - [22/May/2006:07:46:43
+] GET
 

/wicket?wicket:interface=:0:uiPanel:viewPanel:normalView:panels:0:panel:listTableSpan:-1:IUnversionedBehaviorListenerwicket:behaviorId=0random=
0.35930677427195573
  HTTP/1.1 200 824
  192.168.5.102 http://192.168.5.102 - - [22/May/2006:07:46:43
+] GET
 

/wicket?wicket:interface=:0:uiPanel:viewPanel:normalView:panels:0:panel:listTableSpan:-1:IUnversionedBehaviorListenerwicket:behaviorId=0random=
0.11935459751117722
  HTTP/1.1 200 824
 
  Here, user clicks a link which transfers application to help
page, it is displayed ok.
 
  192.168.5.102 http://192.168.5.102 - - [22/May/2006:07:46:43
+] GET
/wicket?wicket:interface=:0:uiPanel:topPanel:showHelp:34:ILinkListener
  HTTP/1.1 302 -
  192.168.5.102 http://192.168.5.102 - - [22/May/2006:07:46:43
+] GET /wicket?wicket:interface=:34:: HTTP/1.1 200 3191
 
  Now, for some reason a ajax request arrives from previous page,
which causes to pagemap stack to be
  popped so the page user's browser is on is removed from page map.
 
  192.168.5.102 http://192.168.5.102 - - [22/May/2006:07:46:43
+] GET
 

/wicket?wicket:interface=:0:uiPanel:viewPanel:normalView:panels:0:panel:listTableSpan:-1:IUnversionedBehaviorListenerwicket:behaviorId=0random=
0.2873453536331084
  HTTP/1.1 200 824
 
  Now, user presses a link on the page but gets 'page expired'
message, because the page
  is no longer in pagemap.
 
  192.168.5.102 http://192.168.5.102 - - [22/May/2006:07:46:44
+] GET /wicket?wicket:interface=:34:back::ILinkListener
HTTP/1.1 404 651
 
  Any ideas what I could do to fix this ? The ajax requests are
fired asynchronously by a system which is very
  similar to AjaxSelfUpdatingTimerBehaviour stuff.
 
 Ari S.
 
 
 
  ---
  Using Tomcat but need to do more? Need to support web services,
security?
  Get stuff done quickly with pre-integrated technology to make
your job easier
  Download IBM WebSphere Application Server v.1.0.1 based on
Apache Geronimo
 
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
  ___
  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net
mailto:Wicket-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/wicket-user
 
 
 
 
  ---
  Using Tomcat but need to do more? Need to support web services,
security?
  Get stuff done quickly with pre-integrated technology to make

Re: [Wicket-user] pagemap problem with late arriving ajax request

2006-05-22 Thread Ari Suutari

The access log in my first e-mail was in chronological order, ie.
user clicks a link on first page (this page has also ajax stuff active) and the
java code in onClick transfers to new page by calling setResponsePage(new 
HelpPage()).
But after the link click there still arrives one late ajax call from first page 
which
messes up pagemap ie. wicket thinks that user has pressed back button.

This is very timing-related and it isn't very easy to reproduce, but somehow
our end-users seem to be able to produce it a lot and are very unhappy.
I guess you'll have to click the link about same time as ajax timer decides to
fire a request.

   Ari S.


- Original Message - 
From: Johan Compagner [EMAIL PROTECTED]

To: wicket-user@lists.sourceforge.net
Sent: Monday, May 22, 2006 2:37 PM
Subject: Re: [Wicket-user] pagemap problem with late arriving ajax request


So what request comes first?
The ajax request should always do -1 (so latest release)
So if the request from the new page did come first then the ajax request
shouild work on that new page.
If the ajax request did come a bit earlier then there shouldn't be a problem
at all because
the last reqest will be the normal link click for a new page.

johan


On 5/22/06, Ari Suutari [EMAIL PROTECTED] wrote:


I cannot figure out any workaround myself. UnversionedBehaviorListener
seems to use -1 as
page version number, would it make any sense to try to alter PageMap so
that
if version is -1 the page stack is not cleared ?

Ari S.

- Original Message -
From: Matej Knopp [EMAIL PROTECTED]
To: wicket-user@lists.sourceforge.net
Sent: Monday, May 22, 2006 11:44 AM
Subject: Re: [Wicket-user] pagemap problem with late arriving ajax request


I guess this is because in 1.2 pagemap behaves like stack. Johan?

 -Matej

 Ari Suutari wrote:
 Hi,

 I'm having a problem with wicket's ajax stuff where an ajax request
 fired by previous page hits the web server after user has clicked a
link
 which has already transferred him to next page.

 This might be a problem in my application, but I'm seeking for ideas
 to solve this.

 From web server's access log:

 First there are some normal ajax requests arriving from browser:

 192.168.5.102 - - [22/May/2006:07:46:43 +] GET

/wicket?wicket:interface=:0:uiPanel:viewPanel:normalView:panels:0:panel:listTableSpan:-1:IUnversionedBehaviorListenerwicket:behaviorId=0random=
0.35930677427195573
 HTTP/1.1 200 824
 192.168.5.102 - - [22/May/2006:07:46:43 +] GET

/wicket?wicket:interface=:0:uiPanel:viewPanel:normalView:panels:0:panel:listTableSpan:-1:IUnversionedBehaviorListenerwicket:behaviorId=0random=
0.11935459751117722
 HTTP/1.1 200 824

 Here, user clicks a link which transfers application to help page, it
is displayed ok.

 192.168.5.102 - - [22/May/2006:07:46:43 +] GET
/wicket?wicket:interface=:0:uiPanel:topPanel:showHelp:34:ILinkListener
 HTTP/1.1 302 -
 192.168.5.102 - - [22/May/2006:07:46:43 +] GET
/wicket?wicket:interface=:34:: HTTP/1.1 200 3191

 Now, for some reason a ajax request arrives from previous page, which
causes to pagemap stack to be
 popped so the page user's browser is on is removed from page map.

 192.168.5.102 - - [22/May/2006:07:46:43 +] GET

/wicket?wicket:interface=:0:uiPanel:viewPanel:normalView:panels:0:panel:listTableSpan:-1:IUnversionedBehaviorListenerwicket:behaviorId=0random=
0.2873453536331084
 HTTP/1.1 200 824

 Now, user presses a link on the page but gets 'page expired' message,
because the page
 is no longer in pagemap.

 192.168.5.102 - - [22/May/2006:07:46:44 +] GET
/wicket?wicket:interface=:34:back::ILinkListener HTTP/1.1 404 651

 Any ideas what I could do to fix this ? The ajax requests are fired
asynchronously by a system which is very
 similar to AjaxSelfUpdatingTimerBehaviour stuff.

Ari S.



 ---
 Using Tomcat but need to do more? Need to support web services,
security?
 Get stuff done quickly with pre-integrated technology to make your job
easier
 Download IBM WebSphere Application Server v.1.0.1 based on Apache
Geronimo

http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user




 ---
 Using Tomcat but need to do more? Need to support web services,
security?
 Get stuff done quickly with pre-integrated technology to make your job
easier
 Download IBM WebSphere Application Server v.1.0.1 based on Apache
Geronimo
 http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user




---
Using Tomcat but need to do more? Need to support web services

Re: [Wicket-user] pagemap problem with late arriving ajax request

2006-05-22 Thread Ari Suutari

If I modify the PageMap.java like this:

final Page get(final int id, int versionNumber)
{
   final IPageMapEntry entry = 
(IPageMapEntry)session.getAttribute(attributeForId(id));
   if (entry != null)
   {
if (versionNumber == -1) {
   Access a = peekAccess();
   if (a.getId() != id)
   return null;
}

So this kludgery piece of the code checks that if request is coming from ajax
(ie. versionNumber == -1) and the topmost page is not the one being requested
- return null.

After adding this it looks like I cannot reproduce the problem any more.

   Ari S.

- Original Message - 
From: Johan Compagner [EMAIL PROTECTED]

To: wicket-user@lists.sourceforge.net
Sent: Monday, May 22, 2006 2:37 PM
Subject: Re: [Wicket-user] pagemap problem with late arriving ajax request


So what request comes first?
The ajax request should always do -1 (so latest release)
So if the request from the new page did come first then the ajax request
shouild work on that new page.
If the ajax request did come a bit earlier then there shouldn't be a problem
at all because
the last reqest will be the normal link click for a new page.

johan


On 5/22/06, Ari Suutari [EMAIL PROTECTED] wrote:


I cannot figure out any workaround myself. UnversionedBehaviorListener
seems to use -1 as
page version number, would it make any sense to try to alter PageMap so
that
if version is -1 the page stack is not cleared ?

Ari S.

- Original Message -
From: Matej Knopp [EMAIL PROTECTED]
To: wicket-user@lists.sourceforge.net
Sent: Monday, May 22, 2006 11:44 AM
Subject: Re: [Wicket-user] pagemap problem with late arriving ajax request


I guess this is because in 1.2 pagemap behaves like stack. Johan?

 -Matej

 Ari Suutari wrote:
 Hi,

 I'm having a problem with wicket's ajax stuff where an ajax request
 fired by previous page hits the web server after user has clicked a
link
 which has already transferred him to next page.

 This might be a problem in my application, but I'm seeking for ideas
 to solve this.

 From web server's access log:

 First there are some normal ajax requests arriving from browser:

 192.168.5.102 - - [22/May/2006:07:46:43 +] GET

/wicket?wicket:interface=:0:uiPanel:viewPanel:normalView:panels:0:panel:listTableSpan:-1:IUnversionedBehaviorListenerwicket:behaviorId=0random=
0.35930677427195573
 HTTP/1.1 200 824
 192.168.5.102 - - [22/May/2006:07:46:43 +] GET

/wicket?wicket:interface=:0:uiPanel:viewPanel:normalView:panels:0:panel:listTableSpan:-1:IUnversionedBehaviorListenerwicket:behaviorId=0random=
0.11935459751117722
 HTTP/1.1 200 824

 Here, user clicks a link which transfers application to help page, it
is displayed ok.

 192.168.5.102 - - [22/May/2006:07:46:43 +] GET
/wicket?wicket:interface=:0:uiPanel:topPanel:showHelp:34:ILinkListener
 HTTP/1.1 302 -
 192.168.5.102 - - [22/May/2006:07:46:43 +] GET
/wicket?wicket:interface=:34:: HTTP/1.1 200 3191

 Now, for some reason a ajax request arrives from previous page, which
causes to pagemap stack to be
 popped so the page user's browser is on is removed from page map.

 192.168.5.102 - - [22/May/2006:07:46:43 +] GET

/wicket?wicket:interface=:0:uiPanel:viewPanel:normalView:panels:0:panel:listTableSpan:-1:IUnversionedBehaviorListenerwicket:behaviorId=0random=
0.2873453536331084
 HTTP/1.1 200 824

 Now, user presses a link on the page but gets 'page expired' message,
because the page
 is no longer in pagemap.

 192.168.5.102 - - [22/May/2006:07:46:44 +] GET
/wicket?wicket:interface=:34:back::ILinkListener HTTP/1.1 404 651

 Any ideas what I could do to fix this ? The ajax requests are fired
asynchronously by a system which is very
 similar to AjaxSelfUpdatingTimerBehaviour stuff.

Ari S.



 ---
 Using Tomcat but need to do more? Need to support web services,
security?
 Get stuff done quickly with pre-integrated technology to make your job
easier
 Download IBM WebSphere Application Server v.1.0.1 based on Apache
Geronimo

http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user




 ---
 Using Tomcat but need to do more? Need to support web services,
security?
 Get stuff done quickly with pre-integrated technology to make your job
easier
 Download IBM WebSphere Application Server v.1.0.1 based on Apache
Geronimo
 http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user




---
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly

Re: [Wicket-user] pagemap problem with late arriving ajax request

2006-05-22 Thread Johan Compagner
The problem is that i don't know if -1 is always used only for that.internally it is LATEST_VERSION.So i don't know if we really can do that everytime. Just don't touch anything. if page -1 is asked for.
johanOn 5/22/06, Ari Suutari [EMAIL PROTECTED] wrote:
If I modify the PageMap.java like this:final Page get(final int id, int versionNumber){final IPageMapEntry entry = (IPageMapEntry)session.getAttribute(attributeForId(id));if (entry != null)
{ if (versionNumber == -1) {Access a = peekAccess();if (a.getId() != id)return null; }So this kludgery piece of the code checks that if request is coming from ajax
(ie. versionNumber == -1) and the topmost page is not the one being requested- return null.After adding this it looks like I cannot reproduce the problem any more.Ari S.- Original Message -
From: Johan Compagner [EMAIL PROTECTED]To: wicket-user@lists.sourceforge.netSent: Monday, May 22, 2006 2:37 PM
Subject: Re: [Wicket-user] pagemap problem with late arriving ajax requestSo what request comes first?The ajax request should always do -1 (so latest release)So if the request from the new page did come first then the ajax request
shouild work on that new page.If the ajax request did come a bit earlier then there shouldn't be a problemat all becausethe last reqest will be the normal link click for a new page.johan
On 5/22/06, Ari Suutari [EMAIL PROTECTED] wrote: I cannot figure out any workaround myself. UnversionedBehaviorListener seems to use -1 as
 page version number, would it make any sense to try to alter PageMap so that if version is -1 the page stack is not cleared ? Ari S. - Original Message -
 From: Matej Knopp [EMAIL PROTECTED] To: wicket-user@lists.sourceforge.net Sent: Monday, May 22, 2006 11:44 AM
 Subject: Re: [Wicket-user] pagemap problem with late arriving ajax request I guess this is because in 1.2 pagemap behaves like stack. Johan?   -Matej 
  Ari Suutari wrote:  Hi,   I'm having a problem with wicket's ajax stuff where an ajax request  fired by previous page hits the web server after user has clicked a
 link  which has already transferred him to next page.   This might be a problem in my application, but I'm seeking for ideas  to solve this. 
  From web server's access log:   First there are some normal ajax requests arriving from browser:   192.168.5.102
 - - [22/May/2006:07:46:43 +] GET  /wicket?wicket:interface=:0:uiPanel:viewPanel:normalView:panels:0:panel:listTableSpan:-1:IUnversionedBehaviorListenerwicket:behaviorId=0random=
 0.35930677427195573  HTTP/1.1 200 824  192.168.5.102 - - [22/May/2006:07:46:43 +] GET  /wicket?wicket:interface=:0:uiPanel:viewPanel:normalView:panels:0:panel:listTableSpan:-1:IUnversionedBehaviorListenerwicket:behaviorId=0random=
 0.11935459751117722  HTTP/1.1 200 824   Here, user clicks a link which transfers application to help page, it is displayed ok.   
192.168.5.102 - - [22/May/2006:07:46:43 +] GET /wicket?wicket:interface=:0:uiPanel:topPanel:showHelp:34:ILinkListener  HTTP/1.1 302 -  
192.168.5.102 - - [22/May/2006:07:46:43 +] GET /wicket?wicket:interface=:34:: HTTP/1.1 200 3191   Now, for some reason a ajax request arrives from previous page, which
 causes to pagemap stack to be  popped so the page user's browser is on is removed from page map.   192.168.5.102 - - [22/May/2006:07:46:43 +] GET
  /wicket?wicket:interface=:0:uiPanel:viewPanel:normalView:panels:0:panel:listTableSpan:-1:IUnversionedBehaviorListenerwicket:behaviorId=0random= 0.2873453536331084  HTTP/1.1 200 824
   Now, user presses a link on the page but gets 'page expired' message, because the page  is no longer in pagemap.   
192.168.5.102 - - [22/May/2006:07:46:44 +] GET /wicket?wicket:interface=:34:back::ILinkListener HTTP/1.1 404 651   Any ideas what I could do to fix this ? The ajax requests are fired
 asynchronously by a system which is very  similar to AjaxSelfUpdatingTimerBehaviour stuff.  Ari S. ---
  Using Tomcat but need to do more? Need to support web services, security?  Get stuff done quickly with pre-integrated technology to make your job easier  Download IBM WebSphere Application Server 
v.1.0.1 based on Apache Geronimo  http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
  ___  Wicket-user mailing list  Wicket-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/wicket-user  ---
  Using Tomcat but need to do more? Need to support web services, security?  Get stuff done quickly with pre-integrated technology to make your job easier  Download IBM WebSphere Application Server 
v.1.0.1 based on Apache Geronimo  http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
  ___  Wicket-user mailing list  Wicket-user@lists.sourceforge.net  
https://lists.sourceforge.net/lists/listinfo/wicket-user

Re: [Wicket-user] pagemap problem with late arriving ajax request

2006-05-22 Thread Johan Compagner
and committed?johanOn 5/22/06, Igor Vaynberg [EMAIL PROTECTED] wrote:
problem is, not every ajax behavior uses version -1. i guess we need to have the ability to tag a request as process-only-if-page-is-active-Igor
On 5/22/06, 
Ari Suutari [EMAIL PROTECTED]
 wrote:If I modify the PageMap.java like this:final Page get(final int id, int versionNumber)
{final IPageMapEntry entry = (IPageMapEntry)session.getAttribute(attributeForId(id));if (entry != null){ if (versionNumber == -1) {Access a = peekAccess();


if (a.getId() != id)return
null; }So this kludgery piece of the code checks that if request is coming from ajax(ie. versionNumber == -1) and the topmost page is not the one being requested- return null.After adding this it looks like I cannot reproduce the problem any more.
Ari S.- Original Message -From: Johan Compagner [EMAIL PROTECTED]
To: 
wicket-user@lists.sourceforge.netSent: Monday, May 22, 2006 2:37 PMSubject: Re: [Wicket-user] pagemap problem with late arriving ajax requestSo what request comes first?The ajax request should always do -1 (so latest release)
So if the request from the new page did come first then the ajax requestshouild work on that new page.If the ajax request did come a bit earlier then there shouldn't be a problemat all becausethe last reqest will be the normal link click for a new page.
johanOn 5/22/06, Ari Suutari [EMAIL PROTECTED] wrote:

 I cannot figure out any workaround myself. UnversionedBehaviorListener
 seems to use -1 as page version number, would it make any sense to try to alter PageMap so that if version is -1 the page stack is not cleared ? Ari S. - Original Message -
 From: Matej Knopp [EMAIL PROTECTED] To: 

wicket-user@lists.sourceforge.net Sent: Monday, May 22, 2006 11:44 AM
 Subject: Re: [Wicket-user] pagemap problem with late arriving ajax request I guess this is because in 1.2 pagemap behaves like stack. Johan?   -Matej 
  Ari Suutari wrote:  Hi,   I'm having a problem with wicket's ajax stuff where an ajax request  fired by previous page hits the web server after user has clicked a
 link  which has already transferred him to next page.   This might be a problem in my application, but I'm seeking for ideas  to solve this. 
  From web server's access log:   First there are some normal ajax requests arriving from browser:   

192.168.5.102
 - - [22/May/2006:07:46:43 +] GET  /wicket?wicket:interface=:0:uiPanel:viewPanel:normalView:panels:0:panel:listTableSpan:-1:IUnversionedBehaviorListenerwicket:behaviorId=0random=
 0.35930677427195573  HTTP/1.1 200 824  192.168.5.102 - - [22/May/2006:07:46:43 +] GET
  /wicket?wicket:interface=:0:uiPanel:viewPanel:normalView:panels:0:panel:listTableSpan:-1:IUnversionedBehaviorListenerwicket:behaviorId=0random=
 0.11935459751117722  HTTP/1.1 200 824   Here, user clicks a link which transfers application to help page, it is displayed ok.   
192.168.5.102 - - [22/May/2006:07:46:43 +] GET /wicket?wicket:interface=:0:uiPanel:topPanel:showHelp:34:ILinkListener
  HTTP/1.1 302 -  
192.168.5.102 - - [22/May/2006:07:46:43 +] GET /wicket?wicket:interface=:34:: HTTP/1.1 200 3191
   Now, for some reason a ajax request arrives from previous page, which
 causes to pagemap stack to be  popped so the page user's browser is on is removed from page map.   

192.168.5.102 - - [22/May/2006:07:46:43 +] GET
  /wicket?wicket:interface=:0:uiPanel:viewPanel:normalView:panels:0:panel:listTableSpan:-1:IUnversionedBehaviorListenerwicket:behaviorId=0random= 0.2873453536331084  HTTP/1.1 200 824
   Now, user presses a link on the page but gets 'page expired' message, because the page  is no longer in pagemap.   


192.168.5.102 - - [22/May/2006:07:46:44 +] GET /wicket?wicket:interface=:34:back::ILinkListener HTTP/1.1 404 651   Any ideas what I could do to fix this ? The ajax requests are fired
 asynchronously by a system which is very  similar to AjaxSelfUpdatingTimerBehaviour stuff.  Ari S. ---
  Using Tomcat but need to do more? Need to support web services, security?  Get stuff done quickly with pre-integrated technology to make your job easier  Download IBM WebSphere Application Server 
v.1.0.1 based on Apache Geronimo  

http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
  ___  Wicket-user mailing list  

Wicket-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/wicket-user 
 ---
  Using Tomcat but need to do more? Need to support web services, security?  Get stuff done quickly with pre-integrated technology to make your job easier  Download IBM WebSphere Application Server 
v.1.0.1 based on Apache Geronimo  

http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
  ___  Wicket-user mailing list  

Wicket-user@lists.sourceforge.net  
https

Re: [Wicket-user] pagemap problem with late arriving ajax request

2006-05-22 Thread Igor Vaynberg
maybe you havent heard the big news that leaves me very little free time. so maybe a bachelor such as yourself can work on it until i have some more free time :)-IgorOn 5/22/06, 
Johan Compagner [EMAIL PROTECTED] wrote:
and committed?johanOn 5/22/06, Igor Vaynberg 
[EMAIL PROTECTED] wrote:

problem is, not every ajax behavior uses version -1. i guess we need to have the ability to tag a request as process-only-if-page-is-active-Igor
On 5/22/06, 
Ari Suutari [EMAIL PROTECTED]
 wrote:If I modify the PageMap.java like this:final Page get(final int id, int versionNumber)
{final IPageMapEntry entry = (IPageMapEntry)session.getAttribute(attributeForId(id));if (entry != null){ if (versionNumber == -1) {Access a = peekAccess();



if (a.getId() != id)return
null; }So this kludgery piece of the code checks that if request is coming from ajax(ie. versionNumber == -1) and the topmost page is not the one being requested- return null.After adding this it looks like I cannot reproduce the problem any more.
Ari S.- Original Message -From: Johan Compagner [EMAIL PROTECTED]
To: 
wicket-user@lists.sourceforge.netSent: Monday, May 22, 2006 2:37 PMSubject: Re: [Wicket-user] pagemap problem with late arriving ajax requestSo what request comes first?The ajax request should always do -1 (so latest release)
So if the request from the new page did come first then the ajax requestshouild work on that new page.If the ajax request did come a bit earlier then there shouldn't be a problemat all becausethe last reqest will be the normal link click for a new page.
johanOn 5/22/06, Ari Suutari [EMAIL PROTECTED] wrote:


 I cannot figure out any workaround myself. UnversionedBehaviorListener
 seems to use -1 as page version number, would it make any sense to try to alter PageMap so that if version is -1 the page stack is not cleared ? Ari S. - Original Message -
 From: Matej Knopp [EMAIL PROTECTED] To: 


wicket-user@lists.sourceforge.net Sent: Monday, May 22, 2006 11:44 AM
 Subject: Re: [Wicket-user] pagemap problem with late arriving ajax request I guess this is because in 1.2 pagemap behaves like stack. Johan?   -Matej 
  Ari Suutari wrote:  Hi,   I'm having a problem with wicket's ajax stuff where an ajax request  fired by previous page hits the web server after user has clicked a
 link  which has already transferred him to next page.   This might be a problem in my application, but I'm seeking for ideas  to solve this. 
  From web server's access log:   First there are some normal ajax requests arriving from browser:   


192.168.5.102
 - - [22/May/2006:07:46:43 +] GET  /wicket?wicket:interface=:0:uiPanel:viewPanel:normalView:panels:0:panel:listTableSpan:-1:IUnversionedBehaviorListenerwicket:behaviorId=0random=
 0.35930677427195573  HTTP/1.1 200 824  192.168.5.102 - - [22/May/2006:07:46:43 +] GET
  /wicket?wicket:interface=:0:uiPanel:viewPanel:normalView:panels:0:panel:listTableSpan:-1:IUnversionedBehaviorListenerwicket:behaviorId=0random=
 0.11935459751117722  HTTP/1.1 200 824   Here, user clicks a link which transfers application to help page, it is displayed ok.   
192.168.5.102 - - [22/May/2006:07:46:43 +] GET /wicket?wicket:interface=:0:uiPanel:topPanel:showHelp:34:ILinkListener
  HTTP/1.1 302 -  
192.168.5.102 - - [22/May/2006:07:46:43 +] GET /wicket?wicket:interface=:34:: HTTP/1.1 200 3191
   Now, for some reason a ajax request arrives from previous page, which
 causes to pagemap stack to be  popped so the page user's browser is on is removed from page map.   


192.168.5.102 - - [22/May/2006:07:46:43 +] GET
  /wicket?wicket:interface=:0:uiPanel:viewPanel:normalView:panels:0:panel:listTableSpan:-1:IUnversionedBehaviorListenerwicket:behaviorId=0random= 0.2873453536331084  HTTP/1.1 200 824
   Now, user presses a link on the page but gets 'page expired' message, because the page  is no longer in pagemap.   



192.168.5.102 - - [22/May/2006:07:46:44 +] GET /wicket?wicket:interface=:34:back::ILinkListener HTTP/1.1 404 651   Any ideas what I could do to fix this ? The ajax requests are fired
 asynchronously by a system which is very  similar to AjaxSelfUpdatingTimerBehaviour stuff.  Ari S. ---
  Using Tomcat but need to do more? Need to support web services, security?  Get stuff done quickly with pre-integrated technology to make your job easier  Download IBM WebSphere Application Server 
v.1.0.1 based on Apache Geronimo  


http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
  ___  Wicket-user mailing list  


Wicket-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/wicket-user 
 ---
  Using Tomcat but need to do more? Need to support web services, security?  Get stuff done quickly with pre-integrated technology to make your job easier  Download IBM WebSphere Application Server 
v.1.0.1 based