You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by johan coens <jo...@hotmail.com> on 2004/06/22 20:00:43 UTC
Java flow: Passing parameters in actions
Hello,
How do you read parameters you pass to your action in java flow?
Sample call:
<map:call function="myCall">
<map:parameter name="handler" value="com.myHandler"/>
<map:parameter name="myParam" value="theValue"/>
</map:call>
In com.myHandler which extends AbstractContinuable, how do i read the
parameter myParam?
Regards,
Johan
_________________________________________________________________
MSN Zoeken, voor duidelijke zoekresultaten! http://search.msn.nl
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: Java flow: Passing parameters in actions
Posted by Stephan Michels <st...@apache.org>.
Am Di, den 22.06.2004 schrieb johan coens um 20:00:
> Hello,
>
> How do you read parameters you pass to your action in java flow?
>
> Sample call:
> <map:call function="myCall">
> <map:parameter name="handler" value="com.myHandler"/>
> <map:parameter name="myParam" value="theValue"/>
> </map:call>
>
> In com.myHandler which extends AbstractContinuable, how do i read the
> parameter myParam?
Seems that I have missed the parameters. I have now added them, and you
can use them like this
public void doParameterTest() throws Exception {
Assert.assertEquals("abc", getParameters().getParameter("p1"));
Assert.assertEquals("def", getParameters().getParameter("p2"));
Assert.assertEquals(2.3f, getParameters().getParameterAsFloat("p3"), 0.1f);
}
Please tell me if you are comfortable with the usage.
Stephan Michels.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org