Just submitted both of these. Thanks for the fixes -- this definitely helps our validation/localization story.

Rich

Carlin Rogers wrote:

I've updated the patch file I sent out earlier today. The tests
that I've included nolonger display in the page the current locale
of the client to avoid diffs when running the tests from
different locales.

Thanks,
Carlin

Carlin Rogers wrote:

Hi All,

I have another checkin request for Page Flow. The following patch
file (output from "svn diff") contains a couple minor fixes for the
declarative validation support. It also contains the changes to
PageFlowRequestProcessor.processMapping() given in a previous patch
but not yet submitted. Can just use this patch. Thanks!

Fixes:
- Trim blank spaces from the lang, country, and variant value of
the Jpf.ValidationLocaleRules annotation so that blank spaces are
not written to the validator rules XML.
- Add support for locale variant in the Jpf.ValidationLocaleRules
annotation and creation of the validation rules XML file.
- Minor refactoring to update a couple of method signatures that
had arguments not being used.
- Modified code to support our RequestProcessor override method
PageFlowRequestProcessor.processMapping(). Now if there is no
Global.app for shared flow and a page has an unresolved action
we will produce the correct action not found error message.

CR: Rich
DRT/BVT: NetUI (WinXP)
BB: self (WinXP)

Thanks,
Carlin


------------------------------------------------------------------------

