You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Merico Raffaele <ra...@less.ch> on 2006/10/30 12:18:23 UTC

SetterAction (Session)

Dear Community

In the API java doc of cocoon 2.1.9 there is a class
org.apache.cocoon.acting.SetterAction. 

I tried to use it in various ways but I never got the usage that I need. And
that is: 
a) I would like to read a part of the URL (i.e. skin name, not as request
parameter), 
b) store this information in the session and 
c) reuse the session value with the sitemap input modules {session:...} or
{session-attr:...}

I would very appreciate if anybody could tell me if the above described
SetterAction/InputModule is the right mix of functionality or if there is
another way to achieve my goal.    

For your support many thanks in advance ... Raffaele  

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


Re: SetterAction (Session)

Posted by Zbigniew Bomert OP <zb...@dominikanie.pl>.
Merico Raffaele napisaƂ(a):
> Dear Community
> 
> In the API java doc of cocoon 2.1.9 there is a class
> org.apache.cocoon.acting.SetterAction. 
> 
> I tried to use it in various ways but I never got the usage that I need. And
> that is: 
> a) I would like to read a part of the URL (i.e. skin name, not as request
> parameter), 
> b) store this information in the session and 
> c) reuse the session value with the sitemap input modules {session:...} or
> {session-attr:...}
> 

I use for this org.apache.cocoon.acting.SessionPropagatorAction, which 
store parameters in a session. You can read them later using 
{session-attr:...}.

Zbigniew Bomert


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


Re: SetterAction (Session)

Posted by Jeroen Reijn <j....@hippo.nl>.
Hi Raffaele,

Merico Raffaele wrote:
> I tried to use it in various ways but I never got the usage that I need. And
> that is: 
> a) I would like to read a part of the URL (i.e. skin name, not as request
> parameter), 

yes cocoon can do this for you if you want by matching the specific part 
of your url:

/skinname/someurl/somepage

a matcher looking like: pattern="*/**"

would give you the skinname in {1}.

> b) store this information in the session and 

Yes I guess you can do this by using the session transformer if you want 
(http://cocoon.apache.org/2.1/userdocs/session.html)

> c) reuse the session value with the sitemap input modules {session:...} or
> {session-attr:...}

Yes this a correct approach to use.
> 
> I would very appreciate if anybody could tell me if the above described
> SetterAction/InputModule is the right mix of functionality or if there is
> another way to achieve my goal.  

Yes this is one way. Another solution is passing your page through 
flowscript.

You can then set your session from flowscript and request the session 
information with the same session inputmodule in the sitemap.

> 
> For your support many thanks in advance ... Raffaele  
> 

You're welcome!

Jeroen Reijn

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

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