Re: wicket 1.5 AbstractDefaultAjaxBehavior bad url

2011-05-01 Thread Martin Grigorov
If you can create a quickstart that reproduces the problem then please
attach it to a ticket in Jira.

On Fri, Apr 29, 2011 at 10:52 PM, msj121 msj...@gmail.com wrote:
 I have noticed calling getCallbackUrl() on an AbstractDefaultAjaxBehavior
 results in a url sometimes in:

 ./wicket/page?0-1.IBehaviorListener

 and other parts of the same page have:

 ./wicket/page?1-2.IBehaviorListener


 I think that the bad urls cause the page to reload when the attempt to call:

 wicketAjaxGet('+click.getCallbackUrl()+x='+...+'y='+...+'');



 For some reason having these ajax calls reloads the page in Wicket 1.5 but
 not wicket 1.4. I am of course calling getCallbackUrl() after the behavior
 is added to the page not sure what is wrong.

 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/wicket-1-5-AbstractDefaultAjaxBehavior-bad-url-tp3484600p3484600.html
 Sent from the Users forum mailing list archive at Nabble.com.

 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org





-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: wicket 1.5 AbstractDefaultAjaxBehavior bad url

2011-05-01 Thread msj121
SOLVED:

After some debugging I noticed the following:

In the constructor the url generated is:
./wicket/page?54-0.IBehaviorListener.0

In onBeforeRender and onAfterRender the url is
./wicket/page?54-1.IBehaviorListener.0

I was pretty much getting the url as a string and passing it to WiQuery (ie:
another object). When the url is finally updated after the constructor (ie:
later in the request cycle) the string was obviously not altered though the
url was no longer good.

Furthermore, reloading the page doesn't always seem to call the constructor
leaving a further off url. Meaning the string stored was for a previous
version number so it might be 52-0 instead of the intended 53-1 etc


This may be obvious to someone who understood the url changes even after the
constructor of the page was called. I suppose it boggled me as this is only
an issue now in Wicket 1.5 somehow.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/wicket-1-5-AbstractDefaultAjaxBehavior-bad-url-tp3484600p3489362.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org