Index: netui/test/webapps/drt/testRecorder/tests/VariantValidation.xml
===================================================================
--- netui/test/webapps/drt/testRecorder/tests/VariantValidation.xml (revision 0)
+++ netui/test/webapps/drt/testRecorder/tests/VariantValidation.xml (revision 0)
@@ -0,0 +1,704 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ses:recorderSession xmlns:ses="http://beehive.apache.org/netui/tools/testrecorder/2004/session";>
+ <ses:sessionName>VariantValidation</ses:sessionName>
+ <ses:tester>crogers</ses:tester>
+ <ses:startDate>27 Sep 2004, 11:13:25.277 AM MDT</ses:startDate>
+ <ses:description>Test support of locale variant in the validation locale rules and creation of the validation rules XML file.</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/variantValidation/Controller.jpf</ses:uri>
+ <ses:method>GET</ses:method>
+ <ses:parameters/>
+ <ses:cookies>
+ <ses:cookie>
+ <ses:name>JSESSIONID</ses:name>
+ <ses:value>1692B4C854F7C4A468057FFA4B708ADC</ses:value>
+ </ses:cookie>
+ </ses:cookies>
+ <ses:headers>
+ <ses:header>
+ <ses:name>accept</ses:name>
+ <ses:value>image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */*</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,fr-ca;q=0.91,fr;q=0.82,en-scouse;q=0.73,fr-FR-MAC;q=0.64,es;q=0.55,en-ca;q=0.45,en-US-MAC;q=0.36,x-pig-latin;q=0.27,sgn-US-MA;q=0.18,i-klingon;q=0.09</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=1692B4C854F7C4A468057FFA4B708ADC</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>host</ses:name>
+ <ses:value>localhost:8080</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>user-agent</ses:name>
+ <ses:value>Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322)</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/variantValidation/index.jsp";>
+ </head>
+ <body>
+ <h3>Declarative Validation Test</h3>
+
+ <a href="/coreWeb/miniTests/variantValidation/saveLocale.do">Save current locale</a>
+ <br/>
+ <a href="/coreWeb/miniTests/variantValidation/changeLocale1.do">Change to French locale &quot;fr_CA&quot;</a>
+ <br/>
+ <a href="/coreWeb/miniTests/variantValidation/changeLocale2.do">Change locale to &quot;fr_CA_MAC&quot;</a>
+ <br/>
+ <a href="/coreWeb/miniTests/variantValidation/resetLocale.do">Reset locale</a>
+
+ <form name="validateForm" action="/coreWeb/miniTests/variantValidation/validate.do" method="post">
+ <table>
+ <tr valign="top">
+ <td>item:</td>
+ <td>
+ <input type="text" name="{actionForm.item}">
+ </td>
+ <td>
+ + </td>
+ </tr>
+ </table>
+ <br>
+ &nbsp;
+ <input type="submit" name="actionOverride:validate" value="Click">
+ </form>
+ <hr>
+ + </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/variantValidation/saveLocale.do</ses:uri>
+ <ses:method>GET</ses:method>
+ <ses:parameters/>
+ <ses:cookies>
+ <ses:cookie>
+ <ses:name>JSESSIONID</ses:name>
+ <ses:value>1692B4C854F7C4A468057FFA4B708ADC</ses:value>
+ </ses:cookie>
+ </ses:cookies>
+ <ses:headers>
+ <ses:header>
+ <ses:name>accept</ses:name>
+ <ses:value>image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */*</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,fr-ca;q=0.91,fr;q=0.82,en-scouse;q=0.73,fr-FR-MAC;q=0.64,es;q=0.55,en-ca;q=0.45,en-US-MAC;q=0.36,x-pig-latin;q=0.27,sgn-US-MA;q=0.18,i-klingon;q=0.09</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=1692B4C854F7C4A468057FFA4B708ADC</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>host</ses:name>
+ <ses:value>localhost:8080</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>referer</ses:name>
+ <ses:value>http://localhost:8080/coreWeb/miniTests/variantValidation/Controller.jpf</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>user-agent</ses:name>
+ <ses:value>Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322)</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/variantValidation/index.jsp";>
+ </head>
+ <body>
+ <h3>Declarative Validation Test</h3>
+
+ <a href="/coreWeb/miniTests/variantValidation/saveLocale.do">Save current locale</a>
+ <br/>
+ <a href="/coreWeb/miniTests/variantValidation/changeLocale1.do">Change to French locale &quot;fr_CA&quot;</a>
+ <br/>
+ <a href="/coreWeb/miniTests/variantValidation/changeLocale2.do">Change locale to &quot;fr_CA_MAC&quot;</a>
+ <br/>
+ <a href="/coreWeb/miniTests/variantValidation/resetLocale.do">Reset locale</a>
+
+ <form name="validateForm" action="/coreWeb/miniTests/variantValidation/validate.do" method="post">
+ <table>
+ <tr valign="top">
+ <td>item:</td>
+ <td>
+ <input type="text" name="{actionForm.item}">
+ </td>
+ <td>
+ + </td>
+ </tr>
+ </table>
+ <br>
+ &nbsp;
+ <input type="submit" name="actionOverride:validate" value="Click">
+ </form>
+ <hr>
+ + </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/variantValidation/changeLocale1.do</ses:uri>
+ <ses:method>GET</ses:method>
+ <ses:parameters/>
+ <ses:cookies>
+ <ses:cookie>
+ <ses:name>JSESSIONID</ses:name>
+ <ses:value>1692B4C854F7C4A468057FFA4B708ADC</ses:value>
+ </ses:cookie>
+ </ses:cookies>
+ <ses:headers>
+ <ses:header>
+ <ses:name>accept</ses:name>
+ <ses:value>image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */*</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,fr-ca;q=0.91,fr;q=0.82,en-scouse;q=0.73,fr-FR-MAC;q=0.64,es;q=0.55,en-ca;q=0.45,en-US-MAC;q=0.36,x-pig-latin;q=0.27,sgn-US-MA;q=0.18,i-klingon;q=0.09</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=1692B4C854F7C4A468057FFA4B708ADC</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>host</ses:name>
+ <ses:value>localhost:8080</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>referer</ses:name>
+ <ses:value>http://localhost:8080/coreWeb/miniTests/variantValidation/saveLocale.do</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>user-agent</ses:name>
+ <ses:value>Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322)</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="fr">
+<head>
+ <base href="http://localhost:8080/coreWeb/miniTests/variantValidation/index.jsp";>
+ </head>
+ <body>
+ <h3>Declarative Validation Test</h3>
+
+ <a href="/coreWeb/miniTests/variantValidation/saveLocale.do">Save current locale</a>
+ <br/>
+ <a href="/coreWeb/miniTests/variantValidation/changeLocale1.do">Change to French locale &quot;fr_CA&quot;</a>
+ <br/>
+ <a href="/coreWeb/miniTests/variantValidation/changeLocale2.do">Change locale to &quot;fr_CA_MAC&quot;</a>
+ <br/>
+ <a href="/coreWeb/miniTests/variantValidation/resetLocale.do">Reset locale</a>
+
+ <form name="validateForm" action="/coreWeb/miniTests/variantValidation/validate.do" method="post">
+ <table>
+ <tr valign="top">
+ <td>item:</td>
+ <td>
+ <input type="text" name="{actionForm.item}">
+ </td>
+ <td>
+ + </td>
+ </tr>
+ </table>
+ <br>
+ &nbsp;
+ <input type="submit" name="actionOverride:validate" value="Click">
+ </form>
+ <hr>
+ + </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/variantValidation/validate.do</ses:uri>
+ <ses:method>POST</ses:method>
+ <ses:parameters>
+ <ses:parameter>
+ <ses:name>actionOverride:validate</ses:name>
+ <ses:value>Click</ses:value>
+ </ses:parameter>
+ <ses:parameter>
+ <ses:name>{actionForm.item}</ses:name>
+ <ses:value>123456789012</ses:value>
+ </ses:parameter>
+ </ses:parameters>
+ <ses:cookies>
+ <ses:cookie>
+ <ses:name>JSESSIONID</ses:name>
+ <ses:value>1692B4C854F7C4A468057FFA4B708ADC</ses:value>
+ </ses:cookie>
+ </ses:cookies>
+ <ses:headers>
+ <ses:header>
+ <ses:name>accept</ses:name>
+ <ses:value>image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */*</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,fr-ca;q=0.91,fr;q=0.82,en-scouse;q=0.73,fr-FR-MAC;q=0.64,es;q=0.55,en-ca;q=0.45,en-US-MAC;q=0.36,x-pig-latin;q=0.27,sgn-US-MA;q=0.18,i-klingon;q=0.09</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>cache-control</ses:name>
+ <ses:value>no-cache</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>66</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=1692B4C854F7C4A468057FFA4B708ADC</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>host</ses:name>
+ <ses:value>localhost:8080</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>referer</ses:name>
+ <ses:value>http://localhost:8080/coreWeb/miniTests/variantValidation/changeLocale1.do</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>user-agent</ses:name>
+ <ses:value>Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322)</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="fr">
+<head>
+ <base href="http://localhost:8080/coreWeb/miniTests/variantValidation/index.jsp";>
+ </head>
+ <body>
+ <h3>Declarative Validation Test</h3>
+
+ <a href="/coreWeb/miniTests/variantValidation/saveLocale.do">Save current locale</a>
+ <br/>
+ <a href="/coreWeb/miniTests/variantValidation/changeLocale1.do">Change to French locale &quot;fr_CA&quot;</a>
+ <br/>
+ <a href="/coreWeb/miniTests/variantValidation/changeLocale2.do">Change locale to &quot;fr_CA_MAC&quot;</a>
+ <br/>
+ <a href="/coreWeb/miniTests/variantValidation/resetLocale.do">Reset locale</a>
+
+ <form name="validateForm" action="/coreWeb/miniTests/variantValidation/validate.do" method="post">
+ <table>
+ <tr valign="top">
+ <td>item:</td>
+ <td>
+ <input type="text" name="{actionForm.item}" value="123456789012">
+ </td>
+ <td>
+ maximum length is 10 characters - All locale
+
+ </td>
+ </tr>
+ </table>
+ <br>
+ &nbsp;
+ <input type="submit" name="actionOverride:validate" value="Click">
+ </form>
+ <hr>
+ maximum length is 10 characters - All locale
+
+ </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/variantValidation/changeLocale2.do</ses:uri>
+ <ses:method>GET</ses:method>
+ <ses:parameters/>
+ <ses:cookies>
+ <ses:cookie>
+ <ses:name>JSESSIONID</ses:name>
+ <ses:value>1692B4C854F7C4A468057FFA4B708ADC</ses:value>
+ </ses:cookie>
+ </ses:cookies>
+ <ses:headers>
+ <ses:header>
+ <ses:name>accept</ses:name>
+ <ses:value>image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */*</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,fr-ca;q=0.91,fr;q=0.82,en-scouse;q=0.73,fr-FR-MAC;q=0.64,es;q=0.55,en-ca;q=0.45,en-US-MAC;q=0.36,x-pig-latin;q=0.27,sgn-US-MA;q=0.18,i-klingon;q=0.09</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=1692B4C854F7C4A468057FFA4B708ADC</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>host</ses:name>
+ <ses:value>localhost:8080</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>referer</ses:name>
+ <ses:value>http://localhost:8080/coreWeb/miniTests/variantValidation/validate.do</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>user-agent</ses:name>
+ <ses:value>Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322)</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="fr">
+<head>
+ <base href="http://localhost:8080/coreWeb/miniTests/variantValidation/index.jsp";>
+ </head>
+ <body>
+ <h3>Declarative Validation Test</h3>
+
+ <a href="/coreWeb/miniTests/variantValidation/saveLocale.do">Save current locale</a>
+ <br/>
+ <a href="/coreWeb/miniTests/variantValidation/changeLocale1.do">Change to French locale &quot;fr_CA&quot;</a>
+ <br/>
+ <a href="/coreWeb/miniTests/variantValidation/changeLocale2.do">Change locale to &quot;fr_CA_MAC&quot;</a>
+ <br/>
+ <a href="/coreWeb/miniTests/variantValidation/resetLocale.do">Reset locale</a>
+
+ <form name="validateForm" action="/coreWeb/miniTests/variantValidation/validate.do" method="post">
+ <table>
+ <tr valign="top">
+ <td>item:</td>
+ <td>
+ <input type="text" name="{actionForm.item}">
+ </td>
+ <td>
+ + </td>
+ </tr>
+ </table>
+ <br>
+ &nbsp;
+ <input type="submit" name="actionOverride:validate" value="Click">
+ </form>
+ <hr>
+ + </body>
+</html>]]></ses:responseBody>
+ </ses:response>
+ </ses:test>
+ <ses:test>
+ <ses:testNumber>6</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/variantValidation/validate.do</ses:uri>
+ <ses:method>POST</ses:method>
+ <ses:parameters>
+ <ses:parameter>
+ <ses:name>actionOverride:validate</ses:name>
+ <ses:value>Click</ses:value>
+ </ses:parameter>
+ <ses:parameter>
+ <ses:name>{actionForm.item}</ses:name>
+ <ses:value>123456789</ses:value>
+ </ses:parameter>
+ </ses:parameters>
+ <ses:cookies>
+ <ses:cookie>
+ <ses:name>JSESSIONID</ses:name>
+ <ses:value>1692B4C854F7C4A468057FFA4B708ADC</ses:value>
+ </ses:cookie>
+ </ses:cookies>
+ <ses:headers>
+ <ses:header>
+ <ses:name>accept</ses:name>
+ <ses:value>image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */*</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,fr-ca;q=0.91,fr;q=0.82,en-scouse;q=0.73,fr-FR-MAC;q=0.64,es;q=0.55,en-ca;q=0.45,en-US-MAC;q=0.36,x-pig-latin;q=0.27,sgn-US-MA;q=0.18,i-klingon;q=0.09</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>cache-control</ses:name>
+ <ses:value>no-cache</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>63</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=1692B4C854F7C4A468057FFA4B708ADC</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>host</ses:name>
+ <ses:value>localhost:8080</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>referer</ses:name>
+ <ses:value>http://localhost:8080/coreWeb/miniTests/variantValidation/changeLocale2.do</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>user-agent</ses:name>
+ <ses:value>Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322)</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="fr">
+<head>
+ <base href="http://localhost:8080/coreWeb/miniTests/variantValidation/index.jsp";>
+ </head>
+ <body>
+ <h3>Declarative Validation Test</h3>
+
+ <a href="/coreWeb/miniTests/variantValidation/saveLocale.do">Save current locale</a>
+ <br/>
+ <a href="/coreWeb/miniTests/variantValidation/changeLocale1.do">Change to French locale &quot;fr_CA&quot;</a>
+ <br/>
+ <a href="/coreWeb/miniTests/variantValidation/changeLocale2.do">Change locale to &quot;fr_CA_MAC&quot;</a>
+ <br/>
+ <a href="/coreWeb/miniTests/variantValidation/resetLocale.do">Reset locale</a>
+
+ <form name="validateForm" action="/coreWeb/miniTests/variantValidation/validate.do" method="post">
+ <table>
+ <tr valign="top">
+ <td>item:</td>
+ <td>
+ <input type="text" name="{actionForm.item}" value="123456789">
+ </td>
+ <td>
+ maximum length is 8 characters - fr_CA_MAC locale
+
+ </td>
+ </tr>
+ </table>
+ <br>
+ &nbsp;
+ <input type="submit" name="actionOverride:validate" value="Click">
+ </form>
+ <hr>
+ maximum length is 8 characters - fr_CA_MAC locale
+
+ </body>
+</html>]]></ses:responseBody>
+ </ses:response>
+ </ses:test>
+ <ses:test>
+ <ses:testNumber>7</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/variantValidation/resetLocale.do</ses:uri>
+ <ses:method>GET</ses:method>
+ <ses:parameters/>
+ <ses:cookies>
+ <ses:cookie>
+ <ses:name>JSESSIONID</ses:name>
+ <ses:value>1692B4C854F7C4A468057FFA4B708ADC</ses:value>
+ </ses:cookie>
+ </ses:cookies>
+ <ses:headers>
+ <ses:header>
+ <ses:name>accept</ses:name>
+ <ses:value>image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */*</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,fr-ca;q=0.91,fr;q=0.82,en-scouse;q=0.73,fr-FR-MAC;q=0.64,es;q=0.55,en-ca;q=0.45,en-US-MAC;q=0.36,x-pig-latin;q=0.27,sgn-US-MA;q=0.18,i-klingon;q=0.09</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=1692B4C854F7C4A468057FFA4B708ADC</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>host</ses:name>
+ <ses:value>localhost:8080</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>referer</ses:name>
+ <ses:value>http://localhost:8080/coreWeb/miniTests/variantValidation/validate.do</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>user-agent</ses:name>
+ <ses:value>Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322)</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/variantValidation/index.jsp";>
+ </head>
+ <body>
+ <h3>Declarative Validation Test</h3>
+
+ <a href="/coreWeb/miniTests/variantValidation/saveLocale.do">Save current locale</a>
+ <br/>
+ <a href="/coreWeb/miniTests/variantValidation/changeLocale1.do">Change to French locale &quot;fr_CA&quot;</a>
+ <br/>
+ <a href="/coreWeb/miniTests/variantValidation/changeLocale2.do">Change locale to &quot;fr_CA_MAC&quot;</a>
+ <br/>
+ <a href="/coreWeb/miniTests/variantValidation/resetLocale.do">Reset locale</a>
+
+ <form name="validateForm" action="/coreWeb/miniTests/variantValidation/validate.do" method="post">
+ <table>
+ <tr valign="top">
+ <td>item:</td>
+ <td>
+ <input type="text" name="{actionForm.item}">
+ </td>
+ <td>
+ + </td>
+ </tr>
+ </table>
+ <br>
+ &nbsp;
+ <input type="submit" name="actionOverride:validate" value="Click">
+ </form>
+ <hr>
+ + </body>
+</html>]]></ses:responseBody>
+ </ses:response>
+ </ses:test>
+ </ses:tests>
+ <ses:endDate>27 Sep 2004, 11:14:41.198 AM MDT</ses:endDate>
+ <ses:testCount>7</ses:testCount>
+</ses:recorderSession>


Property changes on: 
netui/test/webapps/drt/testRecorder/tests/VariantValidation.xml
___________________________________________________________________
Name: svn:eol-style
  + native

Index: netui/test/webapps/drt/testRecorder/tests/BlankCountryValue.xml
===================================================================
--- netui/test/webapps/drt/testRecorder/tests/BlankCountryValue.xml (revision 0)
+++ netui/test/webapps/drt/testRecorder/tests/BlankCountryValue.xml (revision 0)
@@ -0,0 +1,599 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ses:recorderSession xmlns:ses="http://beehive.apache.org/netui/tools/testrecorder/2004/session";>
+ <ses:sessionName>BlankCountryValue</ses:sessionName>
+ <ses:tester>crogers</ses:tester>
+ <ses:startDate>27 Sep 2004, 11:15:30.880 AM MDT</ses:startDate>
+ <ses:description>Ensure that a validation locale rule annotation with country value equal to blank space charactes does not create a formset with country attribute of spaces.</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/blankCountryValue/Controller.jpf</ses:uri>
+ <ses:method>GET</ses:method>
+ <ses:parameters/>
+ <ses:cookies>
+ <ses:cookie>
+ <ses:name>JSESSIONID</ses:name>
+ <ses:value>1692B4C854F7C4A468057FFA4B708ADC</ses:value>
+ </ses:cookie>
+ </ses:cookies>
+ <ses:headers>
+ <ses:header>
+ <ses:name>accept</ses:name>
+ <ses:value>image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */*</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,fr-ca;q=0.91,fr;q=0.82,en-scouse;q=0.73,fr-FR-MAC;q=0.64,es;q=0.55,en-ca;q=0.45,en-US-MAC;q=0.36,x-pig-latin;q=0.27,sgn-US-MA;q=0.18,i-klingon;q=0.09</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=1692B4C854F7C4A468057FFA4B708ADC</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>host</ses:name>
+ <ses:value>localhost:8080</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>user-agent</ses:name>
+ <ses:value>Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322)</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/blankCountryValue/index.jsp";>
+ </head>
+ <body>
+ <h3>Declarative Validation Test</h3>
+
+ <a href="/coreWeb/miniTests/blankCountryValue/saveLocale.do">Save current locale</a>
+ <br/>
+ <a href="/coreWeb/miniTests/blankCountryValue/changeLocale.do">Change to French locale &quot;fr&quot;</a>
+ <br/>
+ <a href="/coreWeb/miniTests/blankCountryValue/resetLocale.do">Reset locale</a>
+
+ <form name="validateForm" action="/coreWeb/miniTests/blankCountryValue/validate.do" method="post">
+ <table>
+ <tr valign="top">
+ <td>item:</td>
+ <td>
+ <input type="text" name="{actionForm.item}">
+ </td>
+ <td>
+ + </td>
+ </tr>
+ </table>
+ <br/>
+ &nbsp;
+ <input type="submit" name="actionOverride:validate" value="Click">
+ </form>
+ <hr>
+ + </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/blankCountryValue/saveLocale.do</ses:uri>
+ <ses:method>GET</ses:method>
+ <ses:parameters/>
+ <ses:cookies>
+ <ses:cookie>
+ <ses:name>JSESSIONID</ses:name>
+ <ses:value>1692B4C854F7C4A468057FFA4B708ADC</ses:value>
+ </ses:cookie>
+ </ses:cookies>
+ <ses:headers>
+ <ses:header>
+ <ses:name>accept</ses:name>
+ <ses:value>image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */*</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,fr-ca;q=0.91,fr;q=0.82,en-scouse;q=0.73,fr-FR-MAC;q=0.64,es;q=0.55,en-ca;q=0.45,en-US-MAC;q=0.36,x-pig-latin;q=0.27,sgn-US-MA;q=0.18,i-klingon;q=0.09</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=1692B4C854F7C4A468057FFA4B708ADC</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>host</ses:name>
+ <ses:value>localhost:8080</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>referer</ses:name>
+ <ses:value>http://localhost:8080/coreWeb/miniTests/blankCountryValue/Controller.jpf</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>user-agent</ses:name>
+ <ses:value>Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322)</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/blankCountryValue/index.jsp";>
+ </head>
+ <body>
+ <h3>Declarative Validation Test</h3>
+
+ <a href="/coreWeb/miniTests/blankCountryValue/saveLocale.do">Save current locale</a>
+ <br/>
+ <a href="/coreWeb/miniTests/blankCountryValue/changeLocale.do">Change to French locale &quot;fr&quot;</a>
+ <br/>
+ <a href="/coreWeb/miniTests/blankCountryValue/resetLocale.do">Reset locale</a>
+
+ <form name="validateForm" action="/coreWeb/miniTests/blankCountryValue/validate.do" method="post">
+ <table>
+ <tr valign="top">
+ <td>item:</td>
+ <td>
+ <input type="text" name="{actionForm.item}">
+ </td>
+ <td>
+ + </td>
+ </tr>
+ </table>
+ <br/>
+ &nbsp;
+ <input type="submit" name="actionOverride:validate" value="Click">
+ </form>
+ <hr>
+ + </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/blankCountryValue/validate.do</ses:uri>
+ <ses:method>POST</ses:method>
+ <ses:parameters>
+ <ses:parameter>
+ <ses:name>actionOverride:validate</ses:name>
+ <ses:value>Click</ses:value>
+ </ses:parameter>
+ <ses:parameter>
+ <ses:name>{actionForm.item}</ses:name>
+ <ses:value>1</ses:value>
+ </ses:parameter>
+ </ses:parameters>
+ <ses:cookies>
+ <ses:cookie>
+ <ses:name>JSESSIONID</ses:name>
+ <ses:value>1692B4C854F7C4A468057FFA4B708ADC</ses:value>
+ </ses:cookie>
+ </ses:cookies>
+ <ses:headers>
+ <ses:header>
+ <ses:name>accept</ses:name>
+ <ses:value>image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */*</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,fr-ca;q=0.91,fr;q=0.82,en-scouse;q=0.73,fr-FR-MAC;q=0.64,es;q=0.55,en-ca;q=0.45,en-US-MAC;q=0.36,x-pig-latin;q=0.27,sgn-US-MA;q=0.18,i-klingon;q=0.09</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>cache-control</ses:name>
+ <ses:value>no-cache</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>55</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=1692B4C854F7C4A468057FFA4B708ADC</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>host</ses:name>
+ <ses:value>localhost:8080</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>referer</ses:name>
+ <ses:value>http://localhost:8080/coreWeb/miniTests/blankCountryValue/saveLocale.do</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>user-agent</ses:name>
+ <ses:value>Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322)</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/blankCountryValue/index.jsp";>
+ </head>
+ <body>
+ <h3>Declarative Validation Test</h3>
+
+ <a href="/coreWeb/miniTests/blankCountryValue/saveLocale.do">Save current locale</a>
+ <br/>
+ <a href="/coreWeb/miniTests/blankCountryValue/changeLocale.do">Change to French locale &quot;fr&quot;</a>
+ <br/>
+ <a href="/coreWeb/miniTests/blankCountryValue/resetLocale.do">Reset locale</a>
+
+ <form name="validateForm" action="/coreWeb/miniTests/blankCountryValue/validate.do" method="post">
+ <table>
+ <tr valign="top">
+ <td>item:</td>
+ <td>
+ <input type="text" name="{actionForm.item}" value="1">
+ </td>
+ <td>
+ minimum length is 2 characters - All locales
+
+ </td>
+ </tr>
+ </table>
+ <br/>
+ &nbsp;
+ <input type="submit" name="actionOverride:validate" value="Click">
+ </form>
+ <hr>
+ minimum length is 2 characters - All locales
+
+ </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/blankCountryValue/changeLocale.do</ses:uri>
+ <ses:method>GET</ses:method>
+ <ses:parameters/>
+ <ses:cookies>
+ <ses:cookie>
+ <ses:name>JSESSIONID</ses:name>
+ <ses:value>1692B4C854F7C4A468057FFA4B708ADC</ses:value>
+ </ses:cookie>
+ </ses:cookies>
+ <ses:headers>
+ <ses:header>
+ <ses:name>accept</ses:name>
+ <ses:value>image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */*</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,fr-ca;q=0.91,fr;q=0.82,en-scouse;q=0.73,fr-FR-MAC;q=0.64,es;q=0.55,en-ca;q=0.45,en-US-MAC;q=0.36,x-pig-latin;q=0.27,sgn-US-MA;q=0.18,i-klingon;q=0.09</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=1692B4C854F7C4A468057FFA4B708ADC</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>host</ses:name>
+ <ses:value>localhost:8080</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>referer</ses:name>
+ <ses:value>http://localhost:8080/coreWeb/miniTests/blankCountryValue/validate.do</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>user-agent</ses:name>
+ <ses:value>Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322)</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="fr">
+<head>
+ <base href="http://localhost:8080/coreWeb/miniTests/blankCountryValue/index.jsp";>
+ </head>
+ <body>
+ <h3>Declarative Validation Test</h3>
+
+ <a href="/coreWeb/miniTests/blankCountryValue/saveLocale.do">Save current locale</a>
+ <br/>
+ <a href="/coreWeb/miniTests/blankCountryValue/changeLocale.do">Change to French locale &quot;fr&quot;</a>
+ <br/>
+ <a href="/coreWeb/miniTests/blankCountryValue/resetLocale.do">Reset locale</a>
+
+ <form name="validateForm" action="/coreWeb/miniTests/blankCountryValue/validate.do" method="post">
+ <table>
+ <tr valign="top">
+ <td>item:</td>
+ <td>
+ <input type="text" name="{actionForm.item}">
+ </td>
+ <td>
+ + </td>
+ </tr>
+ </table>
+ <br/>
+ &nbsp;
+ <input type="submit" name="actionOverride:validate" value="Click">
+ </form>
+ <hr>
+ + </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/blankCountryValue/validate.do</ses:uri>
+ <ses:method>POST</ses:method>
+ <ses:parameters>
+ <ses:parameter>
+ <ses:name>actionOverride:validate</ses:name>
+ <ses:value>Click</ses:value>
+ </ses:parameter>
+ <ses:parameter>
+ <ses:name>{actionForm.item}</ses:name>
+ <ses:value>1234</ses:value>
+ </ses:parameter>
+ </ses:parameters>
+ <ses:cookies>
+ <ses:cookie>
+ <ses:name>JSESSIONID</ses:name>
+ <ses:value>1692B4C854F7C4A468057FFA4B708ADC</ses:value>
+ </ses:cookie>
+ </ses:cookies>
+ <ses:headers>
+ <ses:header>
+ <ses:name>accept</ses:name>
+ <ses:value>image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */*</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,fr-ca;q=0.91,fr;q=0.82,en-scouse;q=0.73,fr-FR-MAC;q=0.64,es;q=0.55,en-ca;q=0.45,en-US-MAC;q=0.36,x-pig-latin;q=0.27,sgn-US-MA;q=0.18,i-klingon;q=0.09</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>cache-control</ses:name>
+ <ses:value>no-cache</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>58</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=1692B4C854F7C4A468057FFA4B708ADC</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>host</ses:name>
+ <ses:value>localhost:8080</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>referer</ses:name>
+ <ses:value>http://localhost:8080/coreWeb/miniTests/blankCountryValue/changeLocale.do</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>user-agent</ses:name>
+ <ses:value>Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322)</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="fr">
+<head>
+ <base href="http://localhost:8080/coreWeb/miniTests/blankCountryValue/index.jsp";>
+ </head>
+ <body>
+ <h3>Declarative Validation Test</h3>
+
+ <a href="/coreWeb/miniTests/blankCountryValue/saveLocale.do">Save current locale</a>
+ <br/>
+ <a href="/coreWeb/miniTests/blankCountryValue/changeLocale.do">Change to French locale &quot;fr&quot;</a>
+ <br/>
+ <a href="/coreWeb/miniTests/blankCountryValue/resetLocale.do">Reset locale</a>
+
+ <form name="validateForm" action="/coreWeb/miniTests/blankCountryValue/validate.do" method="post">
+ <table>
+ <tr valign="top">
+ <td>item:</td>
+ <td>
+ <input type="text" name="{actionForm.item}" value="1234">
+ </td>
+ <td>
+ minimum length is 8 characters - fr locale
+
+ </td>
+ </tr>
+ </table>
+ <br/>
+ &nbsp;
+ <input type="submit" name="actionOverride:validate" value="Click">
+ </form>
+ <hr>
+ minimum length is 8 characters - fr locale
+
+ </body>
+</html>]]></ses:responseBody>
+ </ses:response>
+ </ses:test>
+ <ses:test>
+ <ses:testNumber>6</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/blankCountryValue/resetLocale.do</ses:uri>
+ <ses:method>GET</ses:method>
+ <ses:parameters/>
+ <ses:cookies>
+ <ses:cookie>
+ <ses:name>JSESSIONID</ses:name>
+ <ses:value>1692B4C854F7C4A468057FFA4B708ADC</ses:value>
+ </ses:cookie>
+ </ses:cookies>
+ <ses:headers>
+ <ses:header>
+ <ses:name>accept</ses:name>
+ <ses:value>image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */*</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,fr-ca;q=0.91,fr;q=0.82,en-scouse;q=0.73,fr-FR-MAC;q=0.64,es;q=0.55,en-ca;q=0.45,en-US-MAC;q=0.36,x-pig-latin;q=0.27,sgn-US-MA;q=0.18,i-klingon;q=0.09</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=1692B4C854F7C4A468057FFA4B708ADC</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>host</ses:name>
+ <ses:value>localhost:8080</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>referer</ses:name>
+ <ses:value>http://localhost:8080/coreWeb/miniTests/blankCountryValue/validate.do</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>user-agent</ses:name>
+ <ses:value>Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322)</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/blankCountryValue/index.jsp";>
+ </head>
+ <body>
+ <h3>Declarative Validation Test</h3>
+
+ <a href="/coreWeb/miniTests/blankCountryValue/saveLocale.do">Save current locale</a>
+ <br/>
+ <a href="/coreWeb/miniTests/blankCountryValue/changeLocale.do">Change to French locale &quot;fr&quot;</a>
+ <br/>
+ <a href="/coreWeb/miniTests/blankCountryValue/resetLocale.do">Reset locale</a>
+
+ <form name="validateForm" action="/coreWeb/miniTests/blankCountryValue/validate.do" method="post">
+ <table>
+ <tr valign="top">
+ <td>item:</td>
+ <td>
+ <input type="text" name="{actionForm.item}">
+ </td>
+ <td>
+ + </td>
+ </tr>
+ </table>
+ <br/>
+ &nbsp;
+ <input type="submit" name="actionOverride:validate" value="Click">
+ </form>
+ <hr>
+ + </body>
+</html>]]></ses:responseBody>
+ </ses:response>
+ </ses:test>
+ </ses:tests>
+ <ses:endDate>27 Sep 2004, 11:16:32.980 AM MDT</ses:endDate>
+ <ses:testCount>6</ses:testCount>
+</ses:recorderSession>


Property changes on: 
netui/test/webapps/drt/testRecorder/tests/BlankCountryValue.xml
___________________________________________________________________
Name: svn:eol-style
  + native

Index: netui/test/webapps/drt/testRecorder/config/testRecorder-tests.xml
===================================================================
--- netui/test/webapps/drt/testRecorder/config/testRecorder-tests.xml (revision 47333)
+++ netui/test/webapps/drt/testRecorder/config/testRecorder-tests.xml (working copy)
@@ -1206,6 +1206,20 @@
</features>
</test>
<test>
+ <name>BlankCountryValue</name>
+ <description>Validation locale rule annotation with country value equal to blank space charactes should not create a formset with a country attribute of spaces.</description>
+ <webapp>coreWeb</webapp>
+ <categories>
+ <category>bvt</category>
+ <category>corePageFlow</category>
+ </categories>
+ <features>
+ <feature>PageFlow</feature>
+ <feature>Form</feature>
+ <feature>Validation</feature>
+ </features>
+ </test>
+ <test>
<name>BreakoutNesting</name>
<description>Test breaking out of nesting</description>
<webapp>coreWeb</webapp>
@@ -5187,6 +5201,20 @@
</features>
</test>
<test>
+ <name>VariantValidation</name>
+ <description>Test support of locale variant in the validation locale rules and creation of the validation rules XML file.</description>
+ <webapp>coreWeb</webapp>
+ <categories>
+ <category>bvt</category>
+ <category>corePageFlow</category>
+ </categories>
+ <features>
+ <feature>PageFlow</feature>
+ <feature>Form</feature>
+ <feature>Validation</feature>
+ </features>
+ </test>
+ <test>
<name>Visible</name>
<description>Test of using the Visible tag in a template</description>
<webapp>coreWeb</webapp>
Index: netui/test/webapps/drt/coreWeb/miniTests/blankCountryValue/Controller.jpf
===================================================================
--- netui/test/webapps/drt/coreWeb/miniTests/blankCountryValue/Controller.jpf (revision 0)
+++ netui/test/webapps/drt/coreWeb/miniTests/blankCountryValue/Controller.jpf (revision 0)
@@ -0,0 +1,145 @@
+/*
+ * 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.blankCountryValue;
+
+import java.util.Locale;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpSession;
+import org.apache.struts.action.ActionMapping;
+import org.apache.beehive.netui.pageflow.annotations.Jpf;
+import org.apache.beehive.netui.pageflow.FormData;
+import org.apache.beehive.netui.pageflow.Forward;
+import org.apache.beehive.netui.pageflow.PageFlowController;
+import org.apache.struts.Globals;
+
[EMAIL PROTECTED](
+ validatableBeans = {
+ @Jpf.ValidatableBean(
+ type = miniTests.blankCountryValue.Controller.ValidateForm.class,
+ validatableProperties = {
+ @Jpf.ValidatableProperty(
+ propertyName = "item",
+ validateMinLength = + @Jpf.ValidateMinLength(
+ chars = 2,
+ message = "minimum length is 2 characters - All locales"),
+ localeRules = {
+ @Jpf.ValidationLocaleRules(
+ language = "fr",
+ country = " ",
+ variant = "",
+ validateMinLength = + @Jpf.ValidateMinLength(
+ chars = 8,
+ message = "minimum length is 8 characters - fr locale")
+ )
+ }
+ )
+ }
+ )
+ }
+)
+public class Controller extends PageFlowController
+{
+ private Locale savedLocale = null;
+
+ @Jpf.Action(
+ forwards={
+ @Jpf.Forward(name="index", path="index.jsp")
+ }
+ )
+ protected Forward begin()
+ {
+ return new Forward("index");
+ }
+
+
+ /**
+ * Callback that is invoked when this controller instance is created.
+ */
+ protected void onCreate()
+ {
+ }
+
+ /**
+ * Callback that is invoked when this controller instance is destroyed.
+ */
+ protected void onDestroy(HttpSession session)
+ {
+ }
+
+
+ @Jpf.Action(forwards = {
+ @Jpf.Forward(name = "success",
+ path = "index.jsp")
+ },
+ validationErrorForward = @Jpf.Forward(name = "errors",
+ path = "index.jsp"))
+ protected Forward validate(ValidateForm form)
+ {
+ Forward forward = new Forward( "success" );
+ return forward;
+ }
+
+
+ public static class ValidateForm extends FormData
+ {
+ private String _item;
+
+ public String getItem()
+ { return this._item; }
+
+ public void setItem(String item)
+ { this._item = item; }
+ }
+
+
+ @Jpf.Action(forwards = {
+ @Jpf.Forward(name = "success",
+ path = "index.jsp")
+ })
+ protected Forward saveLocale()
+ {
+ savedLocale = getLocale();
+ Forward forward = new Forward( "success" );
+ return forward;
+ }
+
+ @Jpf.Action(forwards = {
+ @Jpf.Forward(name = "success",
+ path = "index.jsp")
+ })
+ protected Forward changeLocale()
+ {
+ setLocale( new Locale( "fr" ) );
+ Forward forward = new Forward( "success" );
+ return forward;
+ }
+
+ @Jpf.Action(forwards = {
+ @Jpf.Forward(name = "success",
+ path = "index.jsp")
+ })
+ protected Forward resetLocale()
+ {
+ setLocale( savedLocale );
+ Forward forward = new Forward( "success" );
+ return forward;
+ }
+}
+


