You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by navrc <na...@seznam.cz> on 2008/06/02 11:04:39 UTC
get map parameter in JX template
Hallo,
How can I get a map parameter in JX template. I'm using cocoon 2.1.11. In
sitemap I have:
<map:match pattern="AAA">
<map:generate type="jx" src="jx_test.xml">
<map:parameter name="test" value="testValue"/>
</map:generate>
<map:serialize type="xml"/>
</map:match>
And in template I have:
${cocoon.parameters('test')}
${cocoon.parameters.test}
There is no output.
But when I write only ${cocoon.parameters} I get:
Parameters[r/w]:{test=testValue}
Whot I do wrong.
Many thanks.
Pavel Navrkal
--
View this message in context: http://www.nabble.com/get-map-parameter-in-JX-template-tp17596912p17596912.html
Sent from the Cocoon - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
RE: get map parameter in JX template
Posted by Jasha Joachimsthal <j....@onehippo.com>.
If you try
<map:generate type="newjx" src="jx_test.xml">
Do you get any value then?
Jasha Joachimsthal
www.onehippo.com
Amsterdam - Hippo B.V. Oosteinde 11 1017 WT Amsterdam +31(0)20-5224466
San Francisco - Hippo USA Inc. 101 H Street, suite Q Petaluma CA
94952-3329 +1 (707) 773-4646
> -----Original Message-----
> From: navrc [mailto:navrkal.pavel@seznam.cz]
> Sent: maandag 2 juni 2008 11:05
> To: users@cocoon.apache.org
> Subject: get map parameter in JX template
>
>
> Hallo,
> How can I get a map parameter in JX template. I'm using
> cocoon 2.1.11. In sitemap I have:
>
> <map:match pattern="AAA">
> <map:generate type="jx" src="jx_test.xml">
> <map:parameter name="test" value="testValue"/>
> </map:generate>
> <map:serialize type="xml"/> </map:match>
>
> And in template I have:
> ${cocoon.parameters('test')}
> ${cocoon.parameters.test}
>
> There is no output.
>
> But when I write only ${cocoon.parameters} I get:
>
> Parameters[r/w]:{test=testValue}
>
> Whot I do wrong.
>
> Many thanks.
> Pavel Navrkal
>
>
> --
> View this message in context:
> http://www.nabble.com/get-map-parameter-in-JX-template-tp17596
> 912p17596912.html
> Sent from the Cocoon - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> 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
RE: get map parameter in JX template
Posted by Jasha Joachimsthal <j....@onehippo.com>.
Different class
>From the Cocoon 2.1.11 main sitemap:
<map:generator label="content" logger="sitemap.generator.jx" name="jx"
pool-max="${jx-generator.pool-max}"
src="org.apache.cocoon.generation.JXTemplateGenerator"/>
<map:generator label="content" logger="sitemap.generator.jx"
name="newjx" pool-max="16"
src="org.apache.cocoon.template.JXTemplateGenerator"></map:generator>
Regards,
Jasha
> -----Original Message-----
> From: navrc [mailto:navrkal.pavel@seznam.cz]
> Sent: maandag 2 juni 2008 11:15
> To: users@cocoon.apache.org
> Subject: Re: get map parameter in JX template
>
>
> Yes, with newjx it is OK. What is the different between jx and newjx.
>
> Thanks
> Pavel
> --
> View this message in context:
> http://www.nabble.com/get-map-parameter-in-JX-template-tp17596
> 912p17597084.html
> Sent from the Cocoon - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> 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
Re: get map parameter in JX template
Posted by navrc <na...@seznam.cz>.
Yes, with newjx it is OK. What is the different between jx and newjx.
Thanks
Pavel
--
View this message in context: http://www.nabble.com/get-map-parameter-in-JX-template-tp17596912p17597084.html
Sent from the Cocoon - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: get map parameter in JX template
Posted by Derek Hohls <DH...@csir.co.za>.
In your sitemap add:
<use-request-parameters>true</use-request-parameters>
ie.
<map:match pattern="AAA">
<map:generate type="jx" src="jx_test.xml">
<use-request-parameters>true</use-request-parameters>
<map:parameter name="test" value="testValue"/>
...
and near the top of the template use:
<jx:set var="test" value="${cocoon.parameters.test}"/>
and to display/use in template body:
${test}
>>> On 2008/06/02 at 11:04, in message <17...@talk.nabble.com>, navrc <na...@seznam.cz> wrote:
Hallo,
How can I get a map parameter in JX template. I'm using cocoon 2.1.11. In
sitemap I have:
<map:match pattern="AAA">
<map:generate type="jx" src="jx_test.xml">
<map:parameter name="test" value="testValue"/>
</map:generate>
<map:serialize type="xml"/>
</map:match>
And in template I have:
${cocoon.parameters('test')}
${cocoon.parameters.test}
There is no output.
But when I write only ${cocoon.parameters} I get:
Parameters[r/w]:{test=testValue}
Whot I do wrong.
Many thanks.
Pavel Navrkal
--
View this message in context: http://www.nabble.com/get-map-parameter-in-JX-template-tp17596912p17596912.html
Sent from the Cocoon - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
--
This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice, and implemented Open Document Format (ODF) standard.
The full disclaimer details can be found at http://www.csir.co.za/disclaimer.html.
This message has been scanned for viruses and dangerous content by MailScanner,
and is believed to be clean. MailScanner thanks Transtec Computers for their support.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org