cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sylvain Wallez <sylvain.wal...@anyware-tech.com>
Subject Re: [C2] Question - passing parameters to a generator
Date Fri, 18 May 2001 08:29:06 GMT


Torsten Curdt a écrit :
> 
> On Fri, 18 May 2001, Bentley, Tim wrote:
> 
> > I had thought that it was possible to pass parameters to an xsp page from
> > the sitemap like this:
> >
> > <map:match pattern="apage.xml">
> >   <map:generate type="serverpages" src="timtest/dealwithapage.xml">
> >     <parameter name="myparam" value="paramvalue"/>
> >   </map:generate>
> >   <map:serialize/>
> > </map:match>
> >
> > I am trying to access the parameter in the page using
> > <xsp-request:get-parameter>, but it's not coming through.  Shoudl this be
> > possible, and if so, an someone tell me what am I doing wrong?
> 
> Do you want to access it within a logicsheet as XSLT variable or
> as java object in your XSP page? (Looks like you want an object)
> 
> I had a look at this, too. The parameters are not yet passed to
> the code generating transformer. So a big "no" for the first one.
> (But I think this should become a "yes" for consistency reasons)
> 

The aren't passed to the code generating transformer because their value
may change for each request, and so passing them to logicsheets would
require to regenerate and recompile XSP code for each request.

> The second one should work....
> 
> Did you have a look at the compiled sitemap?
> 
> You might want to try this as a work around:
> 
>     <map:match pattern="apage.xml">
>       <map:act set="action">
>         <parameter name="myparam" value="paramvalue"/>
>         <map:generate type="serverpages" src="timtest/dealwithapage.xml">
>       </map:act>
>       <map:serialize type="xml"/>
>      </map:match>
> 
> This is how I use it...
> 
> Hope this helps
> --
> Torsten
> 
Tim's sitemap snippet is OK : sitemap parameters are accessible in XSP
with "parameters.getParameter()" (see my previous post)
-- 
Sylvain Wallez
Anyware Technologies - http://www.anyware-tech.com

---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

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


Mime
View raw message