Property changes on: 
netui/test/webapps/drt/coreWeb/miniTests/blankCountryValue/Controller.jpf
___________________________________________________________________
Name: svn:eol-style
  + native

Index: netui/test/webapps/drt/coreWeb/miniTests/blankCountryValue/index.jsp
===================================================================
--- netui/test/webapps/drt/coreWeb/miniTests/blankCountryValue/index.jsp (revision 0)
+++ netui/test/webapps/drt/coreWeb/miniTests/blankCountryValue/index.jsp (revision 0)
@@ -0,0 +1,41 @@
+<%@ page language="java" contentType="text/html;charset=UTF-8"%>
+<%@ taglib prefix="netui" uri="http://beehive.apache.org/netui/tags-html-1.0"%>
+<%@ taglib prefix="netui-data" uri="http://beehive.apache.org/netui/tags-databinding-1.0"%>
+<%@ taglib prefix="netui-template" uri="http://beehive.apache.org/netui/tags-template-1.0"%>
+
+
+<netui:html>
+ <head>
+ <netui:base/>
+ </head>
+ <netui:body>
+ <h3>Declarative Validation Test</h3>
+
+ <netui:anchor href="saveLocale.do">Save current locale</netui:anchor>
+ <br/>
+ <netui:anchor href="changeLocale.do">Change to French locale &quot;fr&quot;</netui:anchor>
+ <br/>
+ <netui:anchor href="resetLocale.do">Reset locale</netui:anchor>
+
+ <netui:form action="validate">
+ <table>
+ <tr valign="top">
+ <td>item:</td>
+ <td>
+ <netui:textBox dataSource="actionForm.item"></netui:textBox>
+ </td>
+ <td>
+ <netui:error value = "item"/>
+ </td>
+ </tr>
+ </table>
+ <br/>
+ &nbsp;
+ <netui:button action="validate"></netui:button>
+ </netui:form>
+ <hr>
+ <netui:errors/>
+ </netui:body>
+</netui:html>
+
+


