beehive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Richard Feit <richard.f...@bea.com>
Subject Re: checkin request Netui
Date Fri, 10 Sep 2004 19:46:04 GMT
Thanks Carlin -- looks good.  I'll check it in, assuming the DRTs pass for me.
Rich

At 09:36 AM 9/10/2004, you wrote:
>Hi All,
>
>I have a checkin request for Page Flow. The following patch file
>(output from "svn diff") contains the changes for a couple of
>fixes listed below. The patch also adds a new test to the BVT
>suite. This patch is synced to revision 43672.
>
>Fixes:
>- multiple form beans not derived from ActionForm are mapped to
>their actual name rather than all mapped to 'anyBeanActionForm'.
>Avoids conflicts in JSPs with multiple forms. Updated tests
>impacted by this change and created a new test.
>- moved the netui validator rules xml file to the expected
>location.
>- removed a reference in a test to a bea class.
>
>CR: rfeit
>DRT/BVT: netui (WinXP)
>BB: self (WinXP)
>
>Thanks in advance for the help.
>Carlin
>
>
>Index: netui/test/webapps/drt/testRecorder/tests/AnyBean.xml
>===================================================================
>--- netui/test/webapps/drt/testRecorder/tests/AnyBean.xml       (revision 
>43672)
>+++ netui/test/webapps/drt/testRecorder/tests/AnyBean.xml       (working copy)
>@@ -203,7 +203,7 @@
>      <body>
>          <h3>Submit Bean</h3>
>
>-        <form name="anyBeanActionForm" 
>action="/coreWeb/pageFlowCore/anybean/submit.do" method="post">
>+        <form name="someBean" 
>action="/coreWeb/pageFlowCore/anybean/submit.do" method="post">
>              foo: <input type="text" name="{actionForm.foo}" 
> value="initial value">
>              <br>
>              <input type="submit" value="Click">
>@@ -1227,4 +1227,4 @@
>    <testCount>11</testCount>
>    <passedCount>10</passedCount>
>    <failedCount>1</failedCount>
>-</recorderSession>
>\ No newline at end of file
>+</recorderSession>
>Index: netui/test/webapps/drt/testRecorder/tests/AnyBeanBinding.xml
>===================================================================
>--- 
>netui/test/webapps/drt/testRecorder/tests/AnyBeanBinding.xml 
>(revision 43672)
>+++ 
>netui/test/webapps/drt/testRecorder/tests/AnyBeanBinding.xml 
>(working copy)
>@@ -160,7 +160,7 @@
>          <base 
> href="http://localhost:8080/coreWeb/databinding/anybean/updateAnyBean.jsp">
>      </head>
>      <body>
>-        <form name="anyBeanActionForm" 
>action="/coreWeb/databinding/anybean/updateAnyBean.do" method="post">
>+        <form name="customer" 
>action="/coreWeb/databinding/anybean/updateAnyBean.do" method="post">
>              <table>
>                  <tr valign="top">
>                      <td>Name:</td>
>@@ -273,7 +273,7 @@
>          <base 
> href="http://localhost:8080/coreWeb/databinding/anybean/updateAnyBean.jsp">
>      </head>
>      <body>
>-        <form name="anyBeanActionForm" 
>action="/coreWeb/databinding/anybean/updateAnyBean.do" method="post">
>+        <form name="customer" 
>action="/coreWeb/databinding/anybean/updateAnyBean.do" method="post">
>              <table>
>                  <tr valign="top">
>                      <td>Name:</td>
>@@ -386,7 +386,7 @@
>          <base 
> href="http://localhost:8080/coreWeb/databinding/anybean/updateAnyBean.jsp">
>      </head>
>      <body>
>-        <form name="anyBeanActionForm" 
>action="/coreWeb/databinding/anybean/updateAnyBean.do" method="post">
>+        <form name="customer" 
>action="/coreWeb/databinding/anybean/updateAnyBean.do" method="post">
>              <table>
>                  <tr valign="top">
>                      <td>Name:</td>
>@@ -499,7 +499,7 @@
>          <base 
> href="http://localhost:8080/coreWeb/databinding/anybean/updateAnyBean.jsp">
>      </head>
>      <body>
>-        <form name="anyBeanActionForm" 
>action="/coreWeb/databinding/anybean/updateAnyBean.do" method="post">
>+        <form name="customer" 
>action="/coreWeb/databinding/anybean/updateAnyBean.do" method="post">
>              <table>
>                  <tr valign="top">
>                      <td>Name:</td>
>@@ -612,7 +612,7 @@
>          <base 
> href="http://localhost:8080/coreWeb/databinding/anybean/updateAnyBean.jsp">
>      </head>
>      <body>
>-        <form name="anyBeanActionForm" 
>action="/coreWeb/databinding/anybean/updateAnyBean.do" method="post">
>+        <form name="customer" 
>action="/coreWeb/databinding/anybean/updateAnyBean.do" method="post">
>              <table>
>                  <tr valign="top">
>                      <td>Name:</td>
>Index: netui/test/webapps/drt/testRecorder/tests/MultiForms2.xml
>===================================================================
>--- netui/test/webapps/drt/testRecorder/tests/MultiForms2.xml   (revision 0)
>+++ netui/test/webapps/drt/testRecorder/tests/MultiForms2.xml   (revision 0)
>@@ -0,0 +1,504 @@
>+<?xml version="1.0" encoding="UTF-8"?>
>+<ses:recorderSession 
>xmlns:ses="http://beehive.apache.org/netui/tools/testrecorder/2004/session">
>+   <ses:sessionName>MultiForms2</ses:sessionName>
>+   <ses:tester>crogers</ses:tester>
>+   <ses:startDate>09 Sep 2004, 03:37:46.309 PM MDT</ses:startDate>
>+   <ses:description>Make sure multiple forms in a JSP don't cause 
>conflicts.</ses:description>
>+   <ses:tests>
>+      <ses:test>
>+         <ses:testNumber>1</ses:testNumber>
>+         <ses:request>
>+            <ses:protocol>HTTP</ses:protocol>
>+            <ses:protocolVersion>1.1</ses:protocolVersion>
>+            <ses:host>localhost</ses:host>
>+            <ses:port>8080</ses:port>
>+            <ses:uri>/coreWeb/miniTests/multiForms2/Controller.jpf</ses:uri>
>+            <ses:method>GET</ses:method>
>+            <ses:parameters/>
>+            <ses:cookies>
>+               <ses:cookie>
>+                  <ses:name>JSESSIONID</ses:name>
>+                  <ses:value>60A5E37B02D8BC225741951C803AE593</ses:value>
>+               </ses:cookie>
>+               <ses:cookie>
>+                  <ses:name>JSESSIONID</ses:name>
>+ 
><ses:value>BAI1nkavhzBUUCRN0yyHfAEyMKuNevAIQg3hvwSKslb53KM5ZR0K!150401273</ses:value>
>+               </ses:cookie>
>+            </ses:cookies>
>+            <ses:headers>
>+               <ses:header>
>+                  <ses:name>accept</ses:name>
>+ 
><ses:value>text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5</ses:value>
>+               </ses:header>
>+               <ses:header>
>+                  <ses:name>accept-charset</ses:name>
>+                  <ses:value>ISO-8859-1,utf-8;q=0.7,*;q=0.7</ses:value>
>+               </ses:header>
>+               <ses:header>
>+                  <ses:name>accept-encoding</ses:name>
>+                  <ses:value>gzip,deflate</ses:value>
>+               </ses:header>
>+               <ses:header>
>+                  <ses:name>accept-language</ses:name>
>+                  <ses:value>en-us,en;q=0.5</ses:value>
>+               </ses:header>
>+               <ses:header>
>+                  <ses:name>connection</ses:name>
>+                  <ses:value>keep-alive</ses:value>
>+               </ses:header>
>+               <ses:header>
>+                  <ses:name>cookie</ses:name>
>+                  <ses:value>JSESSIONID=60A5E37B02D8BC225741951C803AE593; 
>JSESSIONID=BAI1nkavhzBUUCRN0yyHfAEyMKuNevAIQg3hvwSKslb53KM5ZR0K!150401273</ses:value>
>+               </ses:header>
>+               <ses:header>
>+                  <ses:name>host</ses:name>
>+                  <ses:value>localhost:8080</ses:value>
>+               </ses:header>
>+               <ses:header>
>+                  <ses:name>keep-alive</ses:name>
>+                  <ses:value>300</ses:value>
>+               </ses:header>
>+               <ses:header>
>+                  <ses:name>user-agent</ses:name>
>+                  <ses:value>Mozilla/5.0 (Windows; U; Windows NT 5.1; 
>en-US; rv:1.7) Gecko/20040803 Firefox/0.9.3</ses:value>
>+               </ses:header>
>+            </ses:headers>
>+         </ses:request>
>+         <ses:response>
>+            <ses:statusCode>200</ses:statusCode>
>+            <ses:reason/>
>+            <ses:responseBody><![CDATA[<!DOCTYPE HTML PUBLIC "//W3C//DTD 
>HTML 4.01 Transitional//EN"
>+       "http://www.w3.org/TR/html4/loose.dtd">
>+<html lang="en">
>+<head>
>+        <base 
>href="http://localhost:8080/coreWeb/miniTests/multiForms2/index.jsp">
>+    </head>
>+    <body>
>+        <form name="fooForm" 
>action="/coreWeb/miniTests/multiForms2/foo.do" method="post">
>+            foo: <input type="text" name="{actionForm.fooText}" value="foo">
>+            <input type="submit" value="Click">
>+            <br/>
>+        </form>
>+        <br>
>+        <form name="barForm" 
>action="/coreWeb/miniTests/multiForms2/bar.do" method="post">
>+            bar: <input type="text" name="{actionForm.barText}" value="bar">
>+            <input type="submit" value="Click">
>+            <br/>
>+        </form>
>+        Last input: <span>begin</span>
>+        <br/>
>+    </body>
>+</html>]]></ses:responseBody>
>+         </ses:response>
>+      </ses:test>
>+      <ses:test>
>+         <ses:testNumber>2</ses:testNumber>
>+         <ses:request>
>+            <ses:protocol>HTTP</ses:protocol>
>+            <ses:protocolVersion>1.1</ses:protocolVersion>
>+            <ses:host>localhost</ses:host>
>+            <ses:port>8080</ses:port>
>+            <ses:uri>/coreWeb/miniTests/multiForms2/bar.do</ses:uri>
>+            <ses:method>POST</ses:method>
>+            <ses:parameters>
>+               <ses:parameter>
>+                  <ses:name>{actionForm.barText}</ses:name>
>+                  <ses:value>bar</ses:value>
>+               </ses:parameter>
>+            </ses:parameters>
>+            <ses:cookies>
>+               <ses:cookie>
>+                  <ses:name>JSESSIONID</ses:name>
>+                  <ses:value>60A5E37B02D8BC225741951C803AE593</ses:value>
>+               </ses:cookie>
>+               <ses:cookie>
>+                  <ses:name>JSESSIONID</ses:name>
>+ 
><ses:value>BAI1nkavhzBUUCRN0yyHfAEyMKuNevAIQg3hvwSKslb53KM5ZR0K!150401273</ses:value>
>+               </ses:cookie>
>+            </ses:cookies>
>+            <ses:headers>
>+               <ses:header>
>+                  <ses:name>accept</ses:name>
>+ 
><ses:value>text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5</ses:value>
>+               </ses:header>
>+               <ses:header>
>+                  <ses:name>accept-charset</ses:name>
>+                  <ses:value>ISO-8859-1,utf-8;q=0.7,*;q=0.7</ses:value>
>+               </ses:header>
>+               <ses:header>
>+                  <ses:name>accept-encoding</ses:name>
>+                  <ses:value>gzip,deflate</ses:value>
>+               </ses:header>
>+               <ses:header>
>+                  <ses:name>accept-language</ses:name>
>+                  <ses:value>en-us,en;q=0.5</ses:value>
>+               </ses:header>
>+               <ses:header>
>+                  <ses:name>connection</ses:name>
>+                  <ses:value>keep-alive</ses:value>
>+               </ses:header>
>+               <ses:header>
>+                  <ses:name>content-length</ses:name>
>+                  <ses:value>28</ses:value>
>+               </ses:header>
>+               <ses:header>
>+                  <ses:name>content-type</ses:name>
>+                  <ses:value>application/x-www-form-urlencoded</ses:value>
>+               </ses:header>
>+               <ses:header>
>+                  <ses:name>cookie</ses:name>
>+                  <ses:value>JSESSIONID=60A5E37B02D8BC225741951C803AE593; 
>JSESSIONID=BAI1nkavhzBUUCRN0yyHfAEyMKuNevAIQg3hvwSKslb53KM5ZR0K!150401273</ses:value>
>+               </ses:header>
>+               <ses:header>
>+                  <ses:name>host</ses:name>
>+                  <ses:value>localhost:8080</ses:value>
>+               </ses:header>
>+               <ses:header>
>+                  <ses:name>keep-alive</ses:name>
>+                  <ses:value>300</ses:value>
>+               </ses:header>
>+               <ses:header>
>+                  <ses:name>referer</ses:name>
>+ 
><ses:value>http://localhost:8080/coreWeb/miniTests/multiForms2/Controller.jpf</ses:value>
>+               </ses:header>
>+               <ses:header>
>+                  <ses:name>user-agent</ses:name>
>+                  <ses:value>Mozilla/5.0 (Windows; U; Windows NT 5.1; 
>en-US; rv:1.7) Gecko/20040803 Firefox/0.9.3</ses:value>
>+               </ses:header>
>+            </ses:headers>
>+         </ses:request>
>+         <ses:response>
>+            <ses:statusCode>200</ses:statusCode>
>+            <ses:reason/>
>+            <ses:responseBody><![CDATA[<!DOCTYPE HTML PUBLIC "//W3C//DTD 
>HTML 4.01 Transitional//EN"
>+       "http://www.w3.org/TR/html4/loose.dtd">
>+<html lang="en">
>+<head>
>+        <base 
>href="http://localhost:8080/coreWeb/miniTests/multiForms2/index.jsp">
>+    </head>
>+    <body>
>+        <form name="fooForm" 
>action="/coreWeb/miniTests/multiForms2/foo.do" method="post">
>+            foo: <input type="text" name="{actionForm.fooText}" value="foo">
>+            <input type="submit" value="Click">
>+            <br/>
>+        </form>
>+        <br>
>+        <form name="barForm" 
>action="/coreWeb/miniTests/multiForms2/bar.do" method="post">
>+            bar: <input type="text" name="{actionForm.barText}" value="bar">
>+            <input type="submit" value="Click">
>+            <br/>
>+        </form>
>+        Last input: <span>bar</span>
>+        <br/>
>+    </body>
>+</html>]]></ses:responseBody>
>+         </ses:response>
>+      </ses:test>
>+      <ses:test>
>+         <ses:testNumber>3</ses:testNumber>
>+         <ses:request>
>+            <ses:protocol>HTTP</ses:protocol>
>+            <ses:protocolVersion>1.1</ses:protocolVersion>
>+            <ses:host>localhost</ses:host>
>+            <ses:port>8080</ses:port>
>+            <ses:uri>/coreWeb/miniTests/multiForms2/foo.do</ses:uri>
>+            <ses:method>POST</ses:method>
>+            <ses:parameters>
>+               <ses:parameter>
>+                  <ses:name>{actionForm.fooText}</ses:name>
>+                  <ses:value>foo</ses:value>
>+               </ses:parameter>
>+            </ses:parameters>
>+            <ses:cookies>
>+               <ses:cookie>
>+                  <ses:name>JSESSIONID</ses:name>
>+                  <ses:value>60A5E37B02D8BC225741951C803AE593</ses:value>
>+               </ses:cookie>
>+               <ses:cookie>
>+                  <ses:name>JSESSIONID</ses:name>
>+ 
><ses:value>BAI1nkavhzBUUCRN0yyHfAEyMKuNevAIQg3hvwSKslb53KM5ZR0K!150401273</ses:value>
>+               </ses:cookie>
>+            </ses:cookies>
>+            <ses:headers>
>+               <ses:header>
>+                  <ses:name>accept</ses:name>
>+ 
><ses:value>text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5</ses:value>
>+               </ses:header>
>+               <ses:header>
>+                  <ses:name>accept-charset</ses:name>
>+                  <ses:value>ISO-8859-1,utf-8;q=0.7,*;q=0.7</ses:value>
>+               </ses:header>
>+               <ses:header>
>+                  <ses:name>accept-encoding</ses:name>
>+                  <ses:value>gzip,deflate</ses:value>
>+               </ses:header>
>+               <ses:header>
>+                  <ses:name>accept-language</ses:name>
>+                  <ses:value>en-us,en;q=0.5</ses:value>
>+               </ses:header>
>+               <ses:header>
>+                  <ses:name>connection</ses:name>
>+                  <ses:value>keep-alive</ses:value>
>+               </ses:header>
>+               <ses:header>
>+                  <ses:name>content-length</ses:name>
>+                  <ses:value>28</ses:value>
>+               </ses:header>
>+               <ses:header>
>+                  <ses:name>content-type</ses:name>
>+                  <ses:value>application/x-www-form-urlencoded</ses:value>
>+               </ses:header>
>+               <ses:header>
>+                  <ses:name>cookie</ses:name>
>+                  <ses:value>JSESSIONID=60A5E37B02D8BC225741951C803AE593; 
>JSESSIONID=BAI1nkavhzBUUCRN0yyHfAEyMKuNevAIQg3hvwSKslb53KM5ZR0K!150401273</ses:value>
>+               </ses:header>
>+               <ses:header>
>+                  <ses:name>host</ses:name>
>+                  <ses:value>localhost:8080</ses:value>
>+               </ses:header>
>+               <ses:header>
>+                  <ses:name>keep-alive</ses:name>
>+                  <ses:value>300</ses:value>
>+               </ses:header>
>+               <ses:header>
>+                  <ses:name>referer</ses:name>
>+ 
><ses:value>http://localhost:8080/coreWeb/miniTests/multiForms2/bar.do</ses:value>
>+               </ses:header>
>+               <ses:header>
>+                  <ses:name>user-agent</ses:name>
>+                  <ses:value>Mozilla/5.0 (Windows; U; Windows NT 5.1; 
>en-US; rv:1.7) Gecko/20040803 Firefox/0.9.3</ses:value>
>+               </ses:header>
>+            </ses:headers>
>+         </ses:request>
>+         <ses:response>
>+            <ses:statusCode>200</ses:statusCode>
>+            <ses:reason/>
>+            <ses:responseBody><![CDATA[<!DOCTYPE HTML PUBLIC "//W3C//DTD 
>HTML 4.01 Transitional//EN"
>+       "http://www.w3.org/TR/html4/loose.dtd">
>+<html lang="en">
>+<head>
>+        <base 
>href="http://localhost:8080/coreWeb/miniTests/multiForms2/index.jsp">
>+    </head>
>+    <body>
>+        <form name="fooForm" 
>action="/coreWeb/miniTests/multiForms2/foo.do" method="post">
>+            foo: <input type="text" name="{actionForm.fooText}" value="foo">
>+            <input type="submit" value="Click">
>+            <br/>
>+        </form>
>+        <br>
>+        <form name="barForm" 
>action="/coreWeb/miniTests/multiForms2/bar.do" method="post">
>+            bar: <input type="text" name="{actionForm.barText}" value="bar">
>+            <input type="submit" value="Click">
>+            <br/>
>+        </form>
>+        Last input: <span>foo</span>
>+        <br/>
>+    </body>
>+</html>]]></ses:responseBody>
>+         </ses:response>
>+      </ses:test>
>+      <ses:test>
>+         <ses:testNumber>4</ses:testNumber>
>+         <ses:request>
>+            <ses:protocol>HTTP</ses:protocol>
>+            <ses:protocolVersion>1.1</ses:protocolVersion>
>+            <ses:host>localhost</ses:host>
>+            <ses:port>8080</ses:port>
>+            <ses:uri>/coreWeb/miniTests/multiForms2/foo.do</ses:uri>
>+            <ses:method>POST</ses:method>
>+            <ses:parameters>
>+               <ses:parameter>
>+                  <ses:name>{actionForm.fooText}</ses:name>
>+                  <ses:value>foo2</ses:value>
>+               </ses:parameter>
>+            </ses:parameters>
>+            <ses:cookies>
>+               <ses:cookie>
>+                  <ses:name>JSESSIONID</ses:name>
>+                  <ses:value>60A5E37B02D8BC225741951C803AE593</ses:value>
>+               </ses:cookie>
>+               <ses:cookie>
>+                  <ses:name>JSESSIONID</ses:name>
>+ 
><ses:value>BAI1nkavhzBUUCRN0yyHfAEyMKuNevAIQg3hvwSKslb53KM5ZR0K!150401273</ses:value>
>+               </ses:cookie>
>+            </ses:cookies>
>+            <ses:headers>
>+               <ses:header>
>+                  <ses:name>accept</ses:name>
>+ 
><ses:value>text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5</ses:value>
>+               </ses:header>
>+               <ses:header>
>+                  <ses:name>accept-charset</ses:name>
>+                  <ses:value>ISO-8859-1,utf-8;q=0.7,*;q=0.7</ses:value>
>+               </ses:header>
>+               <ses:header>
>+                  <ses:name>accept-encoding</ses:name>
>+                  <ses:value>gzip,deflate</ses:value>
>+               </ses:header>
>+               <ses:header>
>+                  <ses:name>accept-language</ses:name>
>+                  <ses:value>en-us,en;q=0.5</ses:value>
>+               </ses:header>
>+               <ses:header>
>+                  <ses:name>connection</ses:name>
>+                  <ses:value>keep-alive</ses:value>
>+               </ses:header>
>+               <ses:header>
>+                  <ses:name>content-length</ses:name>
>+                  <ses:value>29</ses:value>
>+               </ses:header>
>+               <ses:header>
>+                  <ses:name>content-type</ses:name>
>+                  <ses:value>application/x-www-form-urlencoded</ses:value>
>+               </ses:header>
>+               <ses:header>
>+                  <ses:name>cookie</ses:name>
>+                  <ses:value>JSESSIONID=60A5E37B02D8BC225741951C803AE593; 
>JSESSIONID=BAI1nkavhzBUUCRN0yyHfAEyMKuNevAIQg3hvwSKslb53KM5ZR0K!150401273</ses:value>
>+               </ses:header>
>+               <ses:header>
>+                  <ses:name>host</ses:name>
>+                  <ses:value>localhost:8080</ses:value>
>+               </ses:header>
>+               <ses:header>
>+                  <ses:name>keep-alive</ses:name>
>+                  <ses:value>300</ses:value>
>+               </ses:header>
>+               <ses:header>
>+                  <ses:name>referer</ses:name>
>+ 
><ses:value>http://localhost:8080/coreWeb/miniTests/multiForms2/foo.do</ses:value>
>+               </ses:header>
>+               <ses:header>
>+                  <ses:name>user-agent</ses:name>
>+                  <ses:value>Mozilla/5.0 (Windows; U; Windows NT 5.1; 
>en-US; rv:1.7) Gecko/20040803 Firefox/0.9.3</ses:value>
>+               </ses:header>
>+            </ses:headers>
>+         </ses:request>
>+         <ses:response>
>+            <ses:statusCode>200</ses:statusCode>
>+            <ses:reason/>
>+            <ses:responseBody><![CDATA[<!DOCTYPE HTML PUBLIC "//W3C//DTD 
>HTML 4.01 Transitional//EN"
>+       "http://www.w3.org/TR/html4/loose.dtd">
>+<html lang="en">
>+<head>
>+        <base 
>href="http://localhost:8080/coreWeb/miniTests/multiForms2/index.jsp">
>+    </head>
>+    <body>
>+        <form name="fooForm" 
>action="/coreWeb/miniTests/multiForms2/foo.do" method="post">
>+            foo: <input type="text" name="{actionForm.fooText}" value="foo2">
>+            <input type="submit" value="Click">
>+            <br/>
>+        </form>
>+        <br>
>+        <form name="barForm" 
>action="/coreWeb/miniTests/multiForms2/bar.do" method="post">
>+            bar: <input type="text" name="{actionForm.barText}" value="bar">
>+            <input type="submit" value="Click">
>+            <br/>
>+        </form>
>+        Last input: <span>foo2</span>
>+        <br/>
>+    </body>
>+</html>]]></ses:responseBody>
>+         </ses:response>
>+      </ses:test>
>+      <ses:test>
>+         <ses:testNumber>5</ses:testNumber>
>+         <ses:request>
>+            <ses:protocol>HTTP</ses:protocol>
>+            <ses:protocolVersion>1.1</ses:protocolVersion>
>+            <ses:host>localhost</ses:host>
>+            <ses:port>8080</ses:port>
>+            <ses:uri>/coreWeb/miniTests/multiForms2/foo.do</ses:uri>
>+            <ses:method>POST</ses:method>
>+            <ses:parameters>
>+               <ses:parameter>
>+                  <ses:name>{actionForm.fooText}</ses:name>
>+                  <ses:value>foo234567890</ses:value>
>+               </ses:parameter>
>+            </ses:parameters>
>+            <ses:cookies>
>+               <ses:cookie>
>+                  <ses:name>JSESSIONID</ses:name>
>+                  <ses:value>60A5E37B02D8BC225741951C803AE593</ses:value>
>+               </ses:cookie>
>+               <ses:cookie>
>+                  <ses:name>JSESSIONID</ses:name>
>+ 
><ses:value>BAI1nkavhzBUUCRN0yyHfAEyMKuNevAIQg3hvwSKslb53KM5ZR0K!150401273</ses:value>
>+               </ses:cookie>
>+            </ses:cookies>
>+            <ses:headers>
>+               <ses:header>
>+                  <ses:name>accept</ses:name>
>+ 
><ses:value>text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5</ses:value>
>+               </ses:header>
>+               <ses:header>
>+                  <ses:name>accept-charset</ses:name>
>+                  <ses:value>ISO-8859-1,utf-8;q=0.7,*;q=0.7</ses:value>
>+               </ses:header>
>+               <ses:header>
>+                  <ses:name>accept-encoding</ses:name>
>+                  <ses:value>gzip,deflate</ses:value>
>+               </ses:header>
>+               <ses:header>
>+                  <ses:name>accept-language</ses:name>
>+                  <ses:value>en-us,en;q=0.5</ses:value>
>+               </ses:header>
>+               <ses:header>
>+                  <ses:name>connection</ses:name>
>+                  <ses:value>keep-alive</ses:value>
>+               </ses:header>
>+               <ses:header>
>+                  <ses:name>content-length</ses:name>
>+                  <ses:value>37</ses:value>
>+               </ses:header>
>+               <ses:header>
>+                  <ses:name>content-type</ses:name>
>+                  <ses:value>application/x-www-form-urlencoded</ses:value>
>+               </ses:header>
>+               <ses:header>
>+                  <ses:name>cookie</ses:name>
>+                  <ses:value>JSESSIONID=60A5E37B02D8BC225741951C803AE593; 
>JSESSIONID=BAI1nkavhzBUUCRN0yyHfAEyMKuNevAIQg3hvwSKslb53KM5ZR0K!150401273</ses:value>
>+               </ses:header>
>+               <ses:header>
>+                  <ses:name>host</ses:name>
>+                  <ses:value>localhost:8080</ses:value>
>+               </ses:header>
>+               <ses:header>
>+                  <ses:name>keep-alive</ses:name>
>+                  <ses:value>300</ses:value>
>+               </ses:header>
>+               <ses:header>
>+                  <ses:name>referer</ses:name>
>+ 
><ses:value>http://localhost:8080/coreWeb/miniTests/multiForms2/foo.do</ses:value>
>+               </ses:header>
>+               <ses:header>
>+                  <ses:name>user-agent</ses:name>
>+                  <ses:value>Mozilla/5.0 (Windows; U; Windows NT 5.1; 
>en-US; rv:1.7) Gecko/20040803 Firefox/0.9.3</ses:value>
>+               </ses:header>
>+            </ses:headers>
>+         </ses:request>
>+         <ses:response>
>+            <ses:statusCode>200</ses:statusCode>
>+            <ses:reason/>
>+            <ses:responseBody><![CDATA[<!DOCTYPE HTML PUBLIC "//W3C//DTD 
>HTML 4.01 Transitional//EN"
>+       "http://www.w3.org/TR/html4/loose.dtd">
>+<html lang="en">
>+<head>
>+        <base 
>href="http://localhost:8080/coreWeb/miniTests/multiForms2/error.jsp">
>+    </head>
>+    <body>
>+        There was an error validating the form input.
>+        <br>
>+        Errors: requires 3-9 characters
>+
>+        <br>
>+        <br>
>+        <a href="/coreWeb/miniTests/multiForms2/begin.do">back</a>
>+        to start page.
>+    </body>
>+</html>]]></ses:responseBody>
>+         </ses:response>
>+      </ses:test>
>+   </ses:tests>
>+   <ses:endDate>09 Sep 2004, 03:38:35.540 PM MDT</ses:endDate>
>+   <ses:testCount>5</ses:testCount>
>+</ses:recorderSession>
>
>Property changes on: netui/test/webapps/drt/testRecorder/tests/MultiForms2.xml
>___________________________________________________________________
>Name: svn:eol-style
>    + native
>
>Index: netui/test/webapps/drt/testRecorder/tests/AnyBeanOverload.xml
>===================================================================
>--- 
>netui/test/webapps/drt/testRecorder/tests/AnyBeanOverload.xml 
>(revision 43672)
>+++ 
>netui/test/webapps/drt/testRecorder/tests/AnyBeanOverload.xml 
>(working copy)
>@@ -80,7 +80,7 @@
>
>          <br>
>          <br>
>-        <form name="anyBeanActionForm" 
>action="/coreWeb/pageFlowCore/anyBeanOverload/overload.do" method="post">
>+        <form name="string" 
>action="/coreWeb/pageFlowCore/anyBeanOverload/overload.do" method="post">
>              <input type="submit" value="hit overloaded action (should 
> get String version)">
>          </form>
>
>@@ -177,7 +177,7 @@
>
>          <br>
>          <br>
>-        <form name="anyBeanActionForm" 
>action="/coreWeb/pageFlowCore/anyBeanOverload/overload.do" method="post">
>+        <form name="string" 
>action="/coreWeb/pageFlowCore/anyBeanOverload/overload.do" method="post">
>              <input type="submit" value="hit overloaded action (should 
> get String version)">
>          </form>
>
>@@ -266,7 +266,7 @@
>
>          <br>
>          <br>
>-        <form name="anyBeanActionForm" 
>action="/coreWeb/pageFlowCore/anyBeanOverload/overload.do" method="post">
>+        <form name="string" 
>action="/coreWeb/pageFlowCore/anyBeanOverload/overload.do" method="post">
>              <input type="submit" value="hit overloaded action (should 
> get String version)">
>          </form>
>
>@@ -355,7 +355,7 @@
>
>          <br>
>          <br>
>-        <form name="anyBeanActionForm" 
>action="/coreWeb/pageFlowCore/anyBeanOverload/overload.do" method="post">
>+        <form name="string" 
>action="/coreWeb/pageFlowCore/anyBeanOverload/overload.do" method="post">
>              <input type="submit" value="hit overloaded action (should 
> get String version)">
>          </form>
>
>Index: netui/test/webapps/drt/testRecorder/config/testRecorder-tests.xml
>===================================================================
>--- 
>netui/test/webapps/drt/testRecorder/config/testRecorder-tests.xml 
>(revision 43672)
>+++ 
>netui/test/webapps/drt/testRecorder/config/testRecorder-tests.xml 
>(working copy)
>@@ -3078,6 +3078,21 @@
>           </features>
>        </test>
>        <test>
>+         <name>MultiForms2</name>
>+         <description>Test to make sure multiple forms in a JSP don't 
>cause conflicts.</description>
>+         <webapp>coreWeb</webapp>
>+         <categories>
>+            <category>bvt</category>
>+            <category>corePageFlow</category>
>+         </categories>
>+         <features>
>+            <feature>PageFlow</feature>
>+            <feature>Form</feature>
>+            <feature>Any Bean</feature>
>+            <feature>Validation</feature>
>+         </features>
>+      </test>
>+      <test>
>           <name>MultipleDatasource</name>
>           <description>Test of Compound expressions used as data 
> source</description>
>           <webapp>coreWeb</webapp>
>Index: netui/test/webapps/drt/coreWeb/miniTests/actionChaining/result.jsp
>===================================================================
>--- 
>netui/test/webapps/drt/coreWeb/miniTests/actionChaining/result.jsp 
>(revision 43672)
>+++ 
>netui/test/webapps/drt/coreWeb/miniTests/actionChaining/result.jsp 
>(working copy)
>@@ -2,7 +2,6 @@
>  <%@ taglib uri="beehive-netui-tags-databinding.tld" prefix="netui-data"%>
>  <%@ taglib uri="beehive-netui-tags-html.tld" prefix="netui"%>
>  <%@ taglib uri="beehive-netui-tags-template.tld" prefix="netui-template"%>
>-<netui-data:declarePageInput name="isSameForm" 
>type="com.bea.x2003.x03.controls.TagAttributeType.Type.Boolean"/>
>  <netui:html>
>      <head>
>          <title>
>@@ -15,4 +14,4 @@
>          <br>
>          <netui:anchor action="begin">back</netui:anchor>
>      </body>
>-</netui:html>
>\ No newline at end of file
>+</netui:html>
>Index: netui/test/webapps/drt/coreWeb/miniTests/multiForms2/Controller.jpf
>===================================================================
>--- netui/test/webapps/drt/coreWeb/miniTests/multiForms2/Controller.jpf 
>(revision 0)
>+++ netui/test/webapps/drt/coreWeb/miniTests/multiForms2/Controller.jpf 
>(revision 0)
>@@ -0,0 +1,98 @@
>+/*
>+ * Copyright 2004 The Apache Software Foundation.
>+ *
>+ * Licensed under the Apache License, Version 2.0 (the "License");
>+ * you may not use this file except in compliance with the License.
>+ * You may obtain a copy of the License at
>+ *
>+ *     http://www.apache.org/licenses/LICENSE-2.0
>+ *
>+ * Unless required by applicable law or agreed to in writing, software
>+ * distributed under the License is distributed on an "AS IS" BASIS,
>+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
>+ * See the License for the specific language governing permissions and
>+ * limitations under the License.
>+ *
>+ * $Header:$
>+ */
>+package miniTests.multiForms2;
>+
>+import org.apache.beehive.netui.pageflow.PageFlowController;
>+import org.apache.beehive.netui.pageflow.Forward;
>+import org.apache.beehive.netui.pageflow.annotations.Jpf;
>+
>+@Jpf.Controller(
>+    validatableBeans = {
>+        @Jpf.ValidatableBean(
>+            type = FooForm.class,
>+            validatableProperties = {
>+                @Jpf.ValidatableProperty(
>+                    propertyName = "fooText",
>+                    validateRequired =
>+                        @Jpf.ValidateRequired(
>+                            enabled = true,
>+                            message = "requires 3-9 characters"
>+                        ),
>+                    validateMinLength =
>+                        @Jpf.ValidateMinLength(
>+                            enabled = true,
>+                            chars = 3,
>+                            message = "requires 3-9 characters"
>+                        ),
>+                    validateMaxLength =
>+                        @Jpf.ValidateMaxLength(
>+                            enabled = true,
>+                            chars = 9,
>+                            message = "requires 3-9 characters"
>+                        )
>+                )
>+            }
>+        )
>+    }
>+)
>+public class Controller extends PageFlowController
>+{
>+    private String _text;
>+
>+    public String getText() {
>+        return _text;
>+    }
>+    public void setText(String text) {
>+        _text = text;
>+    }
>+
>+    public static class BarForm
>+            implements java.io.Serializable
>+    {
>+        private String _barText = "bar";
>+        public void setBarText( String barText ) { _barText = barText; }
>+        public String getBarText() { return _barText; }
>+    }
>+
>+    @Jpf.Action( forwards = { @Jpf.Forward( name="index", 
>path="index.jsp") } )
>+    protected Forward begin()
>+    {
>+        setText( "begin" );
>+        return new Forward( "index" );
>+    }
>+
>+    @Jpf.Action(
>+        validationErrorForward =
>+            @Jpf.Forward( name="error", path="error.jsp"  ),
>+        forwards = { @Jpf.Forward( name="success", path="index.jsp") }
>+    )
>+    protected Forward foo( FooForm form )
>+    {
>+        setText( form.getFooText() );
>+        return new Forward( "success" );
>+    }
>+
>+    @Jpf.Action(
>+        forwards = { @Jpf.Forward( name="success", path="index.jsp") }
>+    )
>+    protected Forward bar( BarForm form )
>+    {
>+        setText( form.getBarText() );
>+        return new Forward( "success" );
>+    }
>+}
>
>Property changes on: 
>netui/test/webapps/drt/coreWeb/miniTests/multiForms2/Controller.jpf
>___________________________________________________________________
>Name: svn:eol-style
>    + native
>
>Index: netui/test/webapps/drt/coreWeb/miniTests/multiForms2/index.jsp
>===================================================================
>--- 
>netui/test/webapps/drt/coreWeb/miniTests/multiForms2/index.jsp 
>(revision 0)
>+++ 
>netui/test/webapps/drt/coreWeb/miniTests/multiForms2/index.jsp 
>(revision 0)
>@@ -0,0 +1,25 @@
>+<%@ page language="java" contentType="text/html;charset=UTF-8"%>
>+<%@ taglib prefix="netui" 
>uri="http://beehive.apache.org/netui/tags-html-1.0"%>
>+
>+<netui:html>
>+    <head>
>+        <netui:base/>
>+    </head>
>+    <body>
>+        <netui:form action="foo">
>+            foo: <netui:textBox dataSource="actionForm.fooText"/>
>+            <netui:button/>
>+            <br/>
>+        </netui:form>
>+        <br>
>+        <netui:form action="bar">
>+            bar: <netui:textBox dataSource="actionForm.barText"/>
>+            <netui:button/>
>+            <br/>
>+        </netui:form>
>+        Last input: <netui:span value="${pageFlow.text}"/>
>+        <br/>
>+    </body>
>+</netui:html>
>+
>+
>
>Property changes on: 
>netui/test/webapps/drt/coreWeb/miniTests/multiForms2/index.jsp
>___________________________________________________________________
>Name: svn:eol-style
>    + native
>
>Index: netui/test/webapps/drt/coreWeb/miniTests/multiForms2/error.jsp
>===================================================================
>--- 
>netui/test/webapps/drt/coreWeb/miniTests/multiForms2/error.jsp 
>(revision 0)
>+++ 
>netui/test/webapps/drt/coreWeb/miniTests/multiForms2/error.jsp 
>(revision 0)
>@@ -0,0 +1,20 @@
>+<%@ page language="java" contentType="text/html;charset=UTF-8"%>
>+<%@ taglib prefix="netui" 
>uri="http://beehive.apache.org/netui/tags-html-1.0"%>
>+
>+
>+<netui:html>
>+    <head>
>+        <netui:base/>
>+    </head>
>+    <netui:body>
>+        There was an error validating the form input.
>+        <br>
>+        Errors: <netui:errors />
>+        <br>
>+        <br>
>+        <netui:anchor action="begin">back</netui:anchor>
>+        to start page.
>+    </netui:body>
>+</netui:html>
>+
>+
>
>Property changes on: 
>netui/test/webapps/drt/coreWeb/miniTests/multiForms2/error.jsp
>___________________________________________________________________
>Name: svn:eol-style
>    + native
>
>Index: netui/test/webapps/drt/coreWeb/miniTests/multiForms2/FooForm.java
>===================================================================
>--- 
>netui/test/webapps/drt/coreWeb/miniTests/multiForms2/FooForm.java 
>(revision 0)
>+++ 
>netui/test/webapps/drt/coreWeb/miniTests/multiForms2/FooForm.java 
>(revision 0)
>@@ -0,0 +1,26 @@
>+/*
>+ * Copyright 2004 The Apache Software Foundation.
>+ *
>+ * Licensed under the Apache License, Version 2.0 (the "License");
>+ * you may not use this file except in compliance with the License.
>+ * You may obtain a copy of the License at
>+ *
>+ *     http://www.apache.org/licenses/LICENSE-2.0
>+ *
>+ * Unless required by applicable law or agreed to in writing, software
>+ * distributed under the License is distributed on an "AS IS" BASIS,
>+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
>+ * See the License for the specific language governing permissions and
>+ * limitations under the License.
>+ *
>+ * $Header:$
>+ */
>+package miniTests.multiForms2;
>+
>+public class FooForm implements java.io.Serializable
>+{
>+    private String _fooText = "foo";
>+    public void setFooText( String fooText ) { _fooText = fooText; }
>+    public String getFooText() { return _fooText; }
>+}
>+
>
>Property changes on: 
>netui/test/webapps/drt/coreWeb/miniTests/multiForms2/FooForm.java
>___________________________________________________________________
>Name: svn:eol-style
>    + native
>
>Index: netui/test/webapps/drt/coreWeb/WEB-INF/strutsValidator-merge-config.xml
>===================================================================
>--- 
>netui/test/webapps/drt/coreWeb/WEB-INF/strutsValidator-merge-config.xml 
>  (revision 43672)
>+++ 
>netui/test/webapps/drt/coreWeb/WEB-INF/strutsValidator-merge-config.xml 
>  (working copy)
>@@ -10,7 +10,7 @@
>
>    <plug-in className="org.apache.struts.validator.ValidatorPlugIn">
>      <set-property property="pathnames"
>- 
>value="/WEB-INF/validator-rules.xml,/WEB-INF/strutsValidator-validation.xml"/>
>+ 
>value="/WEB-INF/netui-validator-rules.xml,/WEB-INF/strutsValidator-validation.xml"/>
>    </plug-in>
>
>  </struts-config>
>Index: netui/test/webapps/drt/coreWeb/WEB-INF/validator-rules.xml
>===================================================================
>--- netui/test/webapps/drt/coreWeb/WEB-INF/validator-rules.xml  (revision 
>43672)
>+++ netui/test/webapps/drt/coreWeb/WEB-INF/validator-rules.xml  (working copy)
>@@ -1,1044 +0,0 @@
>-<!DOCTYPE form-validation PUBLIC
>-          "-//Apache Software Foundation//DTD Commons Validator Rules 
>Configuration 1.0//EN"
>-          "http://jakarta.apache.org/commons/dtds/validator_1_0.dtd">
>-<!--
>-
>-   This file contains the default Struts Validator pluggable validator
>-   definitions.  It should be placed somewhere under /WEB-INF and
>-   referenced in the struts-config.xml under the plug-in element
>-   for the ValidatorPlugIn.
>-
>-      <plug-in className="org.apache.struts.validator.ValidatorPlugIn">
>-        <set-property property="pathnames" 
>value="/WEB-INF/validator-rules.xml,
>-                                                  /WEB-INF/validation.xml"/>
>-      </plug-in>
>-
>-   These are the default error messages associated with
>-   each validator defined in this file.  They should be
>-   added to your projects ApplicationResources.properties
>-   file or you can associate new ones by modifying the
>-   pluggable validators msg attributes in this file.
>-
>-   # Struts Validator Error Messages
>-   errors.required={0} is required.
>-   errors.minlength={0} can not be less than {1} characters.
>-   errors.maxlength={0} can not be greater than {1} characters.
>-   errors.invalid={0} is invalid.
>-
>-   errors.byte={0} must be a byte.
>-   errors.short={0} must be a short.
>-   errors.integer={0} must be an integer.
>-   errors.long={0} must be a long.
>-   errors.float={0} must be a float.
>-   errors.double={0} must be a double.
>-
>-   errors.date={0} is not a date.
>-   errors.range={0} is not in the range {1} through {2}.
>-   errors.creditcard={0} is an invalid credit card number.
>-   errors.email={0} is an invalid e-mail address.
>-
>--->
>-
>-<form-validation>
>-
>-   <global>
>-
>-      <validator name="required"
>-            classname="org.apache.struts.validator.FieldChecks"
>-               method="validateRequired"
>-         methodParams="java.lang.Object,
>-                       org.apache.commons.validator.ValidatorAction,
>-                       org.apache.commons.validator.Field,
>-                       org.apache.struts.action.ActionErrors,
>-                       javax.servlet.http.HttpServletRequest"
>-                  msg="errors.required">
>-
>-         <javascript><![CDATA[
>-            function validateRequired(form) {
>-                var isValid = true;
>-                var focusField = null;
>-                var i = 0;
>-                var fields = new Array();
>-                oRequired = new required();
>-                for (x in oRequired) {
>-                       var field = form[oRequired[x][0]];
>-
>-                    if (field.type == 'text' ||
>-                        field.type == 'textarea' ||
>-                        field.type == 'file' ||
>-                        field.type == 'select-one' ||
>-                        field.type == 'radio' ||
>-                        field.type == 'password') {
>-
>-                        var value = '';
>-                                               // get field's value
>-                                               if (field.type == 
>"select-one") {
>-                                                       var si = 
>field.selectedIndex;
>-                                                       if (si >= 0) {
>-                                                               value = 
>field.options[si].value;
>-                                                       }
>-                                               } else {
>-                                                       value = field.value;
>-                                               }
>-
>-                        if (trim(value).length == 0) {
>-
>-                               if (i == 0) {
>-                                   focusField = field;
>-                               }
>-                               fields[i++] = oRequired[x][1];
>-                               isValid = false;
>-                        }
>-                    }
>-                }
>-                if (fields.length > 0) {
>-                   focusField.focus();
>-                   alert(fields.join('\n'));
>-                }
>-                return isValid;
>-            }
>-
>-            // Trim whitespace from left and right sides of s.
>-            function trim(s) {
>-                return s.replace( /^\s*/, "" ).replace( /\s*$/, "" );
>-            }
>-
>-            ]]>
>-         </javascript>
>-
>-      </validator>
>-
>-      <validator name="requiredif"
>-                 classname="org.apache.struts.validator.FieldChecks"
>-                 method="validateRequiredIf"
>-                 methodParams="java.lang.Object,
>-                               org.apache.commons.validator.ValidatorAction,
>-                               org.apache.commons.validator.Field,
>-                               org.apache.struts.action.ActionErrors,
>-                               org.apache.commons.validator.Validator,
>-                               javax.servlet.http.HttpServletRequest"
>-                 msg="errors.required">
>-      </validator>
>-
>-      <validator name="minlength"
>-            classname="org.apache.struts.validator.FieldChecks"
>-               method="validateMinLength"
>-         methodParams="java.lang.Object,
>-                       org.apache.commons.validator.ValidatorAction,
>-                       org.apache.commons.validator.Field,
>-                       org.apache.struts.action.ActionErrors,
>-                       javax.servlet.http.HttpServletRequest"
>-              depends=""
>-                  msg="errors.minlength">
>-
>-         <javascript><![CDATA[
>-            function validateMinLength(form) {
>-                var isValid = true;
>-                var focusField = null;
>-                var i = 0;
>-                var fields = new Array();
>-                oMinLength = new minlength();
>-                for (x in oMinLength) {
>-                    var field = form[oMinLength[x][0]];
>-
>-                    if (field.type == 'text' ||
>-                        field.type == 'textarea') {
>-
>-                        var iMin = parseInt(oMinLength[x][2]("minlength"));
>-                        if ((trim(field.value).length > 0) && 
>(field.value.length < iMin)) {
>-                            if (i == 0) {
>-                                focusField = field;
>-                            }
>-                            fields[i++] = oMinLength[x][1];
>-                            isValid = false;
>-                        }
>-                    }
>-                }
>-                if (fields.length > 0) {
>-                   focusField.focus();
>-                   alert(fields.join('\n'));
>-                }
>-                return isValid;
>-            }]]>
>-         </javascript>
>-
>-      </validator>
>-
>-
>-      <validator name="maxlength"
>-            classname="org.apache.struts.validator.FieldChecks"
>-               method="validateMaxLength"
>-         methodParams="java.lang.Object,
>-                       org.apache.commons.validator.ValidatorAction,
>-                       org.apache.commons.validator.Field,
>-                       org.apache.struts.action.ActionErrors,
>-                       javax.servlet.http.HttpServletRequest"
>-              depends=""
>-                  msg="errors.maxlength">
>-
>-         <javascript><![CDATA[
>-            function validateMaxLength(form) {
>-                var isValid = true;
>-                var focusField = null;
>-                var i = 0;
>-                var fields = new Array();
>-                oMaxLength = new maxlength();
>-                for (x in oMaxLength) {
>-                    var field = form[oMaxLength[x][0]];
>-
>-                    if (field.type == 'text' ||
>-                        field.type == 'textarea') {
>-
>-                        var iMax = parseInt(oMaxLength[x][2]("maxlength"));
>-                        if (field.value.length > iMax) {
>-                            if (i == 0) {
>-                                focusField = field;
>-                            }
>-                            fields[i++] = oMaxLength[x][1];
>-                            isValid = false;
>-                        }
>-                    }
>-                }
>-                if (fields.length > 0) {
>-                   focusField.focus();
>-                   alert(fields.join('\n'));
>-                }
>-                return isValid;
>-            }]]>
>-         </javascript>
>-
>-      </validator>
>-
>-
>-      <validator name="mask"
>-            classname="org.apache.struts.validator.FieldChecks"
>-               method="validateMask"
>-         methodParams="java.lang.Object,
>-                       org.apache.commons.validator.ValidatorAction,
>-                       org.apache.commons.validator.Field,
>-                       org.apache.struts.action.ActionErrors,
>-                       javax.servlet.http.HttpServletRequest"
>-              depends=""
>-                  msg="errors.invalid">
>-
>-         <javascript><![CDATA[
>-            function validateMask(form) {
>-                var isValid = true;
>-                var focusField = null;
>-                var i = 0;
>-                var fields = new Array();
>-                oMasked = new mask();
>-                for (x in oMasked) {
>-                    var field = form[oMasked[x][0]];
>-
>-                    if ((field.type == 'text' ||
>-                         field.type == 'textarea') &&
>-                         (field.value.length > 0)) {
>-
>-                        if (!matchPattern(field.value, 
>oMasked[x][2]("mask"))) {
>-                            if (i == 0) {
>-                                focusField = field;
>-                            }
>-                            fields[i++] = oMasked[x][1];
>-                            isValid = false;
>-                        }
>-                    }
>-                }
>-
>-                if (fields.length > 0) {
>-                   focusField.focus();
>-                   alert(fields.join('\n'));
>-                }
>-                return isValid;
>-            }
>-
>-            function matchPattern(value, mask) {
>-               return mask.exec(value);
>-            }]]>
>-         </javascript>
>-
>-      </validator>
>-
>-
>-      <validator name="byte"
>-            classname="org.apache.struts.validator.FieldChecks"
>-               method="validateByte"
>-         methodParams="java.lang.Object,
>-                       org.apache.commons.validator.ValidatorAction,
>-                       org.apache.commons.validator.Field,
>-                       org.apache.struts.action.ActionErrors,
>-                       javax.servlet.http.HttpServletRequest"
>-              depends=""
>-                  msg="errors.byte"
>-       jsFunctionName="ByteValidations">
>-
>-         <javascript><![CDATA[
>-            function validateByte(form) {
>-                var bValid = true;
>-                var focusField = null;
>-                var i = 0;
>-                var fields = new Array();
>-                oByte = new ByteValidations();
>-                for (x in oByte) {
>-                       var field = form[oByte[x][0]];
>-
>-                    if (field.type == 'text' ||
>-                        field.type == 'textarea' ||
>-                        field.type == 'select-one' ||
>-                                               field.type == 'radio') {
>-
>-                                               var value = '';
>-                                               // get field's value
>-                                               if (field.type == 
>"select-one") {
>-                                                       var si = 
>field.selectedIndex;
>-                                                       if (si >= 0) {
>-                                                               value = 
>field.options[si].value;
>-                                                       }
>-                                               } else {
>-                                                       value = field.value;
>-                                               }
>-
>-                        if (value.length > 0) {
>-                            if (!isAllDigits(value)) {
>-                                bValid = false;
>-                                if (i == 0) {
>-                                    focusField = field;
>-                                }
>-                                fields[i++] = oByte[x][1];
>-
>-                            } else {
>-
>-                                   var iValue = parseInt(value);
>-                                   if (isNaN(iValue) || !(iValue >= -128 
>&& iValue <= 127)) {
>-                                       if (i == 0) {
>-                                           focusField = field;
>-                                       }
>-                                       fields[i++] = oByte[x][1];
>-                                       bValid = false;
>-                                   }
>-                            }
>-                                               }
>-
>-                    }
>-                }
>-                if (fields.length > 0) {
>-                   focusField.focus();
>-                   alert(fields.join('\n'));
>-                }
>-                return bValid;
>-            }]]>
>-         </javascript>
>-
>-      </validator>
>-
>-
>-      <validator name="short"
>-            classname="org.apache.struts.validator.FieldChecks"
>-               method="validateShort"
>-         methodParams="java.lang.Object,
>-                       org.apache.commons.validator.ValidatorAction,
>-                       org.apache.commons.validator.Field,
>-                       org.apache.struts.action.ActionErrors,
>-                       javax.servlet.http.HttpServletRequest"
>-              depends=""
>-                  msg="errors.short"
>-       jsFunctionName="ShortValidations">
>-
>-         <javascript><![CDATA[
>-            function validateShort(form) {
>-                var bValid = true;
>-                var focusField = null;
>-                var i = 0;
>-                var fields = new Array();
>-                oShort = new ShortValidations();
>-                for (x in oShort) {
>-                       var field = form[oShort[x][0]];
>-
>-                    if (field.type == 'text' ||
>-                        field.type == 'textarea' ||
>-                        field.type == 'select-one' ||
>-                        field.type == 'radio') {
>-
>-                        var value = '';
>-                                               // get field's value
>-                                               if (field.type == 
>"select-one") {
>-                                                       var si = 
>field.selectedIndex;
>-                                                       if (si >= 0) {
>-                                                               value = 
>field.options[si].value;
>-                                                       }
>-                                               } else {
>-                                                       value = field.value;
>-                                               }
>-
>-                        if (value.length > 0) {
>-                            if (!isAllDigits(value)) {
>-                                bValid = false;
>-                                if (i == 0) {
>-                                    focusField = field;
>-                                }
>-                                fields[i++] = oShort[x][1];
>-
>-                            } else {
>-
>-                                   var iValue = parseInt(value);
>-                                   if (isNaN(iValue) || !(iValue >= 
>-32768 && iValue <= 32767)) {
>-                                       if (i == 0) {
>-                                           focusField = field;
>-                                       }
>-                                       fields[i++] = oShort[x][1];
>-                                       bValid = false;
>-                                   }
>-                              }
>-                       }
>-                    }
>-                }
>-                if (fields.length > 0) {
>-                   focusField.focus();
>-                   alert(fields.join('\n'));
>-                }
>-                return bValid;
>-            }]]>
>-         </javascript>
>-
>-      </validator>
>-
>-
>-      <validator name="integer"
>-            classname="org.apache.struts.validator.FieldChecks"
>-               method="validateInteger"
>-         methodParams="java.lang.Object,
>-                       org.apache.commons.validator.ValidatorAction,
>-                       org.apache.commons.validator.Field,
>-                       org.apache.struts.action.ActionErrors,
>-                       javax.servlet.http.HttpServletRequest"
>-              depends=""
>-                  msg="errors.integer"
>-       jsFunctionName="IntegerValidations">
>-
>-         <javascript><![CDATA[
>-            function validateInteger(form) {
>-                var bValid = true;
>-                var focusField = null;
>-                var i = 0;
>-                var fields = new Array();
>-                oInteger = new IntegerValidations();
>-                for (x in oInteger) {
>-                       var field = form[oInteger[x][0]];
>-
>-                    if (field.type == 'text' ||
>-                        field.type == 'textarea' ||
>-                        field.type == 'select-one' ||
>-                        field.type == 'radio') {
>-
>-                        var value = '';
>-                                               // get field's value
>-                                               if (field.type == 
>"select-one") {
>-                                                       var si = 
>field.selectedIndex;
>-                                                   if (si >= 0) {
>-                                                           value = 
>field.options[si].value;
>-                                                   }
>-                                               } else {
>-                                                       value = field.value;
>-                                               }
>-
>-                        if (value.length > 0) {
>-
>-                            if (!isAllDigits(value)) {
>-                                bValid = false;
>-                                if (i == 0) {
>-                                       focusField = field;
>-                                   }
>-                                                       fields[i++] = 
>oInteger[x][1];
>-
>-                            } else {
>-                                   var iValue = parseInt(value);
>-                                   if (isNaN(iValue) || !(iValue >= 
>-2147483648 && iValue <= 2147483647)) {
>-                                       if (i == 0) {
>-                                           focusField = field;
>-                                       }
>-                                       fields[i++] = oInteger[x][1];
>-                                       bValid = false;
>-                                  }
>-                           }
>-                       }
>-                    }
>-                }
>-                if (fields.length > 0) {
>-                   focusField.focus();
>-                   alert(fields.join('\n'));
>-                }
>-                return bValid;
>-            }
>-
>-            function isAllDigits(argvalue) {
>-                argvalue = argvalue.toString();
>-                var validChars = "0123456789";
>-                var startFrom = 0;
>-                if (argvalue.substring(0, 2) == "0x") {
>-                   validChars = "0123456789abcdefABCDEF";
>-                   startFrom = 2;
>-                } else if (argvalue.charAt(0) == "0") {
>-                   validChars = "01234567";
>-                   startFrom = 1;
>-                } else if (argvalue.charAt(0) == "-") {
>-                    startFrom = 1;
>-                }
>-
>-                for (var n = startFrom; n < argvalue.length; n++) {
>-                    if (validChars.indexOf(argvalue.substring(n, n+1)) == 
>-1) return false;
>-                }
>-                return true;
>-            }]]>
>-         </javascript>
>-
>-      </validator>
>-
>-
>-      <validator name="long"
>-            classname="org.apache.struts.validator.FieldChecks"
>-               method="validateLong"
>-         methodParams="java.lang.Object,
>-                       org.apache.commons.validator.ValidatorAction,
>-                       org.apache.commons.validator.Field,
>-                       org.apache.struts.action.ActionErrors,
>-                       javax.servlet.http.HttpServletRequest"
>-              depends=""
>-                  msg="errors.long"/>
>-
>-
>-      <validator name="float"
>-            classname="org.apache.struts.validator.FieldChecks"
>-               method="validateFloat"
>-         methodParams="java.lang.Object,
>-                       org.apache.commons.validator.ValidatorAction,
>-                       org.apache.commons.validator.Field,
>-                       org.apache.struts.action.ActionErrors,
>-                       javax.servlet.http.HttpServletRequest"
>-              depends=""
>-                  msg="errors.float"
>-       jsFunctionName="FloatValidations">
>-
>-         <javascript><![CDATA[
>-            function validateFloat(form) {
>-                var bValid = true;
>-                var focusField = null;
>-                var i = 0;
>-                var fields = new Array();
>-                oFloat = new FloatValidations();
>-                for (x in oFloat) {
>-                       var field = form[oFloat[x][0]];
>-
>-                    if (field.type == 'text' ||
>-                        field.type == 'textarea' ||
>-                        field.type == 'select-one' ||
>-                        field.type == 'radio') {
>-
>-                       var value = '';
>-                                               // get field's value
>-                                               if (field.type == 
>"select-one") {
>-                                                       var si = 
>field.selectedIndex;
>-                                                       if (si >= 0) {
>-                                                           value = 
>field.options[si].value;
>-                                                       }
>-                                               } else {
>-                                                       value = field.value;
>-                                               }
>-
>-                        if (value.length > 0) {
>-                            // remove '.' before checking digits
>-                            var tempArray = value.split('.');
>-                            var joinedString= tempArray.join('');
>-
>-                            if (!isAllDigits(joinedString)) {
>-                                bValid = false;
>-                                if (i == 0) {
>-                                    focusField = field;
>-                                }
>-                                fields[i++] = oFloat[x][1];
>-
>-                            } else {
>-                                   var iValue = parseFloat(value);
>-                                   if (isNaN(iValue)) {
>-                                       if (i == 0) {
>-                                           focusField = field;
>-                                       }
>-                                       fields[i++] = oFloat[x][1];
>-                                       bValid = false;
>-                                   }
>-                            }
>-                        }
>-                    }
>-                }
>-                if (fields.length > 0) {
>-                   focusField.focus();
>-                   alert(fields.join('\n'));
>-                }
>-                return bValid;
>-            }]]>
>-         </javascript>
>-
>-      </validator>
>-
>-
>-      <validator name="double"
>-            classname="org.apache.struts.validator.FieldChecks"
>-               method="validateDouble"
>-         methodParams="java.lang.Object,
>-                       org.apache.commons.validator.ValidatorAction,
>-                       org.apache.commons.validator.Field,
>-                       org.apache.struts.action.ActionErrors,
>-                       javax.servlet.http.HttpServletRequest"
>-              depends=""
>-                  msg="errors.double"/>
>-
>-
>-      <validator name="date"
>-            classname="org.apache.struts.validator.FieldChecks"
>-               method="validateDate"
>-         methodParams="java.lang.Object,
>-                       org.apache.commons.validator.ValidatorAction,
>-                       org.apache.commons.validator.Field,
>-                       org.apache.struts.action.ActionErrors,
>-                       javax.servlet.http.HttpServletRequest"
>-              depends=""
>-                  msg="errors.date"
>-       jsFunctionName="DateValidations">
>-
>-         <javascript><![CDATA[
>-            function validateDate(form) {
>-               var bValid = true;
>-               var focusField = null;
>-               var i = 0;
>-               var fields = new Array();
>-               oDate = new DateValidations();
>-               for (x in oDate) {
>-                   var value = form[oDate[x][0]].value;
>-                   var datePattern = oDate[x][2]("datePatternStrict");
>-                   if ((form[oDate[x][0]].type == 'text' ||
>-                        form[oDate[x][0]].type == 'textarea') &&
>-                       (value.length > 0) &&
>-                       (datePattern.length > 0)) {
>-                     var MONTH = "MM";
>-                     var DAY = "dd";
>-                     var YEAR = "yyyy";
>-                     var orderMonth = datePattern.indexOf(MONTH);
>-                     var orderDay = datePattern.indexOf(DAY);
>-                     var orderYear = datePattern.indexOf(YEAR);
>-                     if ((orderDay < orderYear && orderDay > orderMonth)) {
>-                         var iDelim1 = orderMonth + MONTH.length;
>-                         var iDelim2 = orderDay + DAY.length;
>-                         var delim1 = datePattern.substring(iDelim1, 
>iDelim1 + 1);
>-                         var delim2 = datePattern.substring(iDelim2, 
>iDelim2 + 1);
>-                         if (iDelim1 == orderDay && iDelim2 == orderYear) {
>-                            dateRegexp = new 
>RegExp("^(\\d{2})(\\d{2})(\\d{4})$");
>-                         } else if (iDelim1 == orderDay) {
>-                            dateRegexp = new RegExp("^(\\d{2})(\\d{2})[" 
>+ delim2 + "](\\d{4})$");
>-                         } else if (iDelim2 == orderYear) {
>-                            dateRegexp = new RegExp("^(\\d{2})[" + delim1 
>+ "](\\d{2})(\\d{4})$");
>-                         } else {
>-                            dateRegexp = new RegExp("^(\\d{2})[" + delim1 
>+ "](\\d{2})[" + delim2 + "](\\d{4})$");
>-                         }
>-                         var matched = dateRegexp.exec(value);
>-                         if(matched != null) {
>-                            if (!isValidDate(matched[2], matched[1], 
>matched[3])) {
>-                               if (i == 0) {
>-                                   focusField = form[oDate[x][0]];
>-                               }
>-                               fields[i++] = oDate[x][1];
>-                               bValid =  false;
>-                            }
>-                         } else {
>-                            if (i == 0) {
>-                                focusField = form[oDate[x][0]];
>-                            }
>-                            fields[i++] = oDate[x][1];
>-                            bValid =  false;
>-                         }
>-                     } else if ((orderMonth < orderYear && orderMonth > 
>orderDay)) {
>-                         var iDelim1 = orderDay + DAY.length;
>-                         var iDelim2 = orderMonth + MONTH.length;
>-                         var delim1 = datePattern.substring(iDelim1, 
>iDelim1 + 1);
>-                         var delim2 = datePattern.substring(iDelim2, 
>iDelim2 + 1);
>-                         if (iDelim1 == orderMonth && iDelim2 == orderYear) {
>-                             dateRegexp = new 
>RegExp("^(\\d{2})(\\d{2})(\\d{4})$");
>-                         } else if (iDelim1 == orderMonth) {
>-                             dateRegexp = new RegExp("^(\\d{2})(\\d{2})[" 
>+ delim2 + "](\\d{4})$");
>-                         } else if (iDelim2 == orderYear) {
>-                             dateRegexp = new RegExp("^(\\d{2})[" + 
>delim1 + "](\\d{2})(\\d{4})$");
>-                         } else {
>-                             dateRegexp = new RegExp("^(\\d{2})[" + 
>delim1 + "](\\d{2})[" + delim2 + "](\\d{4})$");
>-                         }
>-                         var matched = dateRegexp.exec(value);
>-                         if(matched != null) {
>-                             if (!isValidDate(matched[1], matched[2], 
>matched[3])) {
>-                                 if (i == 0) {
>-                                     focusField = form[oDate[x][0]];
>-                                 }
>-                                 fields[i++] = oDate[x][1];
>-                                 bValid =  false;
>-                              }
>-                         } else {
>-                             if (i == 0) {
>-                                 focusField = form[oDate[x][0]];
>-                             }
>-                             fields[i++] = oDate[x][1];
>-                             bValid =  false;
>-                         }
>-                     } else if ((orderMonth > orderYear && orderMonth < 
>orderDay)) {
>-                         var iDelim1 = orderYear + YEAR.length;
>-                         var iDelim2 = orderMonth + MONTH.length;
>-                         var delim1 = datePattern.substring(iDelim1, 
>iDelim1 + 1);
>-                         var delim2 = datePattern.substring(iDelim2, 
>iDelim2 + 1);
>-                         if (iDelim1 == orderMonth && iDelim2 == orderDay) {
>-                             dateRegexp = new 
>RegExp("^(\\d{4})(\\d{2})(\\d{2})$");
>-                         } else if (iDelim1 == orderMonth) {
>-                             dateRegexp = new RegExp("^(\\d{4})(\\d{2})[" 
>+ delim2 + "](\\d{2})$");
>-                         } else if (iDelim2 == orderDay) {
>-                             dateRegexp = new RegExp("^(\\d{4})[" + 
>delim1 + "](\\d{2})(\\d{2})$");
>-                         } else {
>-                             dateRegexp = new RegExp("^(\\d{4})[" + 
>delim1 + "](\\d{2})[" + delim2 + "](\\d{2})$");
>-                         }
>-                         var matched = dateRegexp.exec(value);
>-                         if(matched != null) {
>-                             if (!isValidDate(matched[3], matched[2], 
>matched[1])) {
>-                                 if (i == 0) {
>-                                     focusField = form[oDate[x][0]];
>-                                  }
>-                                  fields[i++] = oDate[x][1];
>-                                  bValid =  false;
>-                              }
>-                          } else {
>-                              if (i == 0) {
>-                                  focusField = form[oDate[x][0]];
>-                              }
>-                              fields[i++] = oDate[x][1];
>-                              bValid =  false;
>-                          }
>-                     } else {
>-                         if (i == 0) {
>-                             focusField = form[oDate[x][0]];
>-                         }
>-                         fields[i++] = oDate[x][1];
>-                         bValid =  false;
>-                     }
>-                  }
>-               }
>-               if (fields.length > 0) {
>-                  focusField.focus();
>-                  alert(fields.join('\n'));
>-               }
>-               return bValid;
>-            }
>-
>-           function isValidDate(day, month, year) {
>-               if (month < 1 || month > 12) {
>-                    return false;
>-                }
>-                if (day < 1 || day > 31) {
>-                    return false;
>-                }
>-                if ((month == 4 || month == 6 || month == 9 || month == 
>11) &&
>-                    (day == 31)) {
>-                    return false;
>-                }
>-                if (month == 2) {
>-                    var leap = (year % 4 == 0 &&
>-                               (year % 100 != 0 || year % 400 == 0));
>-                    if (day>29 || (day == 29 && !leap)) {
>-                        return false;
>-                    }
>-                }
>-                return true;
>-            }]]>
>-         </javascript>
>-
>-      </validator>
>-
>-<!-- range is deprecated use intRange instead -->
>-      <validator name="range"
>-            classname="org.apache.struts.validator.FieldChecks"
>-               method="validateIntRange"
>-         methodParams="java.lang.Object,
>-                       org.apache.commons.validator.ValidatorAction,
>-                       org.apache.commons.validator.Field,
>-                       org.apache.struts.action.ActionErrors,
>-                       javax.servlet.http.HttpServletRequest"
>-              depends="integer"
>-                  msg="errors.range">
>-
>-         <javascript><![CDATA[
>-            function validateRange(form) {
>-                return validateIntRange(form);
>-            }]]>
>-         </javascript>
>-
>-      </validator>
>-
>-      <validator name="intRange"
>-            classname="org.apache.struts.validator.FieldChecks"
>-               method="validateIntRange"
>-         methodParams="java.lang.Object,
>-                       org.apache.commons.validator.ValidatorAction,
>-                       org.apache.commons.validator.Field,
>-                       org.apache.struts.action.ActionErrors,
>-                       javax.servlet.http.HttpServletRequest"
>-              depends="integer"
>-                  msg="errors.range">
>-
>-         <javascript><![CDATA[
>-            function validateIntRange(form) {
>-                var isValid = true;
>-                var focusField = null;
>-                var i = 0;
>-                var fields = new Array();
>-                oRange = new intRange();
>-                for (x in oRange) {
>-                    var field = form[oRange[x][0]];
>-
>-                    if ((field.type == 'text' ||
>-                         field.type == 'textarea') &&
>-                        (field.value.length > 0)) {
>-
>-                        var iMin = parseInt(oRange[x][2]("min"));
>-                        var iMax = parseInt(oRange[x][2]("max"));
>-                        var iValue = parseInt(field.value);
>-                        if (!(iValue >= iMin && iValue <= iMax)) {
>-                            if (i == 0) {
>-                                focusField = field;
>-                            }
>-                            fields[i++] = oRange[x][1];
>-                            isValid = false;
>-                        }
>-                    }
>-                }
>-                if (fields.length > 0) {
>-                    focusField.focus();
>-                    alert(fields.join('\n'));
>-                }
>-                return isValid;
>-            }]]>
>-         </javascript>
>-
>-      </validator>
>-
>-      <validator name="floatRange"
>-            classname="org.apache.struts.validator.FieldChecks"
>-               method="validateFloatRange"
>-         methodParams="java.lang.Object,
>-                       org.apache.commons.validator.ValidatorAction,
>-                       org.apache.commons.validator.Field,
>-                       org.apache.struts.action.ActionErrors,
>-                       javax.servlet.http.HttpServletRequest"
>-              depends="float"
>-                  msg="errors.range">
>-
>-         <javascript><![CDATA[
>-            function validateFloatRange(form) {
>-                var isValid = true;
>-                var focusField = null;
>-                var i = 0;
>-                var fields = new Array();
>-                oRange = new floatRange();
>-                for (x in oRange) {
>-                    var field = form[oRange[x][0]];
>-
>-                    if ((field.type == 'text' ||
>-                         field.type == 'textarea') &&
>-                        (field.value.length > 0)) {
>-
>-                        var fMin = parseFloat(oRange[x][2]("min"));
>-                        var fMax = parseFloat(oRange[x][2]("max"));
>-                        var fValue = parseFloat(field.value);
>-                        if (!(fValue >= fMin && fValue <= fMax)) {
>-                            if (i == 0) {
>-                                focusField = field;
>-                            }
>-                            fields[i++] = oRange[x][1];
>-                            isValid = false;
>-                        }
>-                    }
>-                }
>-                if (fields.length > 0) {
>-                    focusField.focus();
>-                    alert(fields.join('\n'));
>-                }
>-                return isValid;
>-            }]]>
>-         </javascript>
>-
>-      </validator>
>-
>-      <validator name="creditCard"
>-            classname="org.apache.struts.validator.FieldChecks"
>-               method="validateCreditCard"
>-         methodParams="java.lang.Object,
>-                       org.apache.commons.validator.ValidatorAction,
>-                       org.apache.commons.validator.Field,
>-                       org.apache.struts.action.ActionErrors,
>-                       javax.servlet.http.HttpServletRequest"
>-              depends=""
>-                  msg="errors.creditcard">
>-
>-         <javascript><![CDATA[
>-            function validateCreditCard(form) {
>-                var bValid = true;
>-                var focusField = null;
>-                var i = 0;
>-                var fields = new Array();
>-                oCreditCard = new creditCard();
>-                for (x in oCreditCard) {
>-                    if ((form[oCreditCard[x][0]].type == 'text' ||
>-                         form[oCreditCard[x][0]].type == 'textarea') &&
>-                        (form[oCreditCard[x][0]].value.length > 0)) {
>-                        if (!luhnCheck(form[oCreditCard[x][0]].value)) {
>-                            if (i == 0) {
>-                                focusField = form[oCreditCard[x][0]];
>-                            }
>-                            fields[i++] = oCreditCard[x][1];
>-                            bValid = false;
>-                        }
>-                    }
>-                }
>-                if (fields.length > 0) {
>-                    focusField.focus();
>-                    alert(fields.join('\n'));
>-                }
>-                return bValid;
>-            }
>-
>-            /**
>-             * Reference: http://www.ling.nwu.edu/~sburke/pub/luhn_lib.pl
>-             */
>-            function luhnCheck(cardNumber) {
>-                if (isLuhnNum(cardNumber)) {
>-                    var no_digit = cardNumber.length;
>-                    var oddoeven = no_digit & 1;
>-                    var sum = 0;
>-                    for (var count = 0; count < no_digit; count++) {
>-                        var digit = parseInt(cardNumber.charAt(count));
>-                        if (!((count & 1) ^ oddoeven)) {
>-                            digit *= 2;
>-                            if (digit > 9) digit -= 9;
>-                        };
>-                        sum += digit;
>-                    };
>-                    if (sum == 0) return false;
>-                    if (sum % 10 == 0) return true;
>-                };
>-                return false;
>-            }
>-
>-            function isLuhnNum(argvalue) {
>-                argvalue = argvalue.toString();
>-                if (argvalue.length == 0) {
>-                    return false;
>-                }
>-                for (var n = 0; n < argvalue.length; n++) {
>-                    if ((argvalue.substring(n, n+1) < "0") ||
>-                        (argvalue.substring(n,n+1) > "9")) {
>-                        return false;
>-                    }
>-                }
>-                return true;
>-            }]]>
>-         </javascript>
>-
>-      </validator>
>-
>-
>-      <validator name="email"
>-            classname="org.apache.struts.validator.FieldChecks"
>-               method="validateEmail"
>-         methodParams="java.lang.Object,
>-                       org.apache.commons.validator.ValidatorAction,
>-                       org.apache.commons.validator.Field,
>-                       org.apache.struts.action.ActionErrors,
>-                       javax.servlet.http.HttpServletRequest"
>-              depends=""
>-                  msg="errors.email">
>-
>-         <javascript><![CDATA[
>-            function validateEmail(form) {
>-                var bValid = true;
>-                var focusField = null;
>-                var i = 0;
>-                var fields = new Array();
>-                oEmail = new email();
>-                for (x in oEmail) {
>-                    if ((form[oEmail[x][0]].type == 'text' ||
>-                         form[oEmail[x][0]].type == 'textarea') &&
>-                        (form[oEmail[x][0]].value.length > 0)) {
>-                        if (!checkEmail(form[oEmail[x][0]].value)) {
>-                            if (i == 0) {
>-                                focusField = form[oEmail[x][0]];
>-                            }
>-                            fields[i++] = oEmail[x][1];
>-                            bValid = false;
>-                        }
>-                    }
>-                }
>-                if (fields.length > 0) {
>-                    focusField.focus();
>-                    alert(fields.join('\n'));
>-                }
>-                return bValid;
>-            }
>-
>-            /**
>-             * Reference: Sandeep V. Tamhankar (stamhankar@hotmail.com),
>-             * http://javascript.internet.com
>-             */
>-            function checkEmail(emailStr) {
>-               if (emailStr.length == 0) {
>-                   return true;
>-               }
>-               var emailPat=/^(.+)@(.+)$/;
>-               var specialChars="\\(\\)<>@,;:\\\\\\\"\\.\\[\\]";
>-               var validChars="\[^\\s" + specialChars + "\]";
>-               var quotedUser="(\"[^\"]*\")";
>-               var 
>ipDomainPat=/^(\d{1,3})[.](\d{1,3})[.](\d{1,3})[.](\d{1,3})$/;
>-               var atom=validChars + '+';
>-               var word="(" + atom + "|" + quotedUser + ")";
>-               var userPat=new RegExp("^" + word + "(\\." + word + ")*$");
>-               var domainPat=new RegExp("^" + atom + "(\\." + atom + ")*$");
>-               var matchArray=emailStr.match(emailPat);
>-               if (matchArray == null) {
>-                   return false;
>-               }
>-               var user=matchArray[1];
>-               var domain=matchArray[2];
>-               if (user.match(userPat) == null) {
>-                   return false;
>-               }
>-               var IPArray = domain.match(ipDomainPat);
>-               if (IPArray != null) {
>-                   for (var i = 1; i <= 4; i++) {
>-                      if (IPArray[i] > 255) {
>-                         return false;
>-                      }
>-                   }
>-                   return true;
>-               }
>-               var domainArray=domain.match(domainPat);
>-               if (domainArray == null) {
>-                   return false;
>-               }
>-               var atomPat=new RegExp(atom,"g");
>-               var domArr=domain.match(atomPat);
>-               var len=domArr.length;
>-               if ((domArr[domArr.length-1].length < 2) ||
>-                   (domArr[domArr.length-1].length > 3)) {
>-                   return false;
>-               }
>-               if (len < 2) {
>-                   return false;
>-               }
>-               return true;
>-            }]]>
>-         </javascript>
>-
>-      </validator>
>-
>-   </global>
>-
>-</form-validation>
>Index: 
>netui/src/pageflow/org/apache/beehive/netui/pageflow/internal/AnyBeanActionForm.java
>===================================================================
>--- 
>netui/src/pageflow/org/apache/beehive/netui/pageflow/internal/AnyBeanActionForm.java 
>(revision 43672)
>+++ 
>netui/src/pageflow/org/apache/beehive/netui/pageflow/internal/AnyBeanActionForm.java 
>(working copy)
>@@ -87,7 +87,7 @@
>          assert _bean != null;
>          assert mapping instanceof PageFlowActionMapping : 
> mapping.getClass().getName();
>
>-        String beanClassName = ( ( PageFlowActionMapping ) mapping 
>).getFormClass();
>+        String beanClassName = ( ( PageFlowActionMapping ) mapping 
>).getAttribute();
>          ActionErrors errors = validateBean( _bean, beanClassName, 
> mapping, request );
>
>          if ( _bean instanceof Validatable )
>Index: 
>netui/src/compiler/org/apache/beehive/netui/compiler/genmodel/GenStrutsApp.java
>===================================================================
>--- 
>netui/src/compiler/org/apache/beehive/netui/compiler/genmodel/GenStrutsApp.java 
>(revision 43672)
>+++ 
>netui/src/compiler/org/apache/beehive/netui/compiler/genmodel/GenStrutsApp.java 
>(working copy)
>@@ -134,10 +134,17 @@
>          String formClass = CompilerUtils.getFormClassName( formType, _env );
>
>          //
>+        // Use the actual type of form to create the name.
>+        // This avoids conflicts if there are multiple forms using the
>+        // ANY_FORM_CLASS_NAME type.
>+        //
>+        String actualType = CompilerUtils.getLoadableName( formType );
>+
>+        //
>          // See if the app already has a form-bean of this type.  If so,
>          // we'll just use it; otherwise, we need to create it.
>          //
>-        FormBeanModel existingBean = getFormBeanByType( formClass );
>+        FormBeanModel existingBean = getFormBeanByActualType( actualType );
>          String formBeanName;
>
>          if ( existingBean != null )
>@@ -146,8 +153,8 @@
>          }
>          else
>          {
>-            formBeanName = getFormNameForType( formClass );
>-            addFormBean( new FormBeanModel( formBeanName, formClass, this 
>) );
>+            formBeanName = getFormNameForType( actualType );
>+            addFormBean( new FormBeanModel( formBeanName, formClass, 
>actualType, this ) );
>              getMessageResourcesFromForm( formType, usedByAction );
>          }
>
>Index: 
>netui/src/compiler/org/apache/beehive/netui/compiler/genmodel/GenValidationModel.java
>===================================================================
>--- 
>netui/src/compiler/org/apache/beehive/netui/compiler/genmodel/GenValidationModel.java 
>(revision 43672)
>+++ 
>netui/src/compiler/org/apache/beehive/netui/compiler/genmodel/GenValidationModel.java 
>(working copy)
>@@ -185,28 +185,18 @@
>
>      private String getFormBeanName( TypeDeclaration beanType )
>      {
>-        String beanClassName = CompilerUtils.getLoadableName( beanType );
>-        boolean isActionFormDerived =
>-                CompilerUtils.isAssignableFrom( FORM_CLASS_NAME, 
>beanType, _strutsApp.getEnv() );
>-
>-        if ( isActionFormDerived )
>+        String actualType = CompilerUtils.getLoadableName( beanType );
>+        FormBeanModel formBean = _strutsApp.getFormBeanByActualType( 
>actualType );
>+
>+        if ( formBean == null )
>          {
>-            FormBeanModel formBean = _strutsApp.getFormBeanByType( 
>beanClassName );
>-
>-            if ( formBean == null )
>-            {
>-                String formName = _strutsApp.getFormNameForType( 
>beanClassName );
>-                formBean = new FormBeanModel( formName, beanClassName, 
>_strutsApp );
>-                _strutsApp.addFormBean( formBean );
>-                return formName;
>-            }
>-
>-            return formBean.getName();
>+            String beanClassName = CompilerUtils.getFormClassName( 
>beanType, _strutsApp.getEnv() );
>+            String formName = _strutsApp.getFormNameForType( actualType );
>+            formBean = new FormBeanModel( formName, beanClassName, 
>actualType, _strutsApp );
>+            _strutsApp.addFormBean( formBean );
>          }
>-        else
>-        {
>-            return beanClassName;
>-        }
>+
>+        return formBean.getName();
>      }
>
>      private void addRulesFromClass( ClassDeclaration jclass )
>Index: 
>netui/src/compiler/org/apache/beehive/netui/compiler/model/StrutsApp.java
>===================================================================
>--- 
>netui/src/compiler/org/apache/beehive/netui/compiler/model/StrutsApp.java 
>  (revision 43672)
>+++ 
>netui/src/compiler/org/apache/beehive/netui/compiler/model/StrutsApp.java 
>  (working copy)
>@@ -242,12 +242,12 @@
>          return ( FormBeanModel ) _formBeans.get( formBeanName );
>      }
>
>-    public FormBeanModel getFormBeanByType( String typeName )
>+    public FormBeanModel getFormBeanByActualType( String actualTypeName )
>      {
>          for ( Iterator i = _formBeans.values().iterator(); i.hasNext(); )
>          {
>              FormBeanModel formBean = ( FormBeanModel ) i.next();
>-            if ( formBean != null && formBean.getType().equals( typeName ) )
>+            if ( formBean != null && formBean.getActualType().equals( 
>actualTypeName ) )
>              {
>                  return formBean;
>              }
>Index: 
>netui/src/compiler/org/apache/beehive/netui/compiler/model/FormBeanModel.java
>===================================================================
>--- 
>netui/src/compiler/org/apache/beehive/netui/compiler/model/FormBeanModel.java 
>(revision 43672)
>+++ 
>netui/src/compiler/org/apache/beehive/netui/compiler/model/FormBeanModel.java 
>(working copy)
>@@ -91,14 +91,16 @@
>      private boolean _dynamic = false;
>      private String _name = null;  // required to be set
>      private String _type = null;  // required to be set
>+    private String _actualType = null;  // required to be set
>
>      private ArrayList _properties = new ArrayList();
>
>-    public FormBeanModel( String name, String type, StrutsApp parent )
>+    public FormBeanModel( String name, String type, String actualType, 
>StrutsApp parent )
>      {
>          super( parent );
>          this._name = name;
>          this._type = type;
>+        this._actualType = actualType;
>      }
>
>      public void writeToXMLBean( FormBeanDocument.FormBean xb )
>@@ -182,6 +184,16 @@
>          this._type = type;
>      }
>
>+    public String getActualType()
>+    {
>+        return _actualType;
>+    }
>+
>+    public void setActualType(String actualType)
>+    {
>+        _actualType = actualType;
>+    }
>+
>      public void addProperty( String name, String type, boolean required, 
> boolean multival )
>      {
>          _properties.add( new Property( name, type, required, multival ) );


Mime
View raw message