cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rice Yeh" <rice...@gmail.com>
Subject Re: [cocoon 2.2.x] how to get request params in called block?
Date Wed, 01 Aug 2007 12:07:54 GMT
There is a patch for cocoon-2066 in JIRA written by me that can solve this
problem.

Rice

On 8/1/07, Grzegorz Kossakowski <gkossakowski@apache.org> wrote:
>
> xweber pisze:
> > hi,
> >
> > i want to deal e.g. html POST parameters in the called block. The
> sitemap in
> > myBlock1 has something like:
> > <map:generate src="servlet:myBlock2:/dosomeprocessing"/>
> >
> > but unfortunatly in the called block all parameters are gone.
>
> It's a known problem and limitation of current implementation. See
> COCOON-2050[1] for some details.
> Alex, actually I recommend you taking a look at JIRA page[2] for Servlet
> Service framework issues overview. This will give an idea what's
> already there and what's not.
>
> Also, voting for particular issues can speed up process of implementing
> them. Of course you should choose issues carefully, voting for all
> of them will not help us anyhow. Speaking about myself, I would be very
> happy to work on all these issues but currently I'm busy with my
> Google of Summer tasks that have highest priority.
>
> > so, how to get request params in called block?
>
> If parameters are simple strings you can pass them using such construct:
> servlet:someblock:/somepipeline?request1={request-param:request1}
>
> Of course, such solution has it's own limitations but may be sufficient in
> many situations.
>
> As you want to use some pipeline for processing XML stream I think that
> the best way would be to use servletService transformer.
> You need your XML data in the pipeline, so you should use:
> <map:generate type="stream">
>    <map:parameter name="form-name" value="name_of_request_parameter"/>
> <!-- the name 'form-name' is rather misleading -->
> </map:generate>
>
> And then you should use servletService transformer:
> <map:transform type="servletService">
>    <map:parameter name="service"
> value="servlet:myBlock2:/dosomeprocessing"/>
> </map:transform>
>
> > Alex
> >
> > PS: is there any "pure" cocoon 2.2 project out there, so i could get a
> sneak
> > peak how to put all things together?
>
> Unfortunately, not yet. I'm working on such project, but as I said above,
> GSoC is more important for me now.
>
>
> [1] https://issues.apache.org/jira/browse/COCOON-2050
> [2]
> https://issues.apache.org/jira/secure/IssueNavigator.jspa?sorter/field=created&sorter/order=DESC
>
>
> --
> Grzegorz Kossakowski
> http://reflectingonthevicissitudes.wordpress.com/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
>

Mime
View raw message