Dear All,

I am trying to use the RequestSelector, without much luck so far.

Can anyone confirm that <a> it works and <b> I am using it correctly.


(sub)Sitemap snippet:

        setup

                <map:selectors default="browser">
                        <!-- tests value of incoming form param 'crudlet.login.action' 
-->
                        <map:selector name="form-submitted"
src="org.apache.cocoon.selection.RequestSelectorFactory">
                                <map:parameter name="parameter-name" 
value="crudlet.login.action"/>
                        </map:selector>
                </map:selectors>

        usage

                <map:resource name="do-login">
                        <map:select type="form-submitted"> <!-- **** test not working 
**** -->
                                <map:when test="login">
                                        <!-- do a bunch of stuff -->
                                </map:when>
                                <map:otherwise> <!-- a login form was not submitted -->
                                        <map:act type="session-propagator">
                                                <map:parameter 
name="crudlet.login.state" value="timeout"/>
                                                <map:parameter 
name="crudlet.login.target" value="{target}"/>
                                        </map:act>
                                        <map:redirect-to resource="login-fs"/>
                                </map:otherwise>
                        </map:select>
                        <map:redirect-to resource="login-fs"/>
                </map:resource>

This outputs code to my sitemap_xmap.java that appears it would not work
(See the "null"s):


  private boolean form_submittedSelect (String pattern,
                                        Map objectModel, Parameters param) {
    String compareToString = null;
    if (param == null) {
      compareToString = (String) XSPRequestHelper.getParameter(objectModel,
                        "null",null);
    } else {
      compareToString = (String) XSPRequestHelper.getParameter(objectModel,
                        param.getParameter("state-key","null"), null);
    }
    return compareToString != null && compareToString.equals (pattern);
  }

 It does not appear to be picking up my request param name in the config.


Any suggestions?


thanks

regards Jeremy
-- 
   ___________________________________________________________________

   Jeremy Quinn                                           Karma Divers
                                                       webSpace Design
                                            HyperMedia Research Centre

   <mailto:[EMAIL PROTECTED]>                    <http://www.media.demon.co.uk>
    <phone:+44.[0].20.7737.6831>        <pager:[EMAIL PROTECTED]>

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

Reply via email to