You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Мария Григорьева <ma...@gmail.com> on 2008/09/01 15:03:34 UTC

how to pass sitemap params to javaflow?

In sitemap I have the parameter:

 

                    <map:match pattern="main/*/*">

                               <map:call function="{2}">

 
<use-request-parameters>true</use-request-parameters>

                                               <map:parameter name="id"
value="{1}"/>

                               </map:call>

                  </map:match>

 

I need to pass it to the javaflow. 

 

In flowscript I used : var id = cocoon.parameters.id;

 

Help please!


RE: how to pass sitemap params to javaflow?

Posted by Мария Григорьева <ma...@gmail.com>.
I've found the decision!!!

 

Int id = getParameters().getParameterAsInteger("id");

 

But in the classpath you should add Avalon-framework-api.jar

 

 

From: Mark Lundquist [mailto:ml@wrinkledog.com] 
Sent: Monday, September 01, 2008 7:23 PM
To: users@cocoon.apache.org
Subject: Re: how to pass sitemap params to javaflow?

 

 

On Sep 1, 2008, at 6:03 AM, Мария Григорьева wrote:





In sitemap I have the parameter:

 

                    <map:match pattern="main/*/*">

                               <map:call function="{2}">

 
<use-request-parameters>true</use-request-parameters>

                                               <map:parameter name="id"
value="{1}"/>

                               </map:call>

                  </map:match>

 

I need to pass it to the javaflow.

 

In flowscript I used : var id = cocoon.parameters.id;

 

Help please!

 

That looks right to me.  But get rid of the <use-request-parameters>... it's
not part of <map:call> and has no effect there.  It's only for the XSLT
transformer.

 

And speaking of <use-request-parameters> in the XSLT transformer... IMHO
it's a bad idea and you should avoid it! ;-)

 

cheers,

-ml-

 

 


Re: how to pass sitemap params to javaflow?

Posted by Mark Lundquist <ml...@wrinkledog.com>.
On Sep 1, 2008, at 6:03 AM, Мария Григорьева wrote:

> In sitemap I have the parameter:
>
>                     <map:match pattern="main/*/*">
>                                <map:call function="{2}">
>                                                <use-request- 
> parameters>true</use-request-parameters>
>                                                <map:parameter  
> name="id" value="{1}"/>
>                                </map:call>
>                   </map:match>
>
> I need to pass it to the javaflow.
>
> In flowscript I used : var id = cocoon.parameters.id;
>
> Help please!

That looks right to me.  But get rid of the <use-request- 
parameters>... it's not part of <map:call> and has no effect there.   
It's only for the XSLT transformer.

And speaking of <use-request-parameters> in the XSLT transformer...  
IMHO it's a bad idea and you should avoid it! ;-)

cheers,
—ml—