cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Olivier Billard <obill...@rennes.jouve.fr>
Subject Re: Null instead of value while passing map:parameter to XSPAction
Date Fri, 09 Jan 2004 11:11:23 GMT
You're passing the parameter to the matcher instead of the action...
try :
   <map:pipeline>
    <map:match pattern="action.dosomething">
     <cut-it-here/>
     <map:act type="xsp-action" src="serverpages/actions/dosomething.xsp">
       <paste-it-there/>
       <map:parameter name="teststring" value="4213"/>
      <!-- on action:set-success -->
        <map:redirect-to uri="welcome"/>
     </map:act>
     <!-- on action:set-failure -->
      <map:redirect-to uri="welcome"/>
    </map:match>
   </map:pipeline>


On 09/01/2004 12:09, Hubert Trzewik (Prosystel) wrote:
> I still cannot get ride with passing parameters from sitemap to XSPAction.
> In this simple example below teststring_logic gets "null" value instead of
> "4213". Why?
> 
> -- part of SITEMAP --
>  <map:pipeline>
>   <map:match pattern="action.dosomething">
>    <map:parameter name="teststring" value="4213"/>
>    <map:act type="xsp-action" src="serverpages/actions/dosomething.xsp">
>     <!-- on action:set-success -->
>       <map:redirect-to uri="welcome"/>
>    </map:act>
>    <!-- on action:set-failure -->
>     <map:redirect-to uri="welcome"/>
>   </map:match>
>  </map:pipeline>
> 
> 
> 
> -- DOSOMETHING.XSP --
> <xsp:page
>           language="java"
>           xmlns:xsp="http://apache.org/xsp"
>           xmlns:esql="http://apache.org/cocoon/SQL/v2"
>           xmlns:xsp-request="http://apache.org/xsp/request/2.0"
>           xmlns:util="http://apache.org/xsp/util/2.0"
>           xmlns:action="http://apache.org/cocoon/action/1.0"
>           xmlns:dosomething="http://dosomething"
> 
> 
> 
> <dummypage>
> 
>  <xsp:logic>
>   String teststring_logic = <util:get-sitemap-parameter name="teststring"/>;
>  </xsp:logic>
> 
> <dosomething:do><xsp:expr>teststring_logic</xsp:expr></dosomething:do>
> <action:set-success/>
> 
> </dummypage>
> 
> </xsp:page>
> 
> 
> 
> --
> Hubert Trzewik
> Prosystel Sp. z o.o.
> hubert.trzewik@prosystel.com.pl


-- 
Olivier BILLARD



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


Mime
View raw message