cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Haul <h...@dvs1.informatik.tu-darmstadt.de>
Subject Re: [C2] docs: draft on matchers and selectors
Date Wed, 27 Jun 2001 16:49:59 GMT
On 27.Jun.2001 -- 12:20 PM, Seth Ladd wrote:
> I have a quick question.  Can XSP pages see and take advantage of the Map
> that is returned from the Action?  This concept of the Map (and the
> objectModel) is some of the last pieces that I'm still trying to wrap my
> head around.

No, you can't AFAIK. But see below

"Giacomo Pati" wrote:
> "Morrison, John" wrote:
> >
> > How do I can I use wildcard matching in the path and pass the results to an
> > xsp page as a parameter?
>  
> Use:
>  
>    <map:match pattern="*/*/*/*/report.html">
>     <map:generate type="serverpages" src="docs/getPostcodeData.xsp">
>      <parameter name="postcode" value="{1}{2} {3}{4}"/>
>     </map:generate>
>     <map:transform src="stylesheets/html/report.xsl"/>
>     <map:serialize/>
>    </map:match>
>  
> The parameters are accessible in your xsp page as
>  
> 	  org.apache.avalon.Parameters parameters;

Then you can use <xsp:expr>parameters.getParameter("postcode")</xsp:expr>

Other solutions would be:
* request attributes
* session attributes

Map is usually java.util.HashMap. It it used to store an arbitrary
number of return parameters from actions, matchers &c. They are
organised hierarchically and accessed through a X-Path like
syntax. New maps are added at a lower level.

objectModel keeps some of the environment and is created in
org.apache.cocoon.environment.http.HttpEnvironment for HTTP and for
commandline in a similar class.

	Chris.

-- 
C h r i s t i a n       H a u l
haul@informatik.tu-darmstadt.de
    fingerprint: 99B0 1D9D 7919 644A 4837  7D73 FEF9 6856 335A 9E08

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


Mime
View raw message