You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Johnson <jo...@soho.club.tw> on 2004/11/03 15:10:04 UTC

how to use cocoon.session.getAttribute() in cform template

Hi!

I want to use cocoon.session.getAttribute() in cform template's javascript,
but the cocoon say cocoon object not found,
how to refer the cocoon object in cform template

Best Regards

Johnson

Re: how to use cocoon.session.getAttribute() in cform template

Posted by Johnson <jo...@soho.club.tw>.
If I use jx,how to send para or session to form,
If I use showForm,I can't send any para
If I use sendPage,continue will error.

johnson

----- Original Message ----- 
From: "Leszek Gawron" <lg...@mobilebox.pl>
To: <us...@cocoon.apache.org>
Sent: Thursday, November 04, 2004 5:04 PM
Subject: Re: how to use cocoon.session.getAttribute() in cform template


> Johnson wrote:
>> I use form.showForm("sa1-display-pipeline");
>> can I use jx to do this
> nothing changes here
> 
> -- 
> 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: how to use cocoon.session.getAttribute() in cform template

Posted by Leszek Gawron <lg...@mobilebox.pl>.
Johnson wrote:
> I use form.showForm("sa1-display-pipeline");
> can I use jx to do this
nothing changes here

-- 
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: how to use cocoon.session.getAttribute() in cform template

Posted by Johnson <jo...@soho.club.tw>.
I use form.showForm("sa1-display-pipeline");
can I use jx to do this

johnson


----- Original Message ----- 
From: "Leszek Gawron" <lg...@mobilebox.pl>
To: <us...@cocoon.apache.org>
Sent: Thursday, November 04, 2004 4:23 PM
Subject: Re: how to use cocoon.session.getAttribute() in cform template


> Johnson wrote:
>> I use the default sitemap
>> 
>>     <map:match pattern="*-display-pipeline">
>>       <!-- pipeline to show the form -->
>>       <map:generate src="forms/{1}_template.xml"/>
>>       <map:transform type="forms"/>
>>       <map:transform type="i18n">
>>         <map:parameter name="locale" value="{request:locale}"/>
>>      </map:transform>
> no such thing as the *default* sitemap :)
> 
> 
> what you should do is to declare JXTemplateGenerator in your sitemap:
> <map:generator name="jx" 
> src="org.apache.cocoon.generation.JXTemplateGenerator" label="content" 
> logger="sitemap.generator.jx"/>
> 
> and then use it like this:
> <map:generate src="forms/{1}_template.xml" type="jx"/>
> 
> so you can use all JXTG goodies.
> 
> HTH
> 
> -- 
> Leszek Gawron                                      lgawron@mobilebox.pl
>

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


Re: how to use cocoon.session.getAttribute() in cform template

Posted by Leszek Gawron <lg...@mobilebox.pl>.
Johnson wrote:
> I use the default sitemap
> 
>     <map:match pattern="*-display-pipeline">
>       <!-- pipeline to show the form -->
>       <map:generate src="forms/{1}_template.xml"/>
>       <map:transform type="forms"/>
>       <map:transform type="i18n">
>         <map:parameter name="locale" value="{request:locale}"/>
>      </map:transform>
no such thing as the *default* sitemap :)


what you should do is to declare JXTemplateGenerator in your sitemap:
<map:generator name="jx" 
src="org.apache.cocoon.generation.JXTemplateGenerator"	label="content" 
logger="sitemap.generator.jx"/>

and then use it like this:
<map:generate src="forms/{1}_template.xml" type="jx"/>

so you can use all JXTG goodies.

HTH

-- 
Leszek Gawron                                      lgawron@mobilebox.pl

Re: how to use cocoon.session.getAttribute() in cform template

Posted by Johnson <jo...@soho.club.tw>.
I use the default sitemap

     <map:match pattern="*-display-pipeline">
       <!-- pipeline to show the form -->
       <map:generate src="forms/{1}_template.xml"/>
       <map:transform type="forms"/>
       <map:transform type="i18n">
         <map:parameter name="locale" value="{request:locale}"/>
      </map:transform>

johnson

----- Original Message ----- 
From: "Leszek Gawron" <lg...@mobilebox.pl>
To: <us...@cocoon.apache.org>
Sent: Wednesday, November 03, 2004 10:39 PM
Subject: Re: how to use cocoon.session.getAttribute() in cform template


> Johnson wrote:
>> Hi!
>>  I want to use cocoon.session.getAttribute() in cform template's 
>> javascript,
>> but the cocoon say cocoon object not found,
>> how to refer the cocoon object in cform template
> you are problably not generating your template via JXTemplateGenerator, am 
> I right?
>
>
> -- 
> 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: how to use cocoon.session.getAttribute() in cform template

Posted by Leszek Gawron <lg...@mobilebox.pl>.
Johnson wrote:
> Hi!
>  
> I want to use cocoon.session.getAttribute() in cform template's javascript,
> but the cocoon say cocoon object not found,
> how to refer the cocoon object in cform template
you are problably not generating your template via JXTemplateGenerator, am I 
right?


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