Hi Igor,
Following is a small example how to reproduce this (using quickstart):

In Index.java please add:

// just to display that page is reloaded
String pid = parameters.getString("pid");
add(new Label("page", "Page: " + String.valueOf(pid)));

// a simple ajax call
Model updateModel = new Model() {
        @Override
        public Object getObject(Component arg0) { return new Date().toString 
();}
};
Label update = new Label("update", updateModel);
update.setOutputMarkupId(true);
update.add(new AjaxSelfUpdatingTimerBehavior(Duration.milliseconds 
(1000d))); // **
add(update);


Index.html, just add:

<div wicket:id="page"></div>
<div wicket:id="update"></div>

<script type="text/javascript">
<!--
// small script to avoid clicking buttons
function newPage() {
        var page = Math.floor(Math.random() * 100);
        window.location = 'http://localhost:8081/quickstart/app?pid=' + page;
}
setTimeout('newPage()', 1000); // **
//-->
</script>


Please set a breakpoint in DefaultRequestTargetResolverStrategy,  
method resolveRenderedPage on line:
return new ExpiredPageClassRequestTarget();
It takes a few page reloads to hit the breakpoint.
When I remove AjaxSelfUpdatingTimerBehavior from the label, the  
breakpoint never gets hit.

** - maybe it is relevant, the ajax update time and page reload time  
(script timer) are same.
I also notice that getLock(RequestCycle) in AjaxRequestTarget is  
never called.
Could this cause some synchronization problems?

Thanks for help,

Adam



On Jul 7, 2006, at 11:35 AM, Igor Vaynberg wrote:

> can you reproduce this in a quickstart project?
>
> -Igor
>
>
> On 7/7/06, Adam Smyczek <[EMAIL PROTECTED]> wrote:
>> Hi All,
>>
>> A am experiencing  some wired behavior, every few pages wicket (1.2
>> and 1.2.1rc1) redirects to expired page. During this the session
>> stays active and I can go to the home page without having to login
>> again. This behavior is not deterministic (it happens when I go do
>> different pages), but it looks like it is related to how ajax
>> requests are handled. When I remove all ajax behaviors, the problem
>> seams not to occur anymore.
>> The redirect comes from DefaultRequestTargetResolverStrategy, method
>> resolveRenderedPage. This method tries to retrieve the page from the
>> session, but the PageMap in the session does not contain it, so
>> expired page is returned. I don't explicitly use any page maps in the
>> application.
>>
>> Does someone have he same issue? Could this be related to ajax? Dose
>> someone have more (high level) information how page/page maps are
>> handled in the session or have tips how to debug this in the best  
>> way?
>>
>> Appreciative for any tips,
>>
>> Adam
>>
>>
>>
>> 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=lnk&kid=120709&bid=263057&dat=121642
>> _______________________________________________
>> Wicket-develop mailing list
>> Wicket-develop@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/wicket-develop
>>
>
> 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=lnk&kid=120709&bid=263057&dat=121642
> _______________________________________________
> Wicket-develop mailing list
> Wicket-develop@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-develop


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=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Wicket-develop mailing list
Wicket-develop@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-develop

Reply via email to