Meanwhile I've found a workaround for this:

For setting parameters you can set request attributes within the action and
use the RequestAttributeSelector for selecting the pipeline. I think it
could be helpful to write a special action which can set an arbitrary
request attribute for this purpose, so that there will be a mechanism to set
request attributes inside the sitemap.

By the way, is there a tag like <parameter> for sitemap parameter which can
set a request parameter? Is it possible to provide this with the new cocoon
release?

Regards,
- Volker -

-----Original Message-----
From: Volker Schneider [mailto:[EMAIL PROTECTED]]
Sent: Dienstag, 9. April 2002 14:00
To: [EMAIL PROTECTED]
Subject: Problem with ParameterSelector


Hi colleagues,

I have big problems to get the ParameterSelector working. I want to set a
parameter inside an action set and execute different pipelines dependent on
this value. I looked into the documentation samples and into the
ParameterSelector class itself and took the samples from there. I spent many
hours to get it working but it will not work :-(

Please help me, I can't believe that there isn't a way to do that with
cocoon:

  <map:action-set name="XY">
        <map:act type="XYTestAction" action="rlist">
          <map:parameter name="method" value="rlist_method"/>
    </map:act>

        <map:act type="XYTestAction2" action="rlist2">
          <map:parameter name="method" value="rlist2_method"/>
     </map:act>
  </map:action-set>
...
   <map:match pattern="route/submit_full">
    <map:act set="XY">
      <map:select type="parameter">
        <map:parameter name="parameter-selector-test" value="{$method}"/>

        <map:when test="rlist_method">
              <map:generate type="route"/>
                  <map:transform src="prototyp/routelist.xsl"/>
              <map:serialize/>
        </map:when>

        <map:otherwise>
              <map:generate type="route"/>
            <map:transform src="prototyp/routelisterr.xsl"/>
            <map:serialize/>
        </map:otherwise>

          </map:select>
        </map:act>
   </map:match>

I tried the "parameter-selector-test"-value as {method} and {$method} as
said in the class comment. Both does not work.

Who can help?

Best regards
- Volker -




---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

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


---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

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

Reply via email to