Hello Tomasz,

You can use matchers and selectors nested in parent selector or
matcher like the following:
<map:match ...>
    <map:select type="request-parameter">
        <map:parameter name="parameter-name" value="addinfo"/>
        <map:when test="A">
            <map:match ...>
            ...
            </map:match>
        </map:when>
        <map:when test="A">
            <map:select ...>
            ...
            </map:select>
        </map:when>
        ...
        <map:otherwise>
        ...
        </map:otherwise>
</map:match>

(For cocoon 2.0.4, I don't know about 2.0.3) In addition to the
"request-parameter" selector you can use the "request" matcher that
matches to request parameters also (see the
class org.apache.cocoon.matching.RequestParameterMatcher)
 <map:match type="request" pattern="dest">
     ...
 </map:match>
 
One more way is to use action to analize request parameters and
selector to switch among value resulted by action
<map:act type-"...">
    <map:select type="parameter">
        <map:parameter name="parameter-selector-test"
          value="{param-name-in-the-map-resulted-by-action}"/>
        <map:when test="AB">
            ...
        </map:when>
        <map:when test="AC">
            ...
        </map:when>
        <map:otherwise>
            ...
        </map:otherwise>
    </map:select>
</map:act>
 

TB> Hi all,
TB> I have ulr: www.host/generalpage?addinfo=x&param1=a&param2=b
TB> and want to redirect to different matchers defending on addinfo value.
TB> So my idea is the request param selector:
TB>             <map:match pattern="generalpage">
TB>                 <map:select type="request-parameter">
TB>                     <map:parameter name="parameter-name" value="addinfo"/>
TB>                         <map:when test="A">
TB> !!!                            call matcher pageA !!!!
TB>                         </map:when>
TB>                         <map:when test="B">
TB> !!!                            call matcher pageB !!!!
TB>                         </map:when>
TB>                     <map:otherwise>
TB> !!!                            call matcher pageC !!!!
TB>                     </map:otherwise>
TB>                 </map:select>
TB>             </map:match>

TB> But I cannot find a way to call another matcher.
TB> map:call needs resource not the matcher.
TB> map:redirect-to works but forget about parameters.
TB> So how to do it with map:selector? Or how to do it at all?
TB>    (Cocoon 2.0.3)
TB>        Tomasz Bech




-- 
Best regards,
Peter Velychko                            
[EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to