On Wed, 2011-04-27 at 12:03 +0200, Robby Pelssers wrote:
> Hi Luca,
> 
> thx for the reply...  That was indeed the first option for me to consider.  
> Unfortunately this solution will not work for me since I setup a highly 
> generic pipeline which starts an xquery generator.  So basically the correct 
> xquery is generated and the idea is that all needed parameters are set by the 
> xquery generator from request parameters as well as post parameters which are
> different for each xquery.
> 
>         <map:generate src="xquery/{1}.xquery" type="queryStringXquery">
>           <map:parameter name="contextPath" value="{request:contextPath}"/>
>           <!-- does not work for post parameters
>                 <map:parameter name="queryString" 
> value="{request:queryString}"/>
>            -->
>         </map:generate>
> 
> I'm actually debugging the custom Xquery Generator now and it seems somehow 
> deeply nested I can retrieve those parameters from 'Map objectModel' without 
> the need to inject them from within my sitemap.  Will keep you posted ;-)
> 
>      void setup(SourceResolver resolver, Map objectModel, String source, 
> Parameters parameters)

If the component is "under your control" why not use the objectModel to
get the request in the setup and do it from there:

 Request request =
org.apache.cocoon.environment.ObjectModelHelper.getRequest(objectModel);

Has the benefit that you get rid of  <map:parameter name="queryString"
value="{request:queryString}"/> all together in the sitemap.

HTH

salu2

> 
> Kind regards,
> Robby
> 
> 
> -----Oorspronkelijk bericht-----
> Van: Luca Morandini [mailto:lmorand...@ieee.org]
> Verzonden: wo 27-4-2011 11:29
> Aan: users@cocoon.apache.org
> Onderwerp: Re: how to access post parameters from sitemap
>  
> On 04/26/2011 04:10 PM, Robby Pelssers wrote:
> >
> > When I post to this url  firebug shows the id's are posted just fine. But 
> > when
> > I debug the queryString is null when making post requests.
> 
> When POST method is used, query string is null, since parameters are passed 
> in the 
> body of the request.
> 
> 
> > Is there some cocoon component which allows me to get access to BOTH request
> > and post parameters?
> 
> To access said paramerers, a simple "request-param" should do, for instance:
>              <map:call function="addPerson">
>                <map:parameter name="bizdata" value="{request-param:bizdata}"/>
>              </map:call>
> 
> Regards,
> 
> Luca Morandini
> http://www.lucamorandini.it
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org
> For additional commands, e-mail: users-h...@cocoon.apache.org
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org
> For additional commands, e-mail: users-h...@cocoon.apache.org
> 

-- 
Thorsten Scherler <thorsten.at.apache.org>
codeBusters S.L. - web based systems
<consulting, training and solutions>
http://www.codebusters.es/


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

Reply via email to