You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Michael Gerzabek <mi...@gmx.net> on 2004/09/02 21:25:17 UTC

JXTemplateGenerator

Hello,

I'm not sure if this is a bug or me doing wrong:

I'm trying to access session attributes from JXTemplateGenerator as well as
sitemap parameters. I use

1.) <test>${parameters.getParameter("store")}</test>
2.) <test>${session.getAttribute("store")}</test>
3.) <test src="${session.store}"/>
4.) <test src="${request.store}"/>

except of 4.) nothing is working for me.
What am I doing wrong?

Thanks in advance
Michael 


Re: JXTemplateGenerator

Posted by Michael Gerzabek <mi...@gmx.net>.
Doesn't work either. For the input

<test>${cocoon.session.STORE_NAME}</test>
<test>${cocoon.session.getAttribute("STORE_NAME")}</test>
<test>${cocoon.session.getAttribute('STORE_NAME')}</test>
<test>${cocoon.session/STORE_NAME}</test>
<test>#{cocoon.session.STORE_NAME}</test>

I get the results

<test />
<test />
<test />
<test>0</test>
<test />

I'm using C2.1.5.1.

Do I need input modules for that functionality?

Thanks,
Michael

At 21:59 02.09.2004, you wrote:
>Michael Gerzabek wrote:
>
>>Hello,
>>I'm not sure if this is a bug or me doing wrong:
>>I'm trying to access session attributes from JXTemplateGenerator as well as
>>sitemap parameters. I use
>>1.) <test>${parameters.getParameter("store")}</test>
>>2.) <test>${session.getAttribute("store")}</test>
>>3.) <test src="${session.store}"/>
>>4.) <test src="${request.store}"/>
>>except of 4.) nothing is working for me.
>>What am I doing wrong?
>>Thanks in advance
>>Michael
>should use $cocoon.session
>
>--
>Leszek Gawron                                      lgawron@mobilebox.pl


Re: JXTemplateGenerator

Posted by Michael Gerzabek <mi...@gmx.net>.
At 11:23 03.09.2004, you wrote:
>Michael Gerzabek wrote:
>
>>The best thing is - my session parameters are gone after I use
>>those statements. Before I call the page they are there and
>>afterwards they are gone.
><jx:when test="${cocoon.session.user == null}">
>works like a charm for me.

Could it be that the problem origins from using JXTG outside
the flow?

I've a flow scripts that handles login() and a bunch of stateless pages.
I use for these pages also the JXTG where I try to read some parameters
from session that the login() function had put there before.

Regards,
Michael


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


Re: JXTemplateGenerator

Posted by Leszek Gawron <lg...@mobilebox.pl>.
Michael Gerzabek wrote:

> The best thing is - my session parameters are gone after I use
> those statements. Before I call the page they are there and
> afterwards they are gone.
<jx:when test="${cocoon.session.user == null}">
works like a charm for me.

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

Re: JXTemplateGenerator

Posted by Michael Gerzabek <mi...@gmx.net>.
The best thing is - my session parameters are gone after I use
those statements. Before I call the page they are there and
afterwards they are gone.

Strange. Any idea?

Regards,
Michael

At 21:59 02.09.2004, you wrote:
>Michael Gerzabek wrote:
>
>>Hello,
>>I'm not sure if this is a bug or me doing wrong:
>>I'm trying to access session attributes from JXTemplateGenerator as well as
>>sitemap parameters. I use
>>1.) <test>${parameters.getParameter("store")}</test>
>>2.) <test>${session.getAttribute("store")}</test>
>>3.) <test src="${session.store}"/>
>>4.) <test src="${request.store}"/>
>>except of 4.) nothing is working for me.
>>What am I doing wrong?
>>Thanks in advance
>>Michael
>should use $cocoon.session
>
>--
>Leszek Gawron                                      lgawron@mobilebox.pl


Re: JXTemplateGenerator

Posted by Leszek Gawron <lg...@mobilebox.pl>.
Michael Gerzabek wrote:

> Hello,
> 
> I'm not sure if this is a bug or me doing wrong:
> 
> I'm trying to access session attributes from JXTemplateGenerator as well as
> sitemap parameters. I use
> 
> 1.) <test>${parameters.getParameter("store")}</test>
> 2.) <test>${session.getAttribute("store")}</test>
> 3.) <test src="${session.store}"/>
> 4.) <test src="${request.store}"/>
> 
> except of 4.) nothing is working for me.
> What am I doing wrong?
> 
> Thanks in advance
> Michael
should use $cocoon.session

-- 
Leszek Gawron                                      lgawron@mobilebox.pl