Property changes on: 
netui/test/webapps/drt/coreWeb/miniTests/blankCountryValue/index.jsp
___________________________________________________________________
Name: svn:eol-style
  + native

Index: netui/test/webapps/drt/coreWeb/miniTests/variantValidation/Controller.jpf
===================================================================
--- netui/test/webapps/drt/coreWeb/miniTests/variantValidation/Controller.jpf (revision 0)
+++ netui/test/webapps/drt/coreWeb/miniTests/variantValidation/Controller.jpf (revision 0)
@@ -0,0 +1,168 @@
+/*
+ * 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.variantValidation;
+
+import java.util.Locale;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpSession;
+import org.apache.struts.action.ActionMapping;
+import org.apache.beehive.netui.pageflow.annotations.Jpf;
+import org.apache.beehive.netui.pageflow.FormData;
+import org.apache.beehive.netui.pageflow.Forward;
+import org.apache.beehive.netui.pageflow.PageFlowController;
+import org.apache.struts.Globals;
+
[EMAIL PROTECTED](
+ validatableBeans = {
+ @Jpf.ValidatableBean(
+ type = miniTests.variantValidation.Controller.ValidateForm.class,
+ validatableProperties = { + @Jpf.ValidatableProperty(
+ propertyName = "item",
+ validateMinLength = + @Jpf.ValidateMinLength(
+ chars = 1,
+ message = "minimum length is 1 character - All locale"),
+ validateMaxLength = + @Jpf.ValidateMaxLength(
+ chars = 10,
+ message = "maximum length is 10 characters - All locale"),
+ localeRules = {
+ @Jpf.ValidationLocaleRules(
+ language = "fr",
+ country = "CA",
+ variant = "",
+ validateMinLength = + @Jpf.ValidateMinLength(
+ chars = 2,
+ message = "minimum length is 2 characters - fr_CA locale")
+ ),
+ @Jpf.ValidationLocaleRules(
+ language = "fr",
+ country = "CA",
+ variant = "MAC",
+ validateMaxLength = + @Jpf.ValidateMaxLength(
+ chars = 8,
+ message = "maximum length is 8 characters - fr_CA_MAC locale")
+ )
+ }
+ )
+ }
+ )
+ }
+)
+public class Controller extends PageFlowController
+{
+ private Locale savedLocale = null;
+
+ @Jpf.Action(
+ forwards={
+ @Jpf.Forward(name="index", path="index.jsp")
+ }
+ )
+ protected Forward begin()
+ {
+ return new Forward("index");
+ }
+
+
+ /**
+ * Callback that is invoked when this controller instance is created.
+ */
+ protected void onCreate()
+ {
+ }
+
+ /**
+ * Callback that is invoked when this controller instance is destroyed.
+ */
+ protected void onDestroy(HttpSession session)
+ {
+ }
+
+ @Jpf.Action(forwards = {
+ @Jpf.Forward(name = "success",
+ path = "index.jsp")
+ },
+ validationErrorForward = @Jpf.Forward(name = "errors",
+ path = "index.jsp"))
+ protected Forward validate(ValidateForm form)
+ {
+ Forward forward = new Forward( "success" );
+ return forward;
+ }
+
+
+ public static class ValidateForm extends FormData
+ {
+ private String _item;
+
+ public String getItem()
+ { return this._item; }
+
+ public void setItem(String item)
+ { this._item = item; }
+ }
+
+
+ @Jpf.Action(forwards = {
+ @Jpf.Forward(name = "success",
+ path = "index.jsp")
+ })
+ protected Forward saveLocale()
+ {
+ savedLocale = getLocale();
+ Forward forward = new Forward( "success" );
+ return forward;
+ }
+
+ @Jpf.Action(forwards = {
+ @Jpf.Forward(name = "success",
+ path = "index.jsp")
+ })
+ protected Forward changeLocale1()
+ {
+ setLocale( new Locale( "fr", "CA" ) );
+ Forward forward = new Forward( "success" );
+ return forward;
+ }
+
+ @Jpf.Action(forwards = {
+ @Jpf.Forward(name = "success",
+ path = "index.jsp")
+ })
+ protected Forward changeLocale2()
+ {
+ setLocale( new Locale( "fr", "CA", "MAC" ) );
+ Forward forward = new Forward( "success" );
+ return forward;
+ }
+
+ @Jpf.Action(forwards = {
+ @Jpf.Forward(name = "success",
+ path = "index.jsp")
+ })
+ protected Forward resetLocale()
+ {
+ setLocale( savedLocale );
+ Forward forward = new Forward( "success" );
+ return forward;
+ }
+}
+


