cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Berin Loritsch <blorit...@apache.org>
Subject Re: [c2] use examples for sendRedirect in xsp pages
Date Wed, 18 Apr 2001 20:55:56 GMT
Donald Ball wrote:
> 
> On Wed, 18 Apr 2001, Berin Loritsch wrote:
> 
> > The other solution is to return values in the map that specify error, etc.
> > If only the Selectors let you expand values....  It would be great to do something
> > with the CodedSelector like this:
> >
> > <map:act type="add-work">
> >   <map:select>
> >     <map:when test="&qout;data&quot.equals({error-type})">
> >       <map:redirect-to uri="insufficient-data.html"/>
> >     </map:when>
> >     <map:when test="&quot;jdbc&quot;.equals({error-type})">
> >       <map:redirect-to uri="database-error.html"/>
> >     </map:when>
> >     <map:otherwise>
> >       <map:redirect-to uri="success.html"/>
> >     </map:otherwise>
> >   </map:select>
> > </map:act>
> >
> > Unfortunately, the sitemap doesn't expand test values.
> 
> hmm, but the map that the action returns is available in that context,
> right? so it should be possible to modify the CodedSelector to transform
> {} variables into calls to the map, right? e.g.
> 
> {foo} turns into map.get("foo") or (String)map.get("foo")

Yes, but using the coded selector is already messy enough.  It is possible,
but it requires intimate knowledge of sitemap variable names and constructs.
The average user isn't going to know that.

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


Mime
View raw message