You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Stephan Windmüller <st...@cs.tu-dortmund.de> on 2009/07/20 16:40:02 UTC

Activation Context of the Login page

Hello!

Our web application is divided in a number of sections. Each section is
based on the same code basis and the users are currently able to login with

http://servername/?section=sectionname

The section name is fetched from the HTTPServletRequest and stored in
the ASO. But what I think would be a better solution is an URL like

http://servername/sectionname

and using the Activation Context. So I tried it, but it seems that the
EventContext for the login page is always empty.

Another problem with the current solution is that the chosen section is
not remembered after a logout.

Is it possible to use the activation context of the login page? And if
not, is there a solution to remember the chosen section after logout?

TIA
 Stephan

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Activation Context of the Login page

Posted by Stephan Windmüller <st...@cs.tu-dortmund.de>.
Peter Stavrinides wrote:

>> and using the Activation Context. So I tried it, but it seems that
>> the EventContext for the login page is always empty.
> You should be able to get it to work, have you remembered to passivate
> the parameter?

Are you sure that this is necessary? The first method called is
onActivate. On the login page the EventContext is empty, on another page
I can retrieve the URL parameters.

>> Is it possible to use the activation context of the login page? And
>> if not, is there a solution to remember the chosen section after
>> logout?
> There are a couple of options:
> 1) Use the url:
> This is probably the simplest solution but will be lost if the client
> closes their browser

This seems like a good option to me. But how do I change the URL after
logout? My logout code invalidates the session and any forwarding to
another URL does not work without it.

- Stephan

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Activation Context of the Login page

Posted by Peter Stavrinides <P....@albourne.com>.
>and using the Activation Context. So I tried it, but it seems that the
> EventContext for the login page is always empty.
You should be able to get it to work, have you remembered to passivate the parameter?

> Is it possible to use the activation context of the login page? And if
> not, is there a solution to remember the chosen section after logout?
There are a couple of options:
1) Use the url:
This is probably the simplest solution but will be lost if the client closes their browser
2) Use a client cookie
This is fairly easy to do, and can be recalled unless the client clears cookies in their browser (you could use a combination of 1 and 2), setting the cookie only on logout for example
3) Use a singleton service with a dependency on the ApplicationStateManager  
Slightly more complex to get perfect, but it is possible to implement a callback mechanism that stores the url in a hashmap for calling back on and mapping it to the users session

Regards
Peter

----- Original Message -----
From: "Stephan Windmüller" <st...@cs.tu-dortmund.de>
To: "Tapestry users" <us...@tapestry.apache.org>
Sent: Monday, 20 July, 2009 17:40:02 GMT +02:00 Athens, Beirut, Bucharest, Istanbul
Subject: Activation Context of the Login page

Hello!

Our web application is divided in a number of sections. Each section is
based on the same code basis and the users are currently able to login with

http://servername/?section=sectionname

The section name is fetched from the HTTPServletRequest and stored in
the ASO. But what I think would be a better solution is an URL like

http://servername/sectionname

and using the Activation Context. So I tried it, but it seems that the
EventContext for the login page is always empty.

Another problem with the current solution is that the chosen section is
not remembered after a logout.

Is it possible to use the activation context of the login page? And if
not, is there a solution to remember the chosen section after logout?

TIA
 Stephan

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org