Property changes on: 
netui/test/webapps/drt/coreWeb/miniTests/variantValidation/Controller.jpf
___________________________________________________________________
Name: svn:eol-style
  + native

Index: netui/test/webapps/drt/coreWeb/miniTests/variantValidation/index.jsp
===================================================================
--- netui/test/webapps/drt/coreWeb/miniTests/variantValidation/index.jsp (revision 0)
+++ netui/test/webapps/drt/coreWeb/miniTests/variantValidation/index.jsp (revision 0)
@@ -0,0 +1,43 @@
+<%@ page language="java" contentType="text/html;charset=UTF-8"%>
+<%@ taglib prefix="netui" uri="http://beehive.apache.org/netui/tags-html-1.0"%>
+<%@ taglib prefix="netui-data" uri="http://beehive.apache.org/netui/tags-databinding-1.0"%>
+<%@ taglib prefix="netui-template" uri="http://beehive.apache.org/netui/tags-template-1.0"%>
+
+
+<netui:html>
+ <head>
+ <netui:base/>
+ </head>
+ <netui:body>
+ <h3>Declarative Validation Test</h3>
+
+ <netui:anchor href="saveLocale.do">Save current locale</netui:anchor>
+ <br/>
+ <netui:anchor href="changeLocale1.do">Change to French locale &quot;fr_CA&quot;</netui:anchor>
+ <br/>
+ <netui:anchor href="changeLocale2.do">Change locale to &quot;fr_CA_MAC&quot;</netui:anchor>
+ <br/>
+ <netui:anchor href="resetLocale.do">Reset locale</netui:anchor>
+
+ <netui:form action="validate">
+ <table>
+ <tr valign="top">
+ <td>item:</td>
+ <td>
+ <netui:textBox dataSource="actionForm.item"></netui:textBox>
+ </td>
+ <td>
+ <netui:error value = "item"/>
+ </td>
+ </tr>
+ </table>
+ <br>
+ &nbsp;
+ <netui:button action="validate"></netui:button>
+ </netui:form>
+ <hr>
+ <netui:errors/>
+ </netui:body>
+</netui:html>
+
+


