home *** CD-ROM | disk | FTP | other *** search
/ PC Professionell 2004 December / PCpro_2004_12.ISO / files / webserver / xampp / xampp-cocoon-addon-1.4.9-installer.exe / faq-actions.xml < prev    next >
Encoding:
Extensible Markup Language  |  2004-07-12  |  2.1 KB  |  62 lines

  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3.   Copyright 1999-2004 The Apache Software Foundation
  4.  
  5.   Licensed under the Apache License, Version 2.0 (the "License");
  6.   you may not use this file except in compliance with the License.
  7.   You may obtain a copy of the License at
  8.  
  9.       http://www.apache.org/licenses/LICENSE-2.0
  10.  
  11.   Unless required by applicable law or agreed to in writing, software
  12.   distributed under the License is distributed on an "AS IS" BASIS,
  13.   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14.   See the License for the specific language governing permissions and
  15.   limitations under the License.
  16. -->
  17. <!DOCTYPE faqs PUBLIC "-//APACHE//DTD FAQ V1.0//EN" "faq-v10.dtd">
  18.  
  19. <faqs title="Action FAQs">
  20.  
  21. <faq>
  22.   <question>
  23.    What is an Action?
  24.   </question>
  25.   <answer>
  26.   <p>
  27. An Action is a sitemap component that manipulates runtime parameters based on request and application state. An Action's result is available in the sitemap as map of name/value pairs. Detailed information on actions may be found in <link href="../userdocs/concepts/actions.html">Creating and Using Actions</link>.
  28. </p>
  29.   </answer>
  30. </faq>
  31.  
  32. <faq>
  33.   <question>Why does Cocoon return an error when I add an action to a pipeline?</question>
  34.   <answer>
  35.   <p>The pipeline was working fine before the action was added. After
  36.   the change, Cocoon seems unable to find the file specified in the
  37.   variable that is returned by the matcher.</p>
  38.  
  39. <source><![CDATA[
  40. <map:match pattern="*">
  41.   <map:act type="validate-session">
  42.     <map:generate type="serverpages" src="{../1}.xsp"/>
  43.   </map:act>
  44.   <map:serialize/>
  45. </map:match>
  46. ]]></source>
  47.  
  48.   <p>Please note in the above example the "<em><code>../1</code></em>".</p> 
  49.   <p>Map objects returned from matchers and actions are organised
  50.   <em>hierarchically</em>. Therefore, old map objects are not replaced by new ones,
  51.   such as the map objects returned by the validate-session action above.
  52.   Because older map objects are still accessible through a path expression, new ones are
  53.   accessed differently. Here "<code>../1</code>" references key ( or "variable") "1" 
  54.   in the next to last Map. </p>
  55.   </answer>
  56. </faq>
  57.  
  58.  
  59.  
  60.  
  61. </faqs>
  62.