On 11/7/05, Steven McNeel <[EMAIL PROTECTED]> wrote: > Hello, > > I think I've read all of the pertinent articles in the documentation, > especially > http://www.wicket-wiki.org.uk/wiki/index.php/Lifecycle. On > each request to my app, I first need to run a database query,the parameters > of which are dependent on the parameters in the Request. Then I need to > forward to a page, which also depends on the request parameters. It looks > like I'm supposed to override methods on RequestCycle ( i.e. > onBeginRequest(), request(), and onEndRequest()).
onBeginRequest might be the right please. It gets called just before the URL gets analyzed. But the URL parameters are already available. > > If this is correct, then my question is: once I create my subclass of > WebRequestCycle, how do I integrate that into my application flow? It seems > that the instantiation and use of RequestCycle objects is performed by the > Wicket framework. Where are my hooks to make the Session return my custom > RequestCycle? And how do I handle the initial request, before a Session is > even created? > Please have a look at the examples. Application.java provides the hooks. The wiki contains some information about how to do it as well public final class SignIn2Application extends WicketExampleApplication { /** * @see wicket.protocol.http.WebApplication#getSessionFactory() */ public ISessionFactory getSessionFactory() { return new ISessionFactory() { public Session newSession() { return new SignIn2Session(SignIn2Application.this); } }; } And by subclassing WebSession.getRequestCycleFactory() you can create your own RequestCycles. Juergen ------------------------------------------------------- SF.Net email is sponsored by: Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42" plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php _______________________________________________ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user