Author: lukaszlenart
Date: Sat Jul 19 06:21:54 2014
New Revision: 916743

Log:
Updates production

Modified:
    
websites/production/struts/content/development/2.x/docs/describing-a-bean-in-velocity.html
    
websites/production/struts/content/development/2.x/docs/freemarker-support.html
    
websites/production/struts/content/development/2.x/docs/handling-file-uploads.html
    
websites/production/struts/content/development/2.x/docs/html-form-buttons-howto.html
    
websites/production/struts/content/development/2.x/docs/using-maven-to-setup-an-eclipse-project-for-your-application.html
    websites/production/struts/content/development/2.x/docs/validation.html

Modified: 
websites/production/struts/content/development/2.x/docs/describing-a-bean-in-velocity.html
==============================================================================
--- 
websites/production/struts/content/development/2.x/docs/describing-a-bean-in-velocity.html
 (original)
+++ 
websites/production/struts/content/development/2.x/docs/describing-a-bean-in-velocity.html
 Sat Jul 19 06:21:54 2014
@@ -37,6 +37,7 @@ under the License. 
     <link href='http://struts.apache.org/highlighter/style/shCoreStruts.css' 
rel='stylesheet' type='text/css' />
     <link href='http://struts.apache.org/highlighter/style/shThemeStruts.css' 
rel='stylesheet' type='text/css' />
     <script src='http://struts.apache.org/highlighter/js/shCore.js' 
type='text/javascript'></script>
+    <script src='http://struts.apache.org/highlighter/js/shBrushXml.js' 
type='text/javascript'></script>
     <script src='http://struts.apache.org/highlighter/js/shBrushJava.js' 
type='text/javascript'></script>
 
     <script type="text/javascript">
@@ -134,12 +135,8 @@ under the License. 
 
     <div class="pagecontent">
         <div class="wiki-content">
