root/branches/0.11/samples/app/config/global_filters.xml

Revision 3304, 1.6 KB (checked in by david, 2 weeks ago)

added more best practices to code templates and generated system actions, closes #910 and #911

  • Property svn:keywords set to Id
Line 
1<?xml version="1.0" encoding="UTF-8"?>
2<configurations xmlns="http://agavi.org/agavi/1.0/config">
3 
4  <configuration context="web">
5    <filters>
6     
7      <filter name="FormPopulationFilter" class="AgaviFormPopulationFilter">
8        <parameter name="methods">
9          <parameter>write</parameter>
10        </parameter>
11        <parameter name="output_types">
12          <parameter>html</parameter>
13        </parameter>
14        <!-- for all field error messages. errors that yield no match and those that have no corresponding field are inserted using rules defined in "error_messages". errors that belong to more than one field (e.g. date validator) can be handled using "multi_field_error_messages" -->
15        <parameter name="field_error_messages">
16          <!-- ${htmlnsPrefix} is either empty (for HTML) or something like "html:" for XHTML documents with xmlns="..." notation. Always use this, makes your code more bullet proof. XPath needs the namespaces when the document is namespaced -->
17          <parameter name="parent::${htmlnsPrefix}dd">
18            <!-- can be any of "before", "after" or "child" (to insert as prev, next sibling or last child) -->
19            <parameter name="location">after</parameter>
20            <!-- a container groups all errors for one element -->
21            <parameter name="container"><![CDATA[<dd>${errorMessages}</dd>]]></parameter>
22            <parameter name="markup"><![CDATA[<p class="error">${errorMessage}</p>]]></parameter>
23          </parameter>
24          <!-- you could have more rules above, e.g. ${htmlnsPrefix}input[@type="checkbox"]... to have a rule that only applies to checkbox elements. first match is used. -->
25        </parameter>
26      </filter>
27     
28    </filters>
29  </configuration>
30 
31</configurations>
Note: See TracBrowser for help on using the browser.