You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Ilja Smoli <il...@frontdesk.ee> on 2005/02/25 17:21:10 UTC

session input module

Hi
For some reason I can not access to my session attributes from sitemap
pipeline.

I have in my flow script:
cocoon.session.setAttribute("lala", "blah blah");

In pipeline {session:lala} doesn't work, for the same time for eg.
{session:id} works fine.

I can get lala in flow and xml as well:
In flow: cocoon.session.lala  - works fine
In xml doc: ${cocoon.session.lala} - works fine
Im stuck..
thx in advance




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


Re: session input module

Posted by Ilja Smoli <il...@frontdesk.ee>.
Hi
I ve added in cocoon.xconf:
<component-instance
class="org.apache.cocoon.components.modules.input.JXPathMetaModule"
logger="core.modules.input" name="jxpath">

<input-module name="session-attr"/>

<parameter>user</parameter>

</component-instance>

and in pipeline i used: {jxpath:userName}
This works, but looks weird imo
isn't there a easier way to do that?

"Leszek Gawron" <lg...@mobilebox.pl> wrote in message
news:4222EABC.1060001@mobilebox.pl...
> Ilja Smoli wrote:
> > Hi
> > Thanks for reply..
> > {session-attr:lala} works fine
> > But next problem is if there is an Object in session like User bean i
cannot
> > get its' properties using
> > {session-attr: user.userName}
> > How can I achieve this?
> have a look at:
>
>
http://cocoon.apache.org/2.0/apidocs/org/apache/cocoon/components/modules/input/JXPathMetaModule.html
>
> -- 
> Leszek Gawron                                      lgawron@mobilebox.pl
> Project Manager                                    MobileBox sp. z o.o.
> +48 (61) 855 06 67                              http://www.mobilebox.pl
> mobile: +48 (501) 720 812                       fax: +48 (61) 853 29 65




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


Re: session input module

Posted by Leszek Gawron <lg...@mobilebox.pl>.
Ilja Smoli wrote:
> Hi
> Thanks for reply..
> {session-attr:lala} works fine
> But next problem is if there is an Object in session like User bean i cannot
> get its' properties using
> {session-attr: user.userName}
> How can I achieve this?
have a look at:

http://cocoon.apache.org/2.0/apidocs/org/apache/cocoon/components/modules/input/JXPathMetaModule.html

-- 
Leszek Gawron                                      lgawron@mobilebox.pl
Project Manager                                    MobileBox sp. z o.o.
+48 (61) 855 06 67                              http://www.mobilebox.pl
mobile: +48 (501) 720 812                       fax: +48 (61) 853 29 65

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


Re: session input module

Posted by Ilja Smoli <il...@frontdesk.ee>.
Hi
Thanks for reply..
{session-attr:lala} works fine
But next problem is if there is an Object in session like User bean i cannot
get its' properties using
{session-attr: user.userName}
How can I achieve this?
Thanks..



"Leszek Gawron" <lg...@mobilebox.pl> wrote in message
news:4220348A.5040608@mobilebox.pl...
> Ilja Smoli wrote:
> > Hi
> > For some reason I can not access to my session attributes from sitemap
> > pipeline.
> >
> > I have in my flow script:
> > cocoon.session.setAttribute("lala", "blah blah");
> >
> > In pipeline {session:lala} doesn't work, for the same time for eg.
> > {session:id} works fine.
> isn't the default module name session-attr?
>
> try {session-attr:lala}
>
> >
> > I can get lala in flow and xml as well:
> > In flow: cocoon.session.lala  - works fine
> > In xml doc: ${cocoon.session.lala} - works fine
> > Im stuck..
> > thx in advance
> >
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> > For additional commands, e-mail: users-help@cocoon.apache.org
> >
>
>
> -- 
> Leszek Gawron                                      lgawron@mobilebox.pl
> Project Manager                                    MobileBox sp. z o.o.
> +48 (61) 855 06 67                              http://www.mobilebox.pl
> mobile: +48 (501) 720 812                       fax: +48 (61) 853 29 65




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


Re: session input module

Posted by Leszek Gawron <lg...@mobilebox.pl>.
Ilja Smoli wrote:
> Hi
> For some reason I can not access to my session attributes from sitemap
> pipeline.
> 
> I have in my flow script:
> cocoon.session.setAttribute("lala", "blah blah");
> 
> In pipeline {session:lala} doesn't work, for the same time for eg.
> {session:id} works fine.
isn't the default module name session-attr?

try {session-attr:lala}

> 
> I can get lala in flow and xml as well:
> In flow: cocoon.session.lala  - works fine
> In xml doc: ${cocoon.session.lala} - works fine
> Im stuck..
> thx in advance
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
> 


-- 
Leszek Gawron                                      lgawron@mobilebox.pl
Project Manager                                    MobileBox sp. z o.o.
+48 (61) 855 06 67                              http://www.mobilebox.pl
mobile: +48 (501) 720 812                       fax: +48 (61) 853 29 65

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