I do not understand this now. But when I just went through the code I think RequestCycle.onBeginRequest() is called before the interpretation of the url and the call of the listeners.

However Component.onBeginRequest() is called only before the render phase. Is this right?


On Mon, 7 Nov 2005 23:10:38 +0100, Johan Compagner <[EMAIL PROTECTED]> wrote:

onBeginRequest is not the first thing that is called
IT is the first thing that is called in the response/render phase.
But what i call the request/invoke phase is before that.
And the only hook there really is in a Listener call is as far as i know
the:
((WebPage)page).beforeCallComponent(component, method);

But we should really stream line all the hooks

johan

On 11/7/05, Juergen Donnerstag <[EMAIL PROTECTED]> wrote:

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




--
Christian Essl
        

        
                
___________________________________________________________ Gesendet von Yahoo! Mail - Jetzt mit 1GB Speicher kostenlos - Hier anmelden: http://mail.yahoo.de



-------------------------------------------------------
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

Reply via email to