David, To my knowledge, the onClick will not be rerun. I would do getPage() in that onClick and send them to the page (passing the getPage()) that does something, then send them back after doing some work. When they click on the link again, in theory, token shouldn't be null again...
Jeremy On Mon, Feb 16, 2009 at 2:27 AM, David Leangen <wic...@leangen.net> wrote: > Hi! > > Just wondering how this works, precisely, since I've been having some > intermittent problems. > > I have a link that has an onClick() method that looks something like > this (in principle): > > public void onClick() > { > String token = checkForToken(); > if( token == null ) > // Do something that will cause token to be non-null next time > throw new RestartResponseAtInterceptPageException( SomePage.class ); > > doSomething( token ); > } > > During the process of doSomething(), I make the call to > continueToOriginalDestination. This returns to the URL that includes the > ITargetListener, so my expectation is that the onClick() above will be > called again. Since this time checkForToken() returns the token, I can > continue processing normally. > > This is working intermittently for me, so I believe that the way I > _think_ things work is correct, but it would be really nice for somebody > to confirm this for me. > > > Thank you! > =David > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > > -- Jeremy Levy See my location in real-time: http://seemywhere.com/jeremy