Property changes on: 
netui/test/webapps/drt/coreWeb/miniTests/variantValidation/index.jsp
___________________________________________________________________
Name: svn:eol-style
  + native

Index: netui/src/pageflow/org/apache/beehive/netui/pageflow/Forward.java
===================================================================
--- netui/src/pageflow/org/apache/beehive/netui/pageflow/Forward.java   
(revision 47333)
+++ netui/src/pageflow/org/apache/beehive/netui/pageflow/Forward.java   
(working copy)
@@ -290,7 +290,7 @@
        return ( ActionForm[] ) _outputForms.toArray( new ActionForm[0] );
    }

- final ActionForm getFirstOutputForm( ActionMapping mapping, HttpServletRequest request )
+ final ActionForm getFirstOutputForm( HttpServletRequest request )
{
if ( _outputForms == null || _outputForms.size() == 0 )
{
Index: netui/src/pageflow/org/apache/beehive/netui/pageflow/PageFlowUtils.java
===================================================================
--- netui/src/pageflow/org/apache/beehive/netui/pageflow/PageFlowUtils.java (revision 47333)
+++ netui/src/pageflow/org/apache/beehive/netui/pageflow/PageFlowUtils.java (working copy)
@@ -328,7 +328,7 @@
setOutputForms( mapping, fwd.getOutputForms(), request, overwrite );
}
- InternalUtils.setForwardedForm( fwd.getFirstOutputForm( mapping, request ), request );
+ InternalUtils.setForwardedForm( fwd.getFirstOutputForm( request ), request );
}
/**
@@ -352,7 +352,7 @@
setOutputForms( mapping, fwd.getOutputForms(), request );
}


-        InternalUtils.setForwardedForm( fwd.getFirstOutputForm( mapping, 
request ), request );
+        InternalUtils.setForwardedForm( fwd.getFirstOutputForm( request ), 
request );
    }

/**
Index: netui/src/pageflow/org/apache/beehive/netui/pageflow/ForwardHandler.java
===================================================================
--- netui/src/pageflow/org/apache/beehive/netui/pageflow/ForwardHandler.java (revision 47333)
+++ netui/src/pageflow/org/apache/beehive/netui/pageflow/ForwardHandler.java (working copy)
@@ -130,7 +130,7 @@
else if ( pageFlowFwd.isReturnToAction() )
{
isSpecialForward = true;
- fwd = doReturnToAction( request, actionName, pageFlowFwd, servletContext, mapping );
+ fwd = doReturnToAction( request, actionName, pageFlowFwd );
}
//
@@ -291,8 +291,7 @@
return retFwd;
}
- private static ActionForward doReturnToAction( HttpServletRequest request, String actionName, Forward pageFlowFwd,
- ServletContext servletContext, ActionMapping mapping )
+ private static ActionForward doReturnToAction( HttpServletRequest request, String actionName, Forward pageFlowFwd )
{
//
// We need access to _previousPageInfo from the *current PageFlow*. That is
@@ -322,7 +321,7 @@
// in the action. Only do this if we're not doing a redirect, which precludes request attributes.
//
if ( ! pageFlowFwd.isRedirect() && prevActionInfo.getForm() != null
- && pageFlowFwd.getFirstOutputForm( mapping, request ) == null )
+ && pageFlowFwd.getFirstOutputForm( request ) == null )
{
pageFlowFwd.addOutputForm( prevActionInfo.getForm() );
}
@@ -462,7 +461,7 @@
//
// Store the returned form in the request.
//
- ActionForm retForm = pageFlowFwd.getFirstOutputForm( mapping, request );
+ ActionForm retForm = pageFlowFwd.getFirstOutputForm( request );
if ( retForm != null )
{
Index: netui/src/pageflow/org/apache/beehive/netui/pageflow/PageFlowRequestProcessor.java
===================================================================
--- netui/src/pageflow/org/apache/beehive/netui/pageflow/PageFlowRequestProcessor.java (revision 47333)
+++ netui/src/pageflow/org/apache/beehive/netui/pageflow/PageFlowRequestProcessor.java (working copy)
@@ -946,13 +946,17 @@
}
else
{
- trySharedFlowAction( path, request, response );
+ if ( !trySharedFlowAction( path, request, response ) )
+ {
+ return processUnresolvedAction( path, InternalUtils.decodeURI( request ),
+ request, response, returningForm );
+ }
}
return null;
}
- protected void trySharedFlowAction( String actionPath, HttpServletRequest request, HttpServletResponse response )
+ protected boolean trySharedFlowAction( String actionPath, HttpServletRequest request, HttpServletResponse response )
throws IOException
{
SharedFlowController sf = PageFlowUtils.getSharedFlow( request, getServletContext() );
@@ -990,7 +994,10 @@
{
_log.error( "Could not forward to shared flow URI " + uri, e );
}
+ return true;
}
+
+ return false;
}
protected ActionMapping processUnresolvedAction( String actionPath, String originalRequestURI,
Index: netui/src/compiler/schema/struts-validator/struts-validator_1_1.xsd
===================================================================
--- netui/src/compiler/schema/struts-validator/struts-validator_1_1.xsd (revision 47333)
+++ netui/src/compiler/schema/struts-validator/struts-validator_1_1.xsd (working copy)
@@ -78,6 +78,7 @@
</xs:sequence>
<xs:attribute name="language" type="xs:string"/>
<xs:attribute name="country" type="xs:string"/>
+ <xs:attribute name="variant" type="xs:string"/>
</xs:complexType>
</xs:element>
<xs:element name="global">
Index: netui/src/compiler/org/apache/beehive/netui/compiler/genmodel/GenValidationModel.java
===================================================================
--- netui/src/compiler/org/apache/beehive/netui/compiler/genmodel/GenValidationModel.java (revision 47333)
+++ netui/src/compiler/org/apache/beehive/netui/compiler/genmodel/GenValidationModel.java (working copy)
@@ -257,6 +257,10 @@
String country = CompilerUtils.getString( rulesContainerAnnotation, COUNTRY_ATTR, true );
String variant = CompilerUtils.getString( rulesContainerAnnotation, VARIANT_ATTR, true );
+ language = language.trim();
+ if ( country != null ) country = country.trim();
+ if ( variant != null ) variant = variant.trim();
+
if ( country != null && variant != null ) locale = new Locale( language, country, variant );
else if ( country != null ) locale = new Locale( language, country );
else locale = new Locale( language );
Index: netui/src/compiler/org/apache/beehive/netui/compiler/model/validation/ValidationModel.java
===================================================================
--- netui/src/compiler/org/apache/beehive/netui/compiler/model/validation/ValidationModel.java (revision 47333)
+++ netui/src/compiler/org/apache/beehive/netui/compiler/model/validation/ValidationModel.java (working copy)
@@ -32,6 +32,7 @@
import java.util.Locale;
import java.util.HashMap;
import java.util.ArrayList;
+import java.util.Collection;
import java.util.Iterator;


public abstract class ValidationModel
@@ -260,19 +261,16 @@
        // locale before the FormSet with no language or country attributes 
(even
        // if it is the locale of the system), write the most specific locales 
first.
        //
-        List allLocales = new ArrayList( _localeSets.keySet() );
-        List langCountryVariant = new ArrayList();
-        List langCountry = new ArrayList();
-        List langVariant = new ArrayList();
-        List lang = new ArrayList();
-        List orderedLocales = new ArrayList( allLocales.size() );
+        List< Locale > allLocales = new ArrayList< Locale >( 
_localeSets.keySet() );
+        List< Locale > langCountryVariant = new ArrayList< Locale >();
+        List< Locale > langCountry = new ArrayList< Locale >();
+        List< Locale > lang = new ArrayList< Locale >();

-        for ( Iterator i = allLocales.iterator(); i.hasNext(); )
+        for ( Locale locale : allLocales )
        {
-            Locale locale = ( Locale ) i.next();
-            if ( locale.getCountry() != null && locale.getCountry().length() > 
0 )
+            if ( locale.getCountry().length() > 0 )
            {
-                if ( locale.getVariant() != null && locale.getVariant().length() 
> 0 )
+                if ( locale.getVariant().length() > 0 )
                {
                    langCountryVariant.add( locale );
                }
@@ -281,24 +279,22 @@
                    langCountry.add( locale );
                }
            }
-            else if ( locale.getVariant() != null && locale.getVariant().length() 
> 0 )
-            {
-                langVariant.add( locale );
-            }
            else
            {
                lang.add( locale );
            }
        }

-        orderedLocales.addAll( langCountryVariant );
-        orderedLocales.addAll( langCountry );
-        orderedLocales.addAll( langVariant );
-        orderedLocales.addAll( lang );
+        writeLocaleSets( langCountryVariant, formValidationElement );
+        writeLocaleSets( langCountry, formValidationElement );
+        writeLocaleSets( lang, formValidationElement );
+    }

- for ( Iterator i = orderedLocales.iterator(); i.hasNext(); )
+ private void writeLocaleSets( Collection< Locale > locales, FormValidationDocument.FormValidation formValidationElement )
+ {
+ for ( Locale locale : locales )
{
- LocaleSet localeSet = ( LocaleSet ) _localeSets.get( i.next() );
+ LocaleSet localeSet = ( LocaleSet ) _localeSets.get( locale );
writeLocaleSet( localeSet, formValidationElement );
}
}
@@ -320,11 +316,15 @@
}
else if ( locale != null && locale.getLanguage().equals( existingFormSetElement.getLanguage() ) )
{
- if ( ( locale.getCountry() == null && existingFormSetElement.getCountry() == null )
+ if ( ( locale.getCountry().length() == 0 && existingFormSetElement.getCountry() == null )
|| locale.getCountry().equals( existingFormSetElement.getCountry() ) )
{
- formSetElementToUse = existingFormSetElement;
- break;
+ if ( ( locale.getVariant().length() == 0 && existingFormSetElement.getVariant() == null )
+ || locale.getVariant().equals( existingFormSetElement.getVariant() ) )
+ {
+ formSetElementToUse = existingFormSetElement;
+ break;
+ }
}
}
}
Index: netui/src/compiler/org/apache/beehive/netui/compiler/model/validation/LocaleSet.java
===================================================================
--- netui/src/compiler/org/apache/beehive/netui/compiler/model/validation/LocaleSet.java (revision 47333)
+++ netui/src/compiler/org/apache/beehive/netui/compiler/model/validation/LocaleSet.java (working copy)
@@ -61,7 +61,14 @@
if ( _locale != null )
{
formset.setLanguage( _locale.getLanguage() );
- formset.setCountry( _locale.getCountry() );
+ if ( _locale.getCountry().length() > 0 )
+ {
+ formset.setCountry( _locale.getCountry() );
+ if ( _locale.getVariant().length() > 0 )
+ {
+ formset.setVariant( _locale.getVariant() );
+ }
+ }
}
FormDocument.Form[] existingFormElements = formset.getFormArray();


Reply via email to