-            <div id="ConfluenceContent"><p>The follow snippet might be useful 
during debugging to list the properties inside an<br clear="none">
-arbitary bean. Or for handing to a UI developer that use unaware of the 
getters/setters inside an object.</p>
-
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
-<script class="theme: Default; brush: java; gutter: false" 
type="syntaxhighlighter"><![CDATA[
-## prints out the property names for a bean
+            <div id="ConfluenceContent"><p>The follow snippet might be useful 
during debugging to list the properties inside an<br clear="none"> arbitary 
bean. Or for handing to a UI developer that use unaware of the getters/setters 
inside an object.</p><div class="code panel pdl" style="border-width: 
1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: java; gutter: false" 
type="syntaxhighlighter"><![CDATA[## prints out the property names for a bean
 #macro (describeBean $name) 
 #set($bu = $struts.bean(&quot;com.opensymphony.util.BeanUtils&quot;))
        #foreach($propName in $bu.getPropertyNames($name))
@@ -147,29 +144,17 @@ arbitary bean. Or for handing to a UI de
        #end
 #end
 ]]></script>
-</div></div>
-
-<p>i.e. assuming $obj is a PersonObject that has properties(firstName, 
lastName, and zip).</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
+</div></div><p>i.e. assuming $obj is a PersonObject that has 
properties(firstName, lastName, and zip).</p><div class="code panel pdl" 
style="border-width: 1px;"><div class="codeContent panelContent pdl">
 <script class="theme: Default; brush: java; gutter: false" 
type="syntaxhighlighter"><![CDATA[#describeBean($obj)]]></script>
-</div></div>
-<p>would print</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
-<script class="theme: Default; brush: html; gutter: false" 
type="syntaxhighlighter"><![CDATA[
-&lt;li&gt;firstName&lt;/li&gt;
+</div></div><p>would print</p><div class="code panel pdl" style="border-width: 
1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: xml; gutter: false" 
type="syntaxhighlighter"><![CDATA[&lt;li&gt;firstName&lt;/li&gt;
 &lt;li&gt;lastName&lt;/li&gt;
 &lt;li&gt;zip&lt;/li&gt;
 ]]></script>
-</div></div>
-
-<p>One might also expand upon this to build a dynamic interface with via 
reflection. e.g.</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
-<script class="theme: Default; brush: java; gutter: false" 
type="syntaxhighlighter"><![CDATA[
-$struts.evalute(&quot;$obj.${propName}&quot;)
+</div></div><p>One might also expand upon this to build a dynamic interface 
with via reflection. e.g.</p><div class="code panel pdl" style="border-width: 
1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: java; gutter: false" 
type="syntaxhighlighter"><![CDATA[$struts.evalute(&quot;$obj.${propName}&quot;)
 ]]></script>
-</div></div>
-
-</div>
+</div></div></div>
         </div>
 
         

Modified: 
websites/production/struts/content/development/2.x/docs/freemarker-support.html
==============================================================================
--- 
websites/production/struts/content/development/2.x/docs/freemarker-support.html 
(original)
+++ 
websites/production/struts/content/development/2.x/docs/freemarker-support.html 
Sat Jul 19 06:21:54 2014
@@ -135,71 +135,21 @@ under the License. 
 
     <div class="pagecontent">
         <div class="wiki-content">
-            <div id="ConfluenceContent"><h1 
id="FreemarkerSupport-FreemarkerSupport">Freemarker Support</h1>
-
-<p>Freemarker views can be rendered using the webwork result type 
<code>freemarker</code>.</p>
-
-<h3 
id="FreemarkerSupport-Configureyouractiontousethefreemarkerresulttype">Configure
 your action to use the <code>freemarker</code> result type</h3>
-
-<p>The <code>freemarker</code> result type is defined in 
<code>struts-default.xml</code>, so normally you just include it, and define 
your resuts to use <code>type="freemarker"</code>.</p>
-
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
-<script class="theme: Default; brush: xml; gutter: false" 
type="syntaxhighlighter"><![CDATA[
-
-&lt;include file=&quot;struts-default.xml&quot;/&gt;
+            <div id="ConfluenceContent"><h1 
id="FreemarkerSupport-FreemarkerSupport">Freemarker Support</h1><p>Freemarker 
views can be rendered using the webwork result type 
<code>freemarker</code>.</p><h3 
id="FreemarkerSupport-Configureyouractiontousethefreemarkerresulttype">Configure
 your action to use the <code>freemarker</code> result type</h3><p>The 
<code>freemarker</code> result type is defined in 
<code>struts-default.xml</code>, so normally you just include it, and define 
your resuts to use <code>type="freemarker"</code>.</p><div class="code panel 
pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: xml; gutter: false" 
type="syntaxhighlighter"><![CDATA[&lt;include 
file=&quot;struts-default.xml&quot;/&gt;
 ...
 &lt;action name=&quot;test&quot; class=&quot;package.Test&quot;&gt;
   &lt;result name=&quot;success&quot; 
type=&quot;freemarker&quot;&gt;/WEB-INF/views/testView.ftl&lt;/result&gt;
 &lt;/action&gt;
 ...
 ]]></script>
-</div></div>
-
-
-
-<h3 id="FreemarkerSupport-PropertyResoloution">Property Resoloution</h3>
-
-<p>Your action properties are automatically resolved - just like in a velocity 
view. </p>
-
-<p><strong>for example</strong> <code>${name</code>} will result in 
<code>stack.findValue("name")</code>, which <em>generaly</em> results in 
<code>action.getName()</code> being executed.</p>
-
-<p>A search process is used to resolve the variable, searching the following 
scopes in order, until a value is found :</p>
-<ul><li>freemarker variables</li><li>value stack</li><li>request 
attributes</li><li>session attributes</li><li>servlet context 
attributes</li></ul>
-
-
-<h3 id="FreemarkerSupport-ObjectsintheContext">Objects in the Context</h3>
-
-<p>The following variables exist in the FreeMarker views</p>
-
-<ul><li><code>req</code> - the current 
HttpServletRequest</li><li><code>res</code> - the current 
HttpServletResponse</li><li><code>stack</code> - the current 
OgnlValueStack</li><li><code>ognl</code> - the OgnlTool instance
-       <ul><li>This class contains useful methods to execute OGNL expressions 
against arbitary objects, and a method to generate a select list using the 
&lt;s:select&gt; pattern. (i.e. taking the name of the list property, a listKey 
and listValue)</li></ul>
-       </li><li><code>struts</code> - an instance of 
StrutsBeanWrapper</li><li><code>action</code> - the current Struts 
action</li><li><code>exception</code> - <em>optional</em> the Exception 
instance, if the view is a JSP exception or Servlet exception view</li></ul>
-
-
-
-
-<h3 
id="FreemarkerSupport-FreeMarkerconfigurationwithrecentreleases">FreeMarker 
configuration with recent releases</h3>
-
-<p>To configure the freemarker engine that Struts uses, just add a file 
<code>freemarker.properties</code> to the classpath.  The supported properties 
are those that the Freemarker Configuration object expects - see the <a 
shape="rect" class="external-link" 
href="http://freemarker.org/docs/api/freemarker/template/Configuration.html#setSetting(java.lang.String,%20java.lang.String)"
 rel="nofollow">Freemarker documentation</a> for these.  </p>
-
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
-<script class="theme: Default; brush: java; gutter: false" 
type="syntaxhighlighter"><![CDATA[
-default_encoding=ISO-8859-1
+</div></div><h3 id="FreemarkerSupport-PropertyResoloution">Property 
Resoloution</h3><p>Your action properties are automatically resolved - just 
like in a velocity view.</p><p><strong>for example</strong> 
<code>${name</code>} will result in <code>stack.findValue("name")</code>, which 
<em>generaly</em> results in <code>action.getName()</code> being 
executed.</p><p>A search process is used to resolve the variable, searching the 
following scopes in order, until a value is found :</p><ul><li>freemarker 
variables</li><li>value stack</li><li>request attributes</li><li>session 
attributes</li><li>servlet context attributes</li></ul><h3 
id="FreemarkerSupport-ObjectsintheContext">Objects in the Context</h3><p>The 
following variables exist in the FreeMarker views</p><ul><li><code>req</code> - 
the current HttpServletRequest</li><li><code>res</code> - the current 
HttpServletResponse</li><li><code>stack</code> - the current 
OgnlValueStack</li><li><code>ognl</code> - the OgnlTool instance<ul><li>Th
 is class contains useful methods to execute OGNL expressions against arbitary 
objects, and a method to generate a select list using the &lt;s:select&gt; 
pattern. (i.e. taking the name of the list property, a listKey and 
listValue)</li></ul></li><li><code>struts</code> - an instance of 
StrutsBeanWrapper</li><li><code>action</code> - the current Struts 
action</li><li><code>exception</code> - <em>optional</em> the Exception 
instance, if the view is a JSP exception or Servlet exception view</li></ul><h3 
id="FreemarkerSupport-FreeMarkerconfigurationwithrecentreleases">FreeMarker 
configuration with recent releases</h3><p>To configure the freemarker engine 
that Struts uses, just add a file <code>freemarker.properties</code> to the 
classpath. The supported properties are those that the Freemarker Configuration 
object expects - see the <a shape="rect" class="external-link" 
href="http://freemarker.org/docs/api/freemarker/template/Configuration.html#setSetting(java.lang.String,%20java.lang.Str
 ing)" rel="nofollow">Freemarker documentation</a> for these.</p><div 
class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
+<script class="theme: Default; brush: java; gutter: false" 
type="syntaxhighlighter"><![CDATA[default_encoding=ISO-8859-1
 template_update_delay=5
 locale=no_NO
 ]]></script>
-</div></div>
-
-
-<h3 id="FreemarkerSupport-UsingstrutsUItags-oranyJSPTagLibrary">Using struts 
UI tags - or any JSP Tag Library</h3>
-
-<p>Freemarker has builtin support for using any JSP taglib. You can use JSP 
taglibs in FreeMarker even if<br clear="none">
-a) your servlet container has no support for JSP, or <br clear="none">
-b) you didn't specify the taglib in your web.xml - note how in the example 
below we refer to the taglib by its webapp-absolute URL, so no configuration in 
web.xml is needed.</p>
-
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
-<script class="theme: Default; brush: html; gutter: false" 
type="syntaxhighlighter"><![CDATA[
-&lt;#assign s=JspTaglibs[&quot;/WEB-INF/struts.tld&quot;] /&gt;
+</div></div><h3 
id="FreemarkerSupport-UsingstrutsUItags-oranyJSPTagLibrary">Using struts UI 
tags - or any JSP Tag Library</h3><p>Freemarker has builtin support for using 
any JSP taglib. You can use JSP taglibs in FreeMarker even if<br clear="none"> 
a) your servlet container has no support for JSP, or <br clear="none"> b) you 
didn't specify the taglib in your web.xml - note how in the example below we 
refer to the taglib by its webapp-absolute URL, so no configuration in web.xml 
is needed.</p><div class="code panel pdl" style="border-width: 1px;"><div 
class="codeContent panelContent pdl">
+<script class="theme: Default; brush: html; gutter: false" 
type="syntaxhighlighter"><![CDATA[&lt;#assign 
s=JspTaglibs[&quot;/WEB-INF/struts.tld&quot;] /&gt;
 
 &lt;@s.form method=&quot;&#39;post&#39;&quot; 
name=&quot;&#39;inputform&#39;&quot; action=&quot;&#39;save.action&#39;&quot; 
&gt;
     &lt;@s.hidden name=&quot;&#39;id&#39;&quot; /&gt;
@@ -207,42 +157,22 @@ b) you didn't specify the taglib in your
     &lt;@s.submit value=&quot;&#39;Save&#39;&quot; align=&quot;center&quot; 
/&gt;
 &lt;/@s.form&gt;
 ]]></script>
-</div></div>
-
-<p>NOTE : numeric properties for tags MUST be numbers, not strings.  as in the 
rows and cols properties above.  if  you use cols="40" you will receive an 
exception.  Other than that, the freemarker tag container behaves as you would 
expect.</p>
-
-<h3 id="FreemarkerSupport-Dynamicattributessupport">Dynamic attributes 
support</h3>
-
-<p>You can specify dynamic attributes with Struts 2 tags like this:</p>
-
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
-<script class="theme: Default; brush: html; gutter: false" 
type="syntaxhighlighter"><![CDATA[
-&lt;@s.textfield name=&quot;test&quot; 
dynamicAttributes={&quot;placeholder&quot;:&quot;input&quot;,&quot;foo&quot;:&quot;bar&quot;}/&gt;
-]]></script>
-</div></div>
-
-<p>or like this:</p>
-
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
-<script class="theme: Default; brush: html; gutter: false" 
type="syntaxhighlighter"><![CDATA[
-&lt;@s.textfield name=&quot;test&quot; placeholder=&quot;input&quot; 
foo=&quot;bar&quot;/&gt;
+</div></div><p>NOTE : numeric properties for tags MUST be numbers, not 
strings. as in the rows and cols properties above. if you use cols="40" you 
will receive an exception. Other than that, the freemarker tag container 
behaves as you would expect.</p><h3 
id="FreemarkerSupport-Dynamicattributessupport">Dynamic attributes 
support</h3><p>You can specify dynamic attributes with Struts 2 tags like 
this:</p><div class="code panel pdl" style="border-width: 1px;"><div 
class="codeContent panelContent pdl">
+<script class="theme: Default; brush: html; gutter: false" 
type="syntaxhighlighter"><![CDATA[&lt;@s.textfield name=&quot;test&quot; 
dynamicAttributes={&quot;placeholder&quot;:&quot;input&quot;,&quot;foo&quot;:&quot;bar&quot;}/&gt;
 ]]></script>
-</div></div>
-
-<p>and for both case, it will be parsed into:</p>
-
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
-<script class="theme: Default; brush: html; gutter: false" 
type="syntaxhighlighter"><![CDATA[
-&lt;input type=&quot;text&quot; name=&quot;test&quot; value=&quot;&quot; 
id=&quot;test&quot; placeholder=&quot;input&quot; foo=&quot;bar&quot;/&gt;
+</div></div><p>or like this:</p><div class="code panel pdl" 
style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: html; gutter: false" 
type="syntaxhighlighter"><![CDATA[&lt;@s.textfield name=&quot;test&quot; 
placeholder=&quot;input&quot; foo=&quot;bar&quot;/&gt;
 ]]></script>
-</div></div>
-
-<p>You can also use OGNL expressions with dynamic tags like below:</p>
-
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
-<script class="theme: Default; brush: html; gutter: false" 
type="syntaxhighlighter"><![CDATA[
-&lt;@s.textfield name=&quot;test&quot; placeholder=&quot;input&quot; 
foo=&quot;checked: %{bar}&quot;/&gt;
+</div></div><p>and for both case, it will be parsed into:</p><div class="code 
panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: html; gutter: false" 
type="syntaxhighlighter"><![CDATA[&lt;input type=&quot;text&quot; 
name=&quot;test&quot; value=&quot;&quot; id=&quot;test&quot; 
placeholder=&quot;input&quot; foo=&quot;bar&quot;/&gt;
 ]]></script>
+</div></div><p>You can also use OGNL expressions with dynamic tags like 
below:</p><div class="code panel pdl" style="border-width: 1px;"><div 
class="codeContent panelContent pdl">
+<script class="theme: Default; brush: html; gutter: false" 
type="syntaxhighlighter"><![CDATA[&lt;@s.textfield name=&quot;test&quot; 
placeholder=&quot;input&quot; foo=&quot;checked: %{bar}&quot;/&gt;
+]]></script>
+</div></div><p>When using attributes with hyphens, use the below syntax (you 
can also leave the single quotes from false if you want)</p><div class="code 
panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: xml; gutter: false" 
type="syntaxhighlighter"><![CDATA[&lt;@s.form 
dynamicAttributes={&#39;data-ajax&#39;:&#39;false&#39;}&gt;
+  ...
+&lt;/@s.form&gt;]]></script>
 </div></div></div>
         </div>
 

Modified: 
websites/production/struts/content/development/2.x/docs/handling-file-uploads.html
==============================================================================
--- 
websites/production/struts/content/development/2.x/docs/handling-file-uploads.html
 (original)
+++ 
websites/production/struts/content/development/2.x/docs/handling-file-uploads.html
 Sat Jul 19 06:21:54 2014
@@ -37,7 +37,9 @@ under the License. 
     <link href='http://struts.apache.org/highlighter/style/shCoreStruts.css' 
rel='stylesheet' type='text/css' />
     <link href='http://struts.apache.org/highlighter/style/shThemeStruts.css' 
rel='stylesheet' type='text/css' />
     <script src='http://struts.apache.org/highlighter/js/shCore.js' 
type='text/javascript'></script>
+    <script src='http://struts.apache.org/highlighter/js/shBrushXml.js' 
type='text/javascript'></script>
     <script src='http://struts.apache.org/highlighter/js/shBrushJava.js' 
type='text/javascript'></script>
+    <script src='http://struts.apache.org/highlighter/js/shBrushPlain.js' 
type='text/javascript'></script>
 
     <script type="text/javascript">
         SyntaxHighlighter.defaults['toolbar'] = false;
@@ -134,39 +136,19 @@ under the License. 
 
     <div class="pagecontent">
         <div class="wiki-content">
-            <div id="ConfluenceContent"><p>The framework comes with built in 
file upload support. Uploading a file is simple. When FilterDispatcher receives 
a request, it checks to see if the request contains multipart content. If it 
does the dispatcher creates a MultipartWrapperRequest. This wrapper handles 
receiving the file and saving to disk. It is important for the Action 
programmer to check to see if any errors occured during processing. Three 
properties can be set that effect file uploading.</p>
-
-    <div class="aui-message warning shadowed information-macro">
+            <div id="ConfluenceContent"><p>The framework comes with built in 
file upload support. Uploading a file is simple. When FilterDispatcher receives 
a request, it checks to see if the request contains multipart content. If it 
does the dispatcher creates a MultipartWrapperRequest. This wrapper handles 
receiving the file and saving to disk. It is important for the Action 
programmer to check to see if any errors occured during processing. Three 
properties can be set that effect file uploading.</p>    <div 
class="aui-message warning shadowed information-macro">
                             <span class="aui-icon icon-warning">Icon</span>
                 <div class="message-content">
-                            
-<p>Ensure you have the necessary file upload libraries in your application.  
If using the default file upload parser, Commons Fileupload and its 
dependencies should be in your application's classpath.</p>
+                            <p>Ensure you have the necessary file upload 
libraries in your application. If using the default file upload parser, Commons 
Fileupload and its dependencies should be in your application's classpath.</p>
                     </div>
     </div>
- 
-
-<h2 id="HandlingFileUploads-Properties">Properties</h2>
-
-<p>Properties can be set by putting a <code>struts.properties</code> file in 
<code>WEB-INF/classes</code>. Any property found in the properties file will 
override the default value.</p>
-<ol><li><code>struts.multipart.parser</code> - This property should be set to 
a class that extends MultiPartRequest. Currently, the framework ships with the 
Jakarta FileUpload 
implementation.</li><li><code>struts.multipart.saveDir</code> - The directory 
where the uploaded files will be placed. If this property is not set it 
defaults to 
<code>javax.servlet.context.tempdir</code>.</li><li><code>struts.multipart.maxSize</code>
 - The maximum file size in bytes to allow for upload. This helps prevent 
system abuse by someone uploading lots of large files. The default value is 2 
Megabytes and can be set as high as 2 Gigabytes (higher if you want to edit the 
Pell multipart source but you really need to rethink things if you need to 
upload files larger then 2 Gigabytes!) If you are uploading more than one file 
on a form the maxSize applies to the combined total, not the individual file 
sizes.</li></ol>
-
-
-<p>If you're happy with the defaults, there is no need to put any of the 
properties in <code>struts.properties</code>.  </p>
-
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeHeader 
panelHeader pdl" style="border-bottom-width: 
1px;"><b>struts.properties</b></div><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: java; gutter: false" 
type="syntaxhighlighter"><![CDATA[
-# put the uploaded files in /tmp. My application will move them to their
+<h2 id="HandlingFileUploads-Properties">Properties</h2><p>Properties can be 
set by putting a <code>struts.properties</code> file in 
<code>WEB-INF/classes</code>. Any property found in the properties file will 
override the default value.</p><ol><li><code>struts.multipart.parser</code> - 
This property should be set to a class that extends MultiPartRequest. 
Currently, the framework ships with the Jakarta FileUpload 
implementation.</li><li><code>struts.multipart.saveDir</code> - The directory 
where the uploaded files will be placed. If this property is not set it 
defaults to 
<code>javax.servlet.context.tempdir</code>.</li><li><code>struts.multipart.maxSize</code>
 - The maximum file size in bytes to allow for upload. This helps prevent 
system abuse by someone uploading lots of large files. The default value is 2 
Megabytes and can be set as high as 2 Gigabytes (higher if you want to edit the 
Pell multipart source but you really need to rethink things if you need to 
upload files larger the
 n 2 Gigabytes!) If you are uploading more than one file on a form the maxSize 
applies to the combined total, not the individual file sizes.</li></ol><p>If 
you're happy with the defaults, there is no need to put any of the properties 
in <code>struts.properties</code>.</p><div class="code panel pdl" 
style="border-width: 1px;"><div class="codeHeader panelHeader pdl" 
style="border-bottom-width: 1px;"><b>struts.properties</b></div><div 
class="codeContent panelContent pdl">
+<script class="theme: Default; brush: text; gutter: false" 
type="syntaxhighlighter"><![CDATA[# put the uploaded files in /tmp. My 
application will move them to their
 # final destination
 struts.multipart.saveDir=/tmp
 ]]></script>
-</div></div>
-<p>Note, while you can set these properties to new values at runtime the 
MultiPartRequestWrapper is created and the file handled before your Action code 
is called. So if you want to change values you must do so before this 
Action.</p>
-
-<h2 id="HandlingFileUploads-SampleForm">Sample Form</h2>
-
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
-<script class="theme: Default; brush: html; gutter: false" 
type="syntaxhighlighter"><![CDATA[
-&lt;%@ taglib uri=&quot;action2&quot; prefix=&quot;s&quot; %&gt;
+</div></div><p>Note, while you can set these properties to new values at 
runtime the MultiPartRequestWrapper is created and the file handled before your 
Action code is called. So if you want to change values you must do so before 
this Action.</p><h2 id="HandlingFileUploads-SampleForm">Sample Form</h2><div 
class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
+<script class="theme: Default; brush: xml; gutter: false" 
type="syntaxhighlighter"><![CDATA[&lt;%@ taglib uri=&quot;action2&quot; 
prefix=&quot;s&quot; %&gt;
 
 &lt;html&gt;
   &lt;head&gt;
@@ -193,23 +175,12 @@ struts.multipart.saveDir=/tmp
 &lt;/body&gt;
 &lt;/html&gt;
 ]]></script>
-</div></div>
-
-<p>That's all you have to do to upload a file. No coding required, the file 
will be placed in the default directory. However, that leaves us with no error 
checking among other things. So let's add some code to the Action.</p>
-
-<h2 id="HandlingFileUploads-FileUploadAction">File Upload Action</h2>
-
-<p>Before the Action method is called the dispatcher will upload the file. 
Then we can get access to information about the file from 
MultiPartRequestWrapper.</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeHeader 
panelHeader pdl" style="border-bottom-width: 
1px;"><b>FileUploadAction.java</b></div><div class="codeContent panelContent 
pdl">
-<script class="theme: Default; brush: java; gutter: false" 
type="syntaxhighlighter"><![CDATA[
-MultiPartRequestWrapper multiWrapper =
+</div></div><p>That's all you have to do to upload a file. No coding required, 
the file will be placed in the default directory. However, that leaves us with 
no error checking among other things. So let's add some code to the 
Action.</p><h2 id="HandlingFileUploads-FileUploadAction">File Upload 
Action</h2><p>Before the Action method is called the dispatcher will upload the 
file. Then we can get access to information about the file from 
MultiPartRequestWrapper.</p><div class="code panel pdl" style="border-width: 
1px;"><div class="codeHeader panelHeader pdl" style="border-bottom-width: 
1px;"><b>FileUploadAction.java</b></div><div class="codeContent panelContent 
pdl">
+<script class="theme: Default; brush: java; gutter: false" 
type="syntaxhighlighter"><![CDATA[MultiPartRequestWrapper multiWrapper =
                (MultiPartRequestWrapper) ServletActionContext.getRequest();
 ]]></script>
-</div></div>
-<p>The first thing you should always do is check for errors. If there were 
any, there's no point in continuing, most methods will return null. 
Unfortunately, currently there is no easy way to distinguish what error occured 
making it more difficult to route to different error pages. </p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
-<script class="theme: Default; brush: java; gutter: false" 
type="syntaxhighlighter"><![CDATA[
-if (multiWrapper.hasErrors()) {
+</div></div><p>The first thing you should always do is check for errors. If 
there were any, there's no point in continuing, most methods will return null. 
Unfortunately, currently there is no easy way to distinguish what error occured 
making it more difficult to route to different error pages.</p><div class="code 
panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: java; gutter: false" 
type="syntaxhighlighter"><![CDATA[if (multiWrapper.hasErrors()) {
   Collection errors = multiWrapper.getErrors();
   Iterator i = errors.iterator();
   while (i.hasNext()) {
@@ -218,11 +189,8 @@ if (multiWrapper.hasErrors()) {
   return ERROR;
 }
 ]]></script>
-</div></div>
-<p>Now get the input tag name for the uploaded file and use that to get 
information on the transfer. Since you can upload multiple files (just add 
multiple input tags) at a time <code>getFileNames</code> returns an Enumeration 
of the names.</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
-<script class="theme: Default; brush: java; gutter: false" 
type="syntaxhighlighter"><![CDATA[
-Enumeration e = multiWrapper.getFileNames();
+</div></div><p>Now get the input tag name for the uploaded file and use that 
to get information on the transfer. Since you can upload multiple files (just 
add multiple input tags) at a time <code>getFileNames</code> returns an 
Enumeration of the names.</p><div class="code panel pdl" style="border-width: 
1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: java; gutter: false" 
type="syntaxhighlighter"><![CDATA[Enumeration e = multiWrapper.getFileNames();
 
 while (e.hasMoreElements()) {
    // get the value of this input tag
@@ -245,13 +213,7 @@ while (e.hasMoreElements()) {
    // Do additional processing/logging...
 }
 ]]></script>
-</div></div>
-
-<h2 id="HandlingFileUploads-FurtherImprovements">Further Improvements</h2>
-
-<p>Code above may be packed into one nice reusable component (Interceptor) 
that handles 90% of all typical file upload tasks. And Action does not know 
anything about web-app and just gets its files. Neat. </p>
-
-<p><img class="emoticon emoticon-light-on" 
src="https://cwiki.apache.org/confluence/s/en_GB-1988229788/4109/76e0dbb30bc8580e459c201f3535d84f9283a9ac.1/_/images/icons/emoticons/lightbulb_on.png";
 data-emoticon-name="light-on" alt="(lightbulb)"> For more, see the <a 
shape="rect" href="file-upload-interceptor.html">File Upload 
Interceptor</a></p></div>
+</div></div><h2 id="HandlingFileUploads-FurtherImprovements">Further 
Improvements</h2><p>Code above may be packed into one nice reusable component 
(Interceptor) that handles 90% of all typical file upload tasks. And Action 
does not know anything about web-app and just gets its files. Neat.</p><p><img 
class="emoticon emoticon-light-on" 
src="https://cwiki.apache.org/confluence/s/en_GB-1988229788/4109/76e0dbb30bc8580e459c201f3535d84f9283a9ac.1/_/images/icons/emoticons/lightbulb_on.png";
 data-emoticon-name="light-on" alt="(lightbulb)"> For more, see the <a 
shape="rect" href="file-upload-interceptor.html">File Upload 
Interceptor</a></p></div>
         </div>
 
         

Modified: 
websites/production/struts/content/development/2.x/docs/html-form-buttons-howto.html
==============================================================================
--- 
websites/production/struts/content/development/2.x/docs/html-form-buttons-howto.html
 (original)
+++ 
websites/production/struts/content/development/2.x/docs/html-form-buttons-howto.html
 Sat Jul 19 06:21:54 2014
@@ -37,6 +37,7 @@ under the License. 
     <link href='http://struts.apache.org/highlighter/style/shCoreStruts.css' 
rel='stylesheet' type='text/css' />
     <link href='http://struts.apache.org/highlighter/style/shThemeStruts.css' 
rel='stylesheet' type='text/css' />
     <script src='http://struts.apache.org/highlighter/js/shCore.js' 
type='text/javascript'></script>
+    <script src='http://struts.apache.org/highlighter/js/shBrushXml.js' 
type='text/javascript'></script>
     <script src='http://struts.apache.org/highlighter/js/shBrushJava.js' 
type='text/javascript'></script>
 
     <script type="text/javascript">
@@ -134,26 +135,14 @@ under the License. 
 
     <div class="pagecontent">
         <div class="wiki-content">
-            <div id="ConfluenceContent"><p>This HOWTO will describe the usage 
of HTML form buttons to invoke different behavior in actions.</p>
-
-<h2 id="HTMLformbuttonsHOWTO-Usingdifferentmethods">Using different 
methods</h2>
-<p>The <em>method</em> attribute of the submit tag can be used to implement 
buttons that submit to different methods.</p>
-
-
-<p>These boolean Properties can be tested to determine which button was 
pressed:</p>
-
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
-<script class="theme: Default; brush: xml; gutter: false" 
type="syntaxhighlighter"><![CDATA[
-&lt;form action=&quot;MyAction.action&quot;&gt;
+            <div id="ConfluenceContent"><p>This HOWTO will describe the usage 
of HTML form buttons to invoke different behavior in actions.</p><h2 
id="HTMLformbuttonsHOWTO-Usingdifferentmethods">Using different 
methods</h2><p>The <em>method</em> attribute of the submit tag can be used to 
implement buttons that submit to different methods.</p><p>These boolean 
Properties can be tested to determine which button was pressed:</p><div 
class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
+<script class="theme: Default; brush: xml; gutter: false" 
type="syntaxhighlighter"><![CDATA[&lt;form 
action=&quot;MyAction.action&quot;&gt;
   &lt;s:submit method=&quot;save&quot; value=&quot;Save&quot;/&gt; 
   &lt;s:submit method=&quot;delete&quot; value=&quot;Delete&quot;/&gt; 
 &lt;/form&gt;
 ]]></script>
-</div></div>
-
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
-<script class="theme: Default; brush: java; gutter: false" 
type="syntaxhighlighter"><![CDATA[
-public class MyAction extends Action {
+</div></div><div class="code panel pdl" style="border-width: 1px;"><div 
class="codeContent panelContent pdl">
+<script class="theme: Default; brush: java; gutter: false" 
type="syntaxhighlighter"><![CDATA[public class MyAction extends Action {
     public String save() {
         message = &quot;The save button was pressed&quot;;
         return SUCCES;
@@ -172,32 +161,16 @@ public class MyAction extends Action {
     }
 }
 ]]></script>
-</div></div>
-
-<p><strong>Note</strong>: Do not use String properties with buttons and test 
for the value that's set. This will break as soon as the <em>value</em> 
attribute of the HTML button changes! This is likely because the <em>value</em> 
attribute is used as the button text.</p>
-
-<h2 id="HTMLformbuttonsHOWTO-DynamicSetofButtons">Dynamic Set of Buttons</h2>
-
-<p>Consider a web page showing a shopping cart or similiar tabular data. Often 
there is a button belonging to each row, in case of the shopping cart a delete 
button to remove the item from the cart. The number of buttons is dynamic and 
the id that couples the button to an item cannot go to the <em>value</em> 
attribute because all buttons should read "delete".</p>
-
-<p>The solution is to name the buttons like delete[123], delete[594], 
delete[494] where 123, 594 and 494 are, for example, item ids.</p>
-
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
-<script class="theme: Default; brush: xml; gutter: false" 
type="syntaxhighlighter"><![CDATA[
-&lt;form action=&quot;UpdateCart.action&quot;&gt;
+</div></div><p><strong>Note</strong>: Do not use String properties with 
buttons and test for the value that's set. This will break as soon as the 
<em>value</em> attribute of the HTML button changes! This is likely because the 
<em>value</em> attribute is used as the button text.</p><h2 
id="HTMLformbuttonsHOWTO-DynamicSetofButtons">Dynamic Set of 
Buttons</h2><p>Consider a web page showing a shopping cart or similiar tabular 
data. Often there is a button belonging to each row, in case of the shopping 
cart a delete button to remove the item from the cart. The number of buttons is 
dynamic and the id that couples the button to an item cannot go to the 
<em>value</em> attribute because all buttons should read "delete".</p><p>The 
solution is to name the buttons like delete[123], delete[594], delete[494] 
where 123, 594 and 494 are, for example, item ids.</p><div class="code panel 
pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: xml; gutter: false" 
type="syntaxhighlighter"><![CDATA[&lt;form 
action=&quot;UpdateCart.action&quot;&gt;
   &lt;s:iterate value=&quot;items&quot;&gt;
     &lt;s:property value=&quot;name&quot;&gt; 
     &lt;input type=&quot;submit&quot; name=&quot;delete[&lt;s:property 
value=&#39;id&#39;&gt;]&quot; value=&quot;delete&quot; /&gt; &lt;br/&gt;
   &lt;/s:iterate&gt;
 &lt;/form&gt;
 ]]></script>
-</div></div>
-
-<p>When the button for the item with the property id == "27" is pressed, a 
parameter named <em>delete[27]</em> and value "delete" is set in your action. 
The trick is to declare your action's "delete" property as a 
<code>java.util.Map</code>. Then, a key will exist for the button that was 
pressed.</p>
-
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
-<script class="theme: Default; brush: java; gutter: false" 
type="syntaxhighlighter"><![CDATA[
-public void class UpdateCart implements Action {
+</div></div><p>When the button for the item with the property id == "27" is 
pressed, a parameter named <em>delete[27]</em> and value "delete" is set in 
your action. The trick is to declare your action's "delete" property as a 
<code>java.util.Map</code>. Then, a key will exist for the button that was 
pressed.</p><div class="code panel pdl" style="border-width: 1px;"><div 
class="codeContent panelContent pdl">
+<script class="theme: Default; brush: java; gutter: false" 
type="syntaxhighlighter"><![CDATA[public void class UpdateCart implements 
Action {
 
     // Must be initialized to be usable as a Struts 2 input parameter.
     private Map delete = new HashMap(); 
@@ -224,13 +197,8 @@ public void class UpdateCart implements 
     }
 }
 ]]></script>
-</div></div>
-
-<p>In this case it would not be necessary to iterate the whole keySet because 
it contains only one key but the same code can be use to handle sets of 
checkboxes if this is prefered later:</p>
-
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
-<script class="theme: Default; brush: xml; gutter: false" 
type="syntaxhighlighter"><![CDATA[
-&lt;form action=&quot;UpdateCart.action&quot;&gt;
+</div></div><p>In this case it would not be necessary to iterate the whole 
keySet because it contains only one key but the same code can be use to handle 
sets of checkboxes if this is prefered later:</p><div class="code panel pdl" 
style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: xml; gutter: false" 
type="syntaxhighlighter"><![CDATA[&lt;form 
action=&quot;UpdateCart.action&quot;&gt;
   &lt;s:iterator value=&quot;items&quot;&gt;
     &lt;s:property value=&quot;name&quot;&gt; 
     &lt;input type=&quot;checkbox&quot; name=&quot;delete[&lt;s:property 
value=&#39;item&#39;/&gt;]&quot; value=&quot;delete&quot;/&gt; &lt;br/&gt;
@@ -238,9 +206,7 @@ public void class UpdateCart implements 
   &lt;input type=&quot;submit&quot; name=&quot;updateCart&quot; 
value=&quot;Update the cart&quot;/&gt;
 &lt;/form&gt;
 ]]></script>
-</div></div>
-
-<p>The two implementations can even be combined two provide a quick "delete 
this item" button and a set of checkboxes for "mass updates". All with the 
above code, cool eh?</p></div>
+</div></div><p>The two implementations can even be combined two provide a 
quick "delete this item" button and a set of checkboxes for "mass updates". All 
with the above code, cool eh?</p></div>
         </div>
 
         

Modified: 
websites/production/struts/content/development/2.x/docs/using-maven-to-setup-an-eclipse-project-for-your-application.html
==============================================================================
--- 
websites/production/struts/content/development/2.x/docs/using-maven-to-setup-an-eclipse-project-for-your-application.html
 (original)
+++ 
websites/production/struts/content/development/2.x/docs/using-maven-to-setup-an-eclipse-project-for-your-application.html
 Sat Jul 19 06:21:54 2014
@@ -37,7 +37,7 @@ under the License. 
     <link href='http://struts.apache.org/highlighter/style/shCoreStruts.css' 
rel='stylesheet' type='text/css' />
     <link href='http://struts.apache.org/highlighter/style/shThemeStruts.css' 
rel='stylesheet' type='text/css' />
     <script src='http://struts.apache.org/highlighter/js/shCore.js' 
type='text/javascript'></script>
-    <script src='http://struts.apache.org/highlighter/js/shBrushJava.js' 
type='text/javascript'></script>
+    <script src='http://struts.apache.org/highlighter/js/shBrushPlain.js' 
type='text/javascript'></script>
 
     <script type="text/javascript">
         SyntaxHighlighter.defaults['toolbar'] = false;
@@ -134,28 +134,15 @@ under the License. 
 
     <div class="pagecontent">
         <div class="wiki-content">
-            <div id="ConfluenceContent">
-
-<p>Because the framework is under active development, these instructions are 
likely to be out-of-date in specifics.&#160; Hopefully the basic strategies 
will still apply.</p>
-
-<p>First, if xwork is not available froma Maven repo (for example, if it has 
moved to a SNAPSHOT dependency), then check it out from the repository and run 
"mvn install" - this gives you the snapshot of XWork as well as the POM for 
resolving transitive dependencies like oscore.&#160; This may apply to other 
dependencies which are not on ibiblio, but when I first tried this, xwork was 
the one with enough transitive dependencies to be hard to manage any other 
way.</p>
-
-<p>For other dependencies which are not on ibiblio, from the SAF repository 
checkout (sandbox), run "ant common.jar".  This will cause Ivy to fetch the 
other dependencies you need.</p>
-
-<p>Then, for each of the missing dependencies, install using "mvn 
install:install-file"  Below are examples, but of course the path to your 
".ivy-cache" directory will differ, and the versions are likely to change for 
lots of reason, but especially if the dependency is a SNAPSHOT with a timestamp 
in the filename.</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
-<script class="theme: Default; brush: plain; gutter: false" 
type="syntaxhighlighter"><![CDATA[
-mvn install:install-file -DartifactId=dwr -DgroupId=dwr -Dpackaging=jar 
-Dversion=1.1.3-beta \
+            <div id="ConfluenceContent"><p>Because the framework is under 
active development, these instructions are likely to be out-of-date in 
specifics.&#160; Hopefully the basic strategies will still apply.</p><p>First, 
if xwork is not available froma Maven repo (for example, if it has moved to a 
SNAPSHOT dependency), then check it out from the repository and run "mvn 
install" - this gives you the snapshot of XWork as well as the POM for 
resolving transitive dependencies like oscore.&#160; This may apply to other 
dependencies which are not on ibiblio, but when I first tried this, xwork was 
the one with enough transitive dependencies to be hard to manage any other 
way.</p><p>For other dependencies which are not on ibiblio, from the SAF 
repository checkout (sandbox), run "ant common.jar". This will cause Ivy to 
fetch the other dependencies you need.</p><p>Then, for each of the missing 
dependencies, install using "mvn install:install-file" Below are examples, but 
of course the path
  to your ".ivy-cache" directory will differ, and the versions are likely to 
change for lots of reason, but especially if the dependency is a SNAPSHOT with 
a timestamp in the filename.</p><div class="code panel pdl" 
style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: text; gutter: false" 
type="syntaxhighlighter"><![CDATA[mvn install:install-file -DartifactId=dwr 
-DgroupId=dwr -Dpackaging=jar -Dversion=1.1.3-beta \
     -Dfile=/Users/germuska/.ivy-cache/dwr/dwr/jars/dwr-1.1-beta-3.jar
 
 mvn install:install-file -DartifactId=plexus-container-default 
-DgroupId=org.codehaus.plexus \
     -Dpackaging=jar -Dversion=1.0-alpha-10-SNAPSHOT \
     
-Dfile=/Users/germuska/.ivy-cache/org.codehaus.plexus/plexus-container-default/jars/plexus-container-default-1.0-alpha-10-20060215.222714-5.jar
 ]]></script>
-</div></div>
-<p>If you are not running Java 5.0, then you will also need to install the 
dom3 APIs.&#160; As far as we can tell, the compiled JAR is not on any Maven 
repository. the source for dom3 can be found here: <a shape="rect" 
class="external-link" 
href="http://ibiblio.org/maven2/xerces/dom3-xml-apis/1.0/dom3-xml-apis-1.0-sources.jar&amp;nbsp";
 
rel="nofollow">http://ibiblio.org/maven2/xerces/dom3-xml-apis/1.0/dom3-xml-apis-1.0-sources.jar&amp;nbsp</a>;
 You can build a jar from it and then put it in your own repository.&#160; 
After that, edit webwork's pom.xml to point to the dependency -- there is a 
comment in the &lt;profiles&gt; section acknowledging the need for this, but 
presumably it will not be changed until dom3 gets officially loaded as a 
compiled JAR to some maven repository.&#160; There should be a way to use 
Maven2's <em>settings.xml</em> file to do this locally without editing pom.xml, 
but we have not had a chance to investigate this yet.</p>
-
-<p>These steps may change as the&#160; pom changes, but this kind of approach 
should work.&#160; </p></div>
+</div></div><p>If you are not running Java 5.0, then you will also need to 
install the dom3 APIs.&#160; As far as we can tell, the compiled JAR is not on 
any Maven repository. the source for dom3 can be found here: <a shape="rect" 
class="external-link" 
href="http://ibiblio.org/maven2/xerces/dom3-xml-apis/1.0/dom3-xml-apis-1.0-sources.jar&amp;nbsp";
 
rel="nofollow">http://ibiblio.org/maven2/xerces/dom3-xml-apis/1.0/dom3-xml-apis-1.0-sources.jar&amp;nbsp</a>;
 You can build a jar from it and then put it in your own repository.&#160; 
After that, edit webwork's pom.xml to point to the dependency -- there is a 
comment in the &lt;profiles&gt; section acknowledging the need for this, but 
presumably it will not be changed until dom3 gets officially loaded as a 
compiled JAR to some maven repository.&#160; There should be a way to use 
Maven2's <em>settings.xml</em> file to do this locally without editing pom.xml, 
but we have not had a chance to investigate this yet.</p><p>These steps may 
change 
 as the&#160; pom changes, but this kind of approach should 
work.&#160;</p></div>
         </div>
 
         

Modified: 
websites/production/struts/content/development/2.x/docs/validation.html
==============================================================================
--- websites/production/struts/content/development/2.x/docs/validation.html 
(original)
+++ websites/production/struts/content/development/2.x/docs/validation.html Sat 
Jul 19 06:21:54 2014
@@ -137,14 +137,14 @@ under the License. 
     <div class="pagecontent">
         <div class="wiki-content">
             <div id="ConfluenceContent"><p>Struts 2 validation is configured 
via XML or annotations. Manual validation in the action is also possible, and 
may be combined with XML and annotation-driven validation.</p><p>Validation 
also depends on both the <code>validation</code> and <code>workflow</code> 
interceptors (both are included in the default interceptor stack). The 
<code>validation</code> interceptor does the validation itself and creates a 
list of field-specific errors. The <code>workflow</code> interceptor checks for 
the presence of validation errors: if any are found, it returns the "input" 
result (by default), taking the user back to the form which contained the 
validation errors.</p><p>If we're using the default settings <em>and</em> our 
action doesn't have an "input" result defined <em>and</em> there are validation 
(or, incidentally, type conversion) errors, we'll get an error message back 
telling us there's no "input" result defined for the action.</p><p><strong>CONT
 ENTS</strong></p><p><style type="text/css">/*<![CDATA[*/
-div.rbtoc1404972034555 {padding: 0px;}
-div.rbtoc1404972034555 ul {list-style: none;margin-left: 0px;}
-div.rbtoc1404972034555 li {margin-left: 0px;padding-left: 0px;}
+div.rbtoc1405750859687 {padding: 0px;}
+div.rbtoc1405750859687 ul {list-style: none;margin-left: 0px;}
+div.rbtoc1405750859687 li {margin-left: 0px;padding-left: 0px;}
 
-/*]]>*/</style></p><div class="toc-macro rbtoc1404972034555">
+/*]]>*/</style></p><div class="toc-macro rbtoc1405750859687">
 <ul class="toc-indentation"><li><span class="TOCOutline">1</span> <a 
shape="rect" href="#Validation-UsingAnnotations">Using 
Annotations</a></li><li><span class="TOCOutline">2</span> <a shape="rect" 
href="#Validation-Examples">Examples</a></li><li><span 
class="TOCOutline">3</span> <a shape="rect" 
href="#Validation-BundledValidators">Bundled Validators</a></li><li><span 
class="TOCOutline">4</span> <a shape="rect" 
href="#Validation-RegisteringValidators">Registering 
Validators</a></li><li><span class="TOCOutline">5</span> <a shape="rect" 
href="#Validation-TurningonValidation">Turning on Validation</a></li><li><span 
class="TOCOutline">6</span> <a shape="rect" 
href="#Validation-ValidatorScopes">Validator Scopes</a>
 <ul class="toc-indentation"><li><span class="TOCOutline">6.1</span> <a 
shape="rect" href="#Validation-Notes">Notes</a></li></ul>
-</li><li><span class="TOCOutline">7</span> <a shape="rect" 
href="#Validation-DefiningValidationRules">Defining Validation 
Rules</a></li><li><span class="TOCOutline">8</span> <a shape="rect" 
href="#Validation-LocalizingandParameterizingMessages">Localizing and 
Parameterizing Messages</a></li><li><span class="TOCOutline">9</span> <a 
shape="rect" href="#Validation-ValidatorFlavor">Validator 
Flavor</a></li><li><span class="TOCOutline">10</span> <a shape="rect" 
href="#Validation-Non-FieldValidatorVsField-Validatorvalidatortypes">Non-Field 
Validator Vs Field-Validator</a></li><li><span class="TOCOutline">11</span> <a 
shape="rect" href="#Validation-Short-CircuitingValidator">Short-Circuiting 
Validator</a></li><li><span class="TOCOutline">12</span> <a shape="rect" 
href="#Validation-HowValidatorsofanActionareFound">How Validators of an Action 
are Found</a></li><li><span class="TOCOutline">13</span> <a shape="rect" 
href="#Validation-Resources">Resources</a></li><li><span class="TOCOutline">14
 </span> <a shape="rect" href="#Validation-Next:">Next: 
Localization</a></li></ul>
+</li><li><span class="TOCOutline">7</span> <a shape="rect" 
href="#Validation-DefiningValidationRules">Defining Validation 
Rules</a></li><li><span class="TOCOutline">8</span> <a shape="rect" 
href="#Validation-LocalizingandParameterizingMessages">Localizing and 
Parameterizing Messages</a></li><li><span class="TOCOutline">9</span> <a 
shape="rect" href="#Validation-ValidatorFlavor">Validator 
Flavor</a></li><li><span class="TOCOutline">10</span> <a shape="rect" 
href="#Validation-Non-FieldValidatorVsField-Validatorvalidatortypes">Non-Field 
Validator Vs Field-Validator</a></li><li><span class="TOCOutline">11</span> <a 
shape="rect" href="#Validation-Short-CircuitingValidator">Short-Circuiting 
Validator</a></li><li><span class="TOCOutline">12</span> <a shape="rect" 
href="#Validation-HowValidatorsofanActionareFound">How Validators of an Action 
are Found</a></li><li><span class="TOCOutline">13</span> <a shape="rect" 
href="#Validation-Writingcustomvalidators">Writing custom validators</a></li><
 li><span class="TOCOutline">14</span> <a shape="rect" 
href="#Validation-Resources">Resources</a></li><li><span 
class="TOCOutline">15</span> <a shape="rect" href="#Validation-Next:">Next: 
Localization</a></li></ul>
 </div><h2 id="Validation-UsingAnnotations">Using Annotations</h2><p><a 
shape="rect" href="validation-annotation.html">Annotations</a> can be used as 
an alternative to XML for validation.</p><h2 
id="Validation-Examples">Examples</h2><p>In all examples given here, the 
validation message displayed is given in plain English - to internationalize 
the message, put the string in a properties file and use a property key 
instead, specified by the 'key' attribute. It will be looked up by the 
framework (see <a shape="rect" 
href="localization.html">Localization</a>).</p><ol><li><a shape="rect" 
href="basic-validation.html">Basic Validation</a></li><li><a shape="rect" 
href="client-validation.html">Client-side Validation</a></li><li><a 
shape="rect" href="ajax-validation.html">AJAX Validation</a></li><li><a 
shape="rect" href="using-field-validators.html">Using Field 
Validators</a></li><li><a shape="rect" 
href="using-non-field-validators.html">Using Non Field 
Validators</a></li><li><a shape="rect" h
 ref="using-visitor-field-validator.html">Using Visitor Field 
Validator</a></li><li><a shape="rect" 
href="how-do-we-repopulate-controls-when-validation-fails.html">How do we 
repopulate controls when validation fails</a> (FAQ entry)</li></ol><h2 
id="Validation-BundledValidators">Bundled Validators</h2>    <div 
class="aui-message warning shadowed information-macro">
                     <p class="title">Note</p>
                             <span class="aui-icon icon-warning">Icon</span>
@@ -505,7 +505,7 @@ will merge validators found in both vali
 The logic behind this design decision is such that we could have common 
validators in
 &lt;actionClass&gt;-validation.xml and more context specific validators to be 
located
 in &lt;actionClass&gt;-&lt;actionAlias&gt;-validation.xml
-</p><h2 id="Validation-Resources">Resources</h2><p><a shape="rect" 
class="external-link" 
href="http://today.java.net/pub/a/today/2006/01/19/webwork-validation.html"; 
rel="nofollow">WebWork Validation</a></p><h2 id="Validation-Next:">Next: <a 
shape="rect" href="localization.html">Localization</a></h2></div>
+</p><h2 id="Validation-Writingcustomvalidators">Writing custom 
validators</h2><p>If you want to write custom validator use on of these classes 
as a starting point:</p><ul style="list-style-type: 
square;"><li>com.opensymphony.xwork2.validator.validators.ValidatorSupport</li><li>com.opensymphony.xwork2.validator.validators.FieldValidatorSupport</li><li>com.opensymphony.xwork2.validator.validators.RangeValidatorSupport</li><li>com.opensymphony.xwork2.validator.validators.RepopulateConversionErrorFieldValidatorSupport</li></ul><h2
 id="Validation-Resources">Resources</h2><p><a shape="rect" 
class="external-link" 
href="http://today.java.net/pub/a/today/2006/01/19/webwork-validation.html"; 
rel="nofollow">WebWork Validation</a></p><h2 id="Validation-Next:">Next: <a 
shape="rect" href="localization.html">Localization</a></h2></div>
         </div>
 
                     <div class="tabletitle">


Reply via email to