cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andy Stevens" <insomniacpeng...@googlemail.com>
Subject Re: RegexpRequestParameterSelector unable to get working.
Date Wed, 07 May 2008 16:43:19 GMT
2008/5/6 Gordore <mibeaum@yahoo.co.uk>:
>  <map:match pattern="test">
>         <map:generate src="content/group.xml" />
>         <map:act type="request">
>                 <map:parameter name="parameters" value="true" />
>                 <map:select type=" request-param-regexp">
>                         <map:parameter name="parameter-name" value="{group}" />
>                         <map:when test="groups">
>         <map:transform type="xslt" src="xslt/text.xslt">
>                 <map:parameter name="arg" value="true" />
>         </map:transform>
>  </map:when>
>  <map:otherwise>
>         <map:transform type="xslt" src="xslt/text.xslt">
>                 <map:parameter name="arg" value="false" />
>         </map:transform>
>  </map:otherwise>
>                 </map:select>
>             </map:act>
>  <map:serialize type="html" />
>  </map:match>
>
>  http://server/cocoon/test?group=admin
>         arg = false
>
>  http://server/cocoon/test?group=user
>             arg = false

I see you have <map:parameter name="parameter-name" value="{group}" />
The -name suggests this map:parameter should be the name of the
request parameter to check rather than its value, which is what you're
supplying.  Try using just value="group" instead of {group}.
Otherwise, those requests are telling it to do the regexp tests
against the admin and user request parameters, which don't exist...
And since the selector looks up the specified request parameter
itself, that <map:act type="request"> is unnecessary too, unless you
need it for some other sitemap component.


Andy
-- 
http://pseudoq.sourceforge.net/  Open source java Sudoku generator

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


Mime
View raw message