cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stephan Michels <step...@apache.org>
Subject Re: Java flow: Passing parameters in actions
Date Wed, 23 Jun 2004 09:22:36 GMT
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


Mime
View raw message