-Igor
On 3/16/06, Andrew Berman <[EMAIL PROTECTED]> wrote:
Cool. Thanks Igor.On 3/16/06, Igor Vaynberg <[EMAIL PROTECTED]> wrote:instead of using a session factory try using a request cycle factory and setting the style into the created websession there.
-IgorOn 3/16/06, Andrew Berman <[EMAIL PROTECTED]> wrote:It looks like the RequestCycle is not filled in until RequestCycle cycle = session.newRequestCycle(request, response); in WicketServlet (line 209 for Wicket 1.2 Beta 1)On 3/16/06, Andrew Berman <[EMAIL PROTECTED]> wrote:I should've mentioned that I already tried that and when I call RequestCycle.get(), I get a null.On 3/16/06, Igor Vaynberg < [EMAIL PROTECTED]> wrote:you can try: ((WebRequest)RequestCycle.get().getRequest()).....
-IgorOn 3/16/06, Andrew Berman <[EMAIL PROTECTED] > wrote:I have a requirement where I need to parse the URL to extract a username on session creation. For example, http://username.foo.com/..., I need to pull out the username and set a style in the session. So, I figured that upon session creation I could parse the request and set the style. In my application class I have:
protected ISessionFactory getSessionFactory() {
return new ISessionFactory() {
private static final long serialVersionUID = 1L;
public Session newSession() {
return new FooSession();
}
};
}
So in the newSession method how can I get the URL or request object?
Thanks,
Andrew