org.apache.cocoon.selection
Class ParameterSelector

java.lang.Object
  extended byorg.apache.cocoon.selection.ParameterSelector
All Implemented Interfaces:
org.apache.cocoon.selection.Selector, ThreadSafe

public class ParameterSelector
extends Object
implements ThreadSafe, org.apache.cocoon.selection.Selector

A Selector that matches a string in the parameters object passed to it.

  <map:selector name="parameter" factory="org.apache.cocoon.selection.ParameterSelector"/>

   <map:select type="parameter">
      <map:parameter name="parameter-selector-test" value="{mySitemapParameter}"/>

      <map:when test="myParameterValue">
         <!-- executes iff {mySitemapParameter} == "myParameterValue" -->
         <map:transform src="stylesheets/page/uk.xsl"/>
      </map:when>
      <map:otherwise>
         <map:transform src="stylesheets/page/us.xsl"/>
      </map:otherwise>
   </map:select>
 
The purpose of this selector is to allow an action to set parameters and to be able to select between different pipeline configurations depending on those parameters.

Version:
$Id: ParameterSelector.html 1304280 2012-03-23 11:18:01Z ilgrosso $

Field Summary
 
Fields inherited from interface org.apache.cocoon.selection.Selector
ROLE
 
Constructor Summary
ParameterSelector()
           
 
Method Summary
 boolean select(String expression, Map objectModel, Parameters parameters)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ParameterSelector

public ParameterSelector()
Method Detail

select

public boolean select(String expression,
                      Map objectModel,
                      Parameters parameters)
Specified by:
select in interface org.apache.cocoon.selection.Selector


Copyright 1999-2008 The Apache Software Foundation. All Rights Reserved.