struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hus...@apache.org
Subject svn commit: r376852 [4/20] - /struts/taglib/trunk/src/webapp/org/apache/struts/taglib/html/
Date Fri, 10 Feb 2006 21:08:50 GMT
Modified: struts/taglib/trunk/src/webapp/org/apache/struts/taglib/html/TestErrorsTag4.jsp
URL: http://svn.apache.org/viewcvs/struts/taglib/trunk/src/webapp/org/apache/struts/taglib/html/TestErrorsTag4.jsp?rev=376852&r1=376851&r2=376852&view=diff
==============================================================================
--- struts/taglib/trunk/src/webapp/org/apache/struts/taglib/html/TestErrorsTag4.jsp (original)
+++ struts/taglib/trunk/src/webapp/org/apache/struts/taglib/html/TestErrorsTag4.jsp Fri Feb 10 13:08:44 2006
@@ -1,300 +1,369 @@
 <%@ page contentType="text/html;charset=UTF-8" language="java" %>
-<%@page import="junit.framework.Assert"%>
-<%@page import="org.apache.struts.action.ActionMessage"%>
-<%@page import="org.apache.struts.action.ActionMessages"%>
-<%@page import="org.apache.struts.Globals"%>
+<%@ page import="junit.framework.Assert" %>
+<%@ page import="org.apache.struts.Globals" %>
+<%@ page import="org.apache.struts.action.ActionMessage" %>
+<%@ page import="org.apache.struts.action.ActionMessages" %>
 
 <%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %>
 <%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
 <%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>
 
 
-
-
-
-
 <!-- Name -->
 
-<logic:equal name="runTest" value="testErrorsDefaultBundle0ErrorsNameProperty">
-	<bean:define id="EXPECTED_RESULTS" toScope="page">
-		My Errors go here:<html:errors name="MY_ERRORS_KEY" property="someProperty"/>
-	</bean:define>
-	<bean:define id="TEST_RESULTS" toScope="page">
-		My Errors go here:
-	</bean:define>
-</logic:equal>
-
-<logic:equal name="runTest" value="testErrorsDefaultBundle2ErrorsNameProperty">
-<%
-//This should be done in your action.  I do it here to keep the tests simple.
-	ActionMessages errors = new ActionMessages();
-    errors.add("someProperty",
-         new ActionMessage("default.testing.errors.tag"));
-    errors.add("someProperty",
-         new ActionMessage("default.testing.errors.tag2"));
-    request.setAttribute("MY_ERRORS_KEY", errors);
-%>
-	<bean:define id="EXPECTED_RESULTS" toScope="page">
-		My Errors go here:<html:errors name="MY_ERRORS_KEY" property="someProperty"/>
-	</bean:define>
-	<bean:define id="TEST_RESULTS" toScope="page">
-		My Errors go here:<default_errors_header><default_errors_prefix>My Errors Text<default_errors_suffix><default_errors_prefix>My Errors Text 2<default_errors_suffix><default_errors_footer>
-	</bean:define>
-</logic:equal>
-
-<logic:equal name="runTest" value="testErrorsAlternateBundle0ErrorsNameProperty">
-	<bean:define id="EXPECTED_RESULTS" toScope="page">
-		My Errors go here:<html:errors name="MY_ERRORS_KEY" property="someProperty"/>
-	</bean:define>
-	<bean:define id="TEST_RESULTS" toScope="page">
-		My Errors go here:
-	</bean:define>
-</logic:equal>
-
-<logic:equal name="runTest" value="testErrorsAlternateBundle2ErrorsNameProperty">
-<%
-//This should be done in your action.  I do it here to keep the tests simple.
-	ActionMessages errors = new ActionMessages();
-    errors.add("someProperty",
-         new ActionMessage("alternate.testing.errors.tag"));
-    errors.add("someProperty",
-         new ActionMessage("alternate.testing.errors.tag2"));
-    request.setAttribute("MY_ERRORS_KEY", errors);
-%>
-	<bean:define id="EXPECTED_RESULTS" toScope="page">
-		My Errors go here:<html:errors bundle="alternate" name="MY_ERRORS_KEY" property="someProperty"/>
-	</bean:define>
-	<bean:define id="TEST_RESULTS" toScope="page">
-		My Errors go here:<alternate_errors_header><alternate_errors_prefix>My Alternate Errors Text<alternate_errors_suffix><alternate_errors_prefix>My Alternate Errors Text 2<alternate_errors_suffix><alternate_errors_footer>
-	</bean:define>
-</logic:equal>
-
-<logic:equal name="runTest" value="testErrorsDefaultBundle0ErrorsNameProperty_fr">
-	<bean:define id="EXPECTED_RESULTS" toScope="page">
-		My Errors go here:<html:errors name="MY_ERRORS_KEY" property="someProperty"/>
-	</bean:define>
-	<bean:define id="TEST_RESULTS" toScope="page">
-		My Errors go here:
-	</bean:define>
-</logic:equal>
-
-<logic:equal name="runTest" value="testErrorsDefaultBundle2ErrorsNameProperty_fr">
-<%
-//This should be done in your action.  I do it here to keep the tests simple.
-	ActionMessages errors = new ActionMessages();
-    errors.add("someProperty",
-         new ActionMessage("default.testing.errors.tag"));
-    errors.add("someProperty",
-         new ActionMessage("default.testing.errors.tag2"));
-    request.setAttribute("MY_ERRORS_KEY", errors);
-%>
-	<bean:define id="EXPECTED_RESULTS" toScope="page">
-		My Errors go here:<html:errors name="MY_ERRORS_KEY" property="someProperty"/>
-	</bean:define>
-	<bean:define id="TEST_RESULTS" toScope="page">
-		My Errors go here:<default_errors_header_fr><default_errors_prefix_fr>My Errors Text (fr)<default_errors_suffix_fr><default_errors_prefix_fr>My Errors Text 2 (fr)<default_errors_suffix_fr><default_errors_footer_fr>
-	</bean:define>
-</logic:equal>
-
-
-<logic:equal name="runTest" value="testErrorsAlternateBundle0ErrorsNameProperty_fr">
-	<bean:define id="EXPECTED_RESULTS" toScope="page">
-		My Errors go here:<html:errors name="MY_ERRORS_KEY" property="someProperty"/>
-	</bean:define>
-	<bean:define id="TEST_RESULTS" toScope="page">
-		My Errors go here:
-	</bean:define>
-</logic:equal>
-
-<logic:equal name="runTest" value="testErrorsAlternateBundle2ErrorsNameProperty_fr">
-<%
-//This should be done in your action.  I do it here to keep the tests simple.
-	ActionMessages errors = new ActionMessages();
-    errors.add("someProperty",
-         new ActionMessage("alternate.testing.errors.tag"));
-    errors.add("someProperty",
-         new ActionMessage("alternate.testing.errors.tag2"));
-    request.setAttribute("MY_ERRORS_KEY", errors);
-%>
-	<bean:define id="EXPECTED_RESULTS" toScope="page">
-		My Errors go here:<html:errors bundle="alternate" name="MY_ERRORS_KEY" property="someProperty"/>
-	</bean:define>
-	<bean:define id="TEST_RESULTS" toScope="page">
-		My Errors go here:<alternate_errors_header_fr><alternate_errors_prefix_fr>My Alternate Errors Text (fr)<alternate_errors_suffix_fr><alternate_errors_prefix_fr>My Alternate Errors Text 2 (fr)<alternate_errors_suffix_fr><alternate_errors_footer_fr>
-	</bean:define>
-</logic:equal>
-
-
-
-
-
-
-
-
-
-
-
-<logic:equal name="runTest" value="testErrorsDefaultBundle0ErrorsLocaleNameProperty">
-	<bean:define id="EXPECTED_RESULTS" toScope="page">
-		My Errors go here:<html:errors locale="MY_LOCALE_KEY" name="MY_ERRORS_KEY" property="someProperty"/>
-	</bean:define>
-	<bean:define id="TEST_RESULTS" toScope="page">
-		My Errors go here:
-	</bean:define>
+<logic:equal name="runTest"
+             value="testErrorsDefaultBundle0ErrorsNameProperty">
+    <bean:define id="EXPECTED_RESULTS" toScope="page">
+        My Errors go here:<html:errors name="MY_ERRORS_KEY"
+                                       property="someProperty"/>
+    </bean:define>
+    <bean:define id="TEST_RESULTS" toScope="page">
+        My Errors go here:
+    </bean:define>
+</logic:equal>
+
+<logic:equal name="runTest"
+             value="testErrorsDefaultBundle2ErrorsNameProperty">
+    <%
+        //This should be done in your action.  I do it here to keep the tests simple.
+        ActionMessages errors = new ActionMessages();
+        errors.add("someProperty",
+                new ActionMessage("default.testing.errors.tag"));
+        errors.add("someProperty",
+                new ActionMessage("default.testing.errors.tag2"));
+        request.setAttribute("MY_ERRORS_KEY", errors);
+    %>
+    <bean:define id="EXPECTED_RESULTS" toScope="page">
+        My Errors go here:<html:errors name="MY_ERRORS_KEY"
+                                       property="someProperty"/>
+    </bean:define>
+    <bean:define id="TEST_RESULTS" toScope="page">
+        My Errors go here:<default_errors_header><default_errors_prefix>My
+        Errors Text<default_errors_suffix><default_errors_prefix>My Errors
+        Text 2<default_errors_suffix><default_errors_footer>
+    </bean:define>
+</logic:equal>
+
+<logic:equal name="runTest"
+             value="testErrorsAlternateBundle0ErrorsNameProperty">
+    <bean:define id="EXPECTED_RESULTS" toScope="page">
+        My Errors go here:<html:errors name="MY_ERRORS_KEY"
+                                       property="someProperty"/>
+    </bean:define>
+    <bean:define id="TEST_RESULTS" toScope="page">
+        My Errors go here:
+    </bean:define>
+</logic:equal>
+
+<logic:equal name="runTest"
+             value="testErrorsAlternateBundle2ErrorsNameProperty">
+    <%
+        //This should be done in your action.  I do it here to keep the tests simple.
+        ActionMessages errors = new ActionMessages();
+        errors.add("someProperty",
+                new ActionMessage("alternate.testing.errors.tag"));
+        errors.add("someProperty",
+                new ActionMessage("alternate.testing.errors.tag2"));
+        request.setAttribute("MY_ERRORS_KEY", errors);
+    %>
+    <bean:define id="EXPECTED_RESULTS" toScope="page">
+        My Errors go here:<html:errors bundle="alternate" name="MY_ERRORS_KEY"
+                                       property="someProperty"/>
+    </bean:define>
+    <bean:define id="TEST_RESULTS" toScope="page">
+        My Errors go here:<alternate_errors_header><alternate_errors_prefix>My
+        Alternate Errors
+        Text<alternate_errors_suffix><alternate_errors_prefix>My Alternate
+        Errors Text 2<alternate_errors_suffix><alternate_errors_footer>
+    </bean:define>
+</logic:equal>
+
+<logic:equal name="runTest"
+             value="testErrorsDefaultBundle0ErrorsNameProperty_fr">
+    <bean:define id="EXPECTED_RESULTS" toScope="page">
+        My Errors go here:<html:errors name="MY_ERRORS_KEY"
+                                       property="someProperty"/>
+    </bean:define>
+    <bean:define id="TEST_RESULTS" toScope="page">
+        My Errors go here:
+    </bean:define>
+</logic:equal>
+
+<logic:equal name="runTest"
+             value="testErrorsDefaultBundle2ErrorsNameProperty_fr">
+    <%
+        //This should be done in your action.  I do it here to keep the tests simple.
+        ActionMessages errors = new ActionMessages();
+        errors.add("someProperty",
+                new ActionMessage("default.testing.errors.tag"));
+        errors.add("someProperty",
+                new ActionMessage("default.testing.errors.tag2"));
+        request.setAttribute("MY_ERRORS_KEY", errors);
+    %>
+    <bean:define id="EXPECTED_RESULTS" toScope="page">
+        My Errors go here:<html:errors name="MY_ERRORS_KEY"
+                                       property="someProperty"/>
+    </bean:define>
+    <bean:define id="TEST_RESULTS" toScope="page">
+        My Errors go
+        here:<default_errors_header_fr><default_errors_prefix_fr>My Errors
+        Text (fr)<default_errors_suffix_fr><default_errors_prefix_fr>My Errors
+        Text 2 (fr)<default_errors_suffix_fr><default_errors_footer_fr>
+    </bean:define>
+</logic:equal>
+
+
+<logic:equal name="runTest"
+             value="testErrorsAlternateBundle0ErrorsNameProperty_fr">
+    <bean:define id="EXPECTED_RESULTS" toScope="page">
+        My Errors go here:<html:errors name="MY_ERRORS_KEY"
+                                       property="someProperty"/>
+    </bean:define>
+    <bean:define id="TEST_RESULTS" toScope="page">
+        My Errors go here:
+    </bean:define>
+</logic:equal>
+
+<logic:equal name="runTest"
+             value="testErrorsAlternateBundle2ErrorsNameProperty_fr">
+    <%
+        //This should be done in your action.  I do it here to keep the tests simple.
+        ActionMessages errors = new ActionMessages();
+        errors.add("someProperty",
+                new ActionMessage("alternate.testing.errors.tag"));
+        errors.add("someProperty",
+                new ActionMessage("alternate.testing.errors.tag2"));
+        request.setAttribute("MY_ERRORS_KEY", errors);
+    %>
+    <bean:define id="EXPECTED_RESULTS" toScope="page">
+        My Errors go here:<html:errors bundle="alternate" name="MY_ERRORS_KEY"
+                                       property="someProperty"/>
+    </bean:define>
+    <bean:define id="TEST_RESULTS" toScope="page">
+        My Errors go
+        here:<alternate_errors_header_fr><alternate_errors_prefix_fr>My
+        Alternate Errors Text
+        (fr)<alternate_errors_suffix_fr><alternate_errors_prefix_fr>My
+        Alternate Errors Text 2
+        (fr)<alternate_errors_suffix_fr><alternate_errors_footer_fr>
+    </bean:define>
+</logic:equal>
+
+
+<logic:equal name="runTest"
+             value="testErrorsDefaultBundle0ErrorsLocaleNameProperty">
+    <bean:define id="EXPECTED_RESULTS" toScope="page">
+        My Errors go here:<html:errors locale="MY_LOCALE_KEY"
+                                       name="MY_ERRORS_KEY"
+                                       property="someProperty"/>
+    </bean:define>
+    <bean:define id="TEST_RESULTS" toScope="page">
+        My Errors go here:
+    </bean:define>
+</logic:equal>
+
+<logic:equal name="runTest"
+             value="testErrorsDefaultBundle2ErrorsLocaleNameProperty">
+    <%
+        //This should be done in your action.  I do it here to keep the tests simple.
+        ActionMessages errors = new ActionMessages();
+        errors.add("someProperty",
+                new ActionMessage("default.testing.errors.tag"));
+        errors.add("someProperty",
+                new ActionMessage("default.testing.errors.tag2"));
+        request.setAttribute("MY_ERRORS_KEY", errors);
+    %>
+    <bean:define id="EXPECTED_RESULTS" toScope="page">
+        My Errors go here:<html:errors locale="MY_LOCALE_KEY"
+                                       name="MY_ERRORS_KEY"
+                                       property="someProperty"/>
+    </bean:define>
+    <bean:define id="TEST_RESULTS" toScope="page">
+        My Errors go
+        here:<default_errors_header_fr><default_errors_prefix_fr>My Errors
+        Text (fr)<default_errors_suffix_fr><default_errors_prefix_fr>My Errors
+        Text 2 (fr)<default_errors_suffix_fr><default_errors_footer_fr>
+    </bean:define>
+</logic:equal>
+
+<logic:equal name="runTest"
+             value="testErrorsAlternateBundle0ErrorsLocaleNameProperty">
+    <bean:define id="EXPECTED_RESULTS" toScope="page">
+        My Errors go here:<html:errors locale="MY_LOCALE_KEY"
+                                       name="MY_ERRORS_KEY"
+                                       property="someProperty"/>
+    </bean:define>
+    <bean:define id="TEST_RESULTS" toScope="page">
+        My Errors go here:
+    </bean:define>
+</logic:equal>
+
+<logic:equal name="runTest"
+             value="testErrorsAlternateBundle2ErrorsLocaleNameProperty">
+    <%
+        //This should be done in your action.  I do it here to keep the tests simple.
+        ActionMessages errors = new ActionMessages();
+        errors.add("someProperty",
+                new ActionMessage("alternate.testing.errors.tag"));
+        errors.add("someProperty",
+                new ActionMessage("alternate.testing.errors.tag2"));
+        request.setAttribute("MY_ERRORS_KEY", errors);
+    %>
+    <bean:define id="EXPECTED_RESULTS" toScope="page">
+        My Errors go here:<html:errors locale="MY_LOCALE_KEY"
+                                       bundle="alternate" name="MY_ERRORS_KEY"
+                                       property="someProperty"/>
+    </bean:define>
+    <bean:define id="TEST_RESULTS" toScope="page">
+        My Errors go
+        here:<alternate_errors_header_fr><alternate_errors_prefix_fr>My
+        Alternate Errors Text
+        (fr)<alternate_errors_suffix_fr><alternate_errors_prefix_fr>My
+        Alternate Errors Text 2
+        (fr)<alternate_errors_suffix_fr><alternate_errors_footer_fr>
+    </bean:define>
+</logic:equal>
+
+<logic:equal name="runTest"
+             value="testErrorsDefaultBundle0ErrorsLocaleNameProperty_fr">
+    <bean:define id="EXPECTED_RESULTS" toScope="page">
+        My Errors go here:<html:errors locale="MY_LOCALE_KEY"
+                                       name="MY_ERRORS_KEY"
+                                       property="someProperty"/>
+    </bean:define>
+    <bean:define id="TEST_RESULTS" toScope="page">
+        My Errors go here:
+    </bean:define>
+</logic:equal>
+
+<logic:equal name="runTest"
+             value="testErrorsDefaultBundle2ErrorsLocaleNameProperty_fr">
+    <%
+        //This should be done in your action.  I do it here to keep the tests simple.
+        ActionMessages errors = new ActionMessages();
+        errors.add("someProperty",
+                new ActionMessage("default.testing.errors.tag"));
+        errors.add("someProperty",
+                new ActionMessage("default.testing.errors.tag2"));
+        request.setAttribute("MY_ERRORS_KEY", errors);
+    %>
+    <bean:define id="EXPECTED_RESULTS" toScope="page">
+        My Errors go here:<html:errors locale="MY_LOCALE_KEY"
+                                       name="MY_ERRORS_KEY"
+                                       property="someProperty"/>
+    </bean:define>
+    <bean:define id="TEST_RESULTS" toScope="page">
+        My Errors go
+        here:<default_errors_header_fr><default_errors_prefix_fr>My Errors
+        Text (fr)<default_errors_suffix_fr><default_errors_prefix_fr>My Errors
+        Text 2 (fr)<default_errors_suffix_fr><default_errors_footer_fr>
+    </bean:define>
+</logic:equal>
+
+
+<logic:equal name="runTest"
+             value="testErrorsAlternateBundle0ErrorsLocaleNameProperty_fr">
+    <bean:define id="EXPECTED_RESULTS" toScope="page">
+        My Errors go here:<html:errors locale="MY_LOCALE_KEY"
+                                       name="MY_ERRORS_KEY"
+                                       property="someProperty"/>
+    </bean:define>
+    <bean:define id="TEST_RESULTS" toScope="page">
+        My Errors go here:
+    </bean:define>
+</logic:equal>
+
+<logic:equal name="runTest"
+             value="testErrorsAlternateBundle2ErrorsLocaleNameProperty_fr">
+    <%
+        //This should be done in your action.  I do it here to keep the tests simple.
+        ActionMessages errors = new ActionMessages();
+        errors.add("someProperty",
+                new ActionMessage("alternate.testing.errors.tag"));
+        errors.add("someProperty",
+                new ActionMessage("alternate.testing.errors.tag2"));
+        request.setAttribute("MY_ERRORS_KEY", errors);
+    %>
+    <bean:define id="EXPECTED_RESULTS" toScope="page">
+        My Errors go here:<html:errors locale="MY_LOCALE_KEY"
+                                       bundle="alternate" name="MY_ERRORS_KEY"
+                                       property="someProperty"/>
+    </bean:define>
+    <bean:define id="TEST_RESULTS" toScope="page">
+        My Errors go
+        here:<alternate_errors_header_fr><alternate_errors_prefix_fr>My
+        Alternate Errors Text
+        (fr)<alternate_errors_suffix_fr><alternate_errors_prefix_fr>My
+        Alternate Errors Text 2
+        (fr)<alternate_errors_suffix_fr><alternate_errors_footer_fr>
+    </bean:define>
 </logic:equal>
 
-<logic:equal name="runTest" value="testErrorsDefaultBundle2ErrorsLocaleNameProperty">
-<%
-//This should be done in your action.  I do it here to keep the tests simple.
-	ActionMessages errors = new ActionMessages();
-    errors.add("someProperty",
-         new ActionMessage("default.testing.errors.tag"));
-    errors.add("someProperty",
-         new ActionMessage("default.testing.errors.tag2"));
-    request.setAttribute("MY_ERRORS_KEY", errors);
-%>
-	<bean:define id="EXPECTED_RESULTS" toScope="page">
-		My Errors go here:<html:errors locale="MY_LOCALE_KEY" name="MY_ERRORS_KEY" property="someProperty"/>
-	</bean:define>
-	<bean:define id="TEST_RESULTS" toScope="page">
-		My Errors go here:<default_errors_header_fr><default_errors_prefix_fr>My Errors Text (fr)<default_errors_suffix_fr><default_errors_prefix_fr>My Errors Text 2 (fr)<default_errors_suffix_fr><default_errors_footer_fr>
-	</bean:define>
-</logic:equal>
-
-<logic:equal name="runTest" value="testErrorsAlternateBundle0ErrorsLocaleNameProperty">
-	<bean:define id="EXPECTED_RESULTS" toScope="page">
-		My Errors go here:<html:errors locale="MY_LOCALE_KEY" name="MY_ERRORS_KEY" property="someProperty"/>
-	</bean:define>
-	<bean:define id="TEST_RESULTS" toScope="page">
-		My Errors go here:
-	</bean:define>
-</logic:equal>
-
-<logic:equal name="runTest" value="testErrorsAlternateBundle2ErrorsLocaleNameProperty">
-<%
-//This should be done in your action.  I do it here to keep the tests simple.
-	ActionMessages errors = new ActionMessages();
-    errors.add("someProperty",
-         new ActionMessage("alternate.testing.errors.tag"));
-    errors.add("someProperty",
-         new ActionMessage("alternate.testing.errors.tag2"));
-    request.setAttribute("MY_ERRORS_KEY", errors);
-%>
-	<bean:define id="EXPECTED_RESULTS" toScope="page">
-		My Errors go here:<html:errors locale="MY_LOCALE_KEY" bundle="alternate" name="MY_ERRORS_KEY" property="someProperty"/>
-	</bean:define>
-	<bean:define id="TEST_RESULTS" toScope="page">
-		My Errors go here:<alternate_errors_header_fr><alternate_errors_prefix_fr>My Alternate Errors Text (fr)<alternate_errors_suffix_fr><alternate_errors_prefix_fr>My Alternate Errors Text 2 (fr)<alternate_errors_suffix_fr><alternate_errors_footer_fr>
-	</bean:define>
-</logic:equal>
-
-<logic:equal name="runTest" value="testErrorsDefaultBundle0ErrorsLocaleNameProperty_fr">
-	<bean:define id="EXPECTED_RESULTS" toScope="page">
-		My Errors go here:<html:errors locale="MY_LOCALE_KEY" name="MY_ERRORS_KEY" property="someProperty"/>
-	</bean:define>
-	<bean:define id="TEST_RESULTS" toScope="page">
-		My Errors go here:
-	</bean:define>
-</logic:equal>
-
-<logic:equal name="runTest" value="testErrorsDefaultBundle2ErrorsLocaleNameProperty_fr">
-<%
-//This should be done in your action.  I do it here to keep the tests simple.
-	ActionMessages errors = new ActionMessages();
-    errors.add("someProperty",
-         new ActionMessage("default.testing.errors.tag"));
-    errors.add("someProperty",
-         new ActionMessage("default.testing.errors.tag2"));
-    request.setAttribute("MY_ERRORS_KEY", errors);
-%>
-	<bean:define id="EXPECTED_RESULTS" toScope="page">
-		My Errors go here:<html:errors locale="MY_LOCALE_KEY" name="MY_ERRORS_KEY" property="someProperty"/>
-	</bean:define>
-	<bean:define id="TEST_RESULTS" toScope="page">
-		My Errors go here:<default_errors_header_fr><default_errors_prefix_fr>My Errors Text (fr)<default_errors_suffix_fr><default_errors_prefix_fr>My Errors Text 2 (fr)<default_errors_suffix_fr><default_errors_footer_fr>
-	</bean:define>
-</logic:equal>
-
-
-<logic:equal name="runTest" value="testErrorsAlternateBundle0ErrorsLocaleNameProperty_fr">
-	<bean:define id="EXPECTED_RESULTS" toScope="page">
-		My Errors go here:<html:errors locale="MY_LOCALE_KEY" name="MY_ERRORS_KEY" property="someProperty"/>
-	</bean:define>
-	<bean:define id="TEST_RESULTS" toScope="page">
-		My Errors go here:
-	</bean:define>
-</logic:equal>
-
-<logic:equal name="runTest" value="testErrorsAlternateBundle2ErrorsLocaleNameProperty_fr">
-<%
-//This should be done in your action.  I do it here to keep the tests simple.
-	ActionMessages errors = new ActionMessages();
-    errors.add("someProperty",
-         new ActionMessage("alternate.testing.errors.tag"));
-    errors.add("someProperty",
-         new ActionMessage("alternate.testing.errors.tag2"));
-    request.setAttribute("MY_ERRORS_KEY", errors);
-%>
-	<bean:define id="EXPECTED_RESULTS" toScope="page">
-		My Errors go here:<html:errors locale="MY_LOCALE_KEY" bundle="alternate" name="MY_ERRORS_KEY" property="someProperty"/>
-	</bean:define>
-	<bean:define id="TEST_RESULTS" toScope="page">
-		My Errors go here:<alternate_errors_header_fr><alternate_errors_prefix_fr>My Alternate Errors Text (fr)<alternate_errors_suffix_fr><alternate_errors_prefix_fr>My Alternate Errors Text 2 (fr)<alternate_errors_suffix_fr><alternate_errors_footer_fr>
-	</bean:define>
-</logic:equal>
-
-
 
 <logic:equal name="runTest" value="testErrorsCustomResources">
-<%
-//This should be done in your action.  I do it here to keep the tests simple.
-	ActionMessages errors = new ActionMessages();
-    errors.add(ActionMessages.GLOBAL_MESSAGE,
-         new ActionMessage("default.testing.errors.tag"));
-    errors.add(ActionMessages.GLOBAL_MESSAGE,
-         new ActionMessage("default.testing.errors.tag2"));
-    request.setAttribute(Globals.ERROR_KEY, errors);
-%>
-	<bean:define id="EXPECTED_RESULTS" toScope="page">
-		My Errors go here:<html:errors header="custom.errors.header" footer="custom.errors.footer" prefix="custom.errors.prefix" suffix="custom.errors.suffix"/>
-	</bean:define>
-	<bean:define id="TEST_RESULTS" toScope="page">
-		My Errors go here:custom_error_header<custom_error_prefix>My Errors Text<custom_error_suffix><custom_error_prefix>My Errors Text 2<custom_error_suffix>custom_error_footer
-	</bean:define>
+    <%
+        //This should be done in your action.  I do it here to keep the tests simple.
+        ActionMessages errors = new ActionMessages();
+        errors.add(ActionMessages.GLOBAL_MESSAGE,
+                new ActionMessage("default.testing.errors.tag"));
+        errors.add(ActionMessages.GLOBAL_MESSAGE,
+                new ActionMessage("default.testing.errors.tag2"));
+        request.setAttribute(Globals.ERROR_KEY, errors);
+    %>
+    <bean:define id="EXPECTED_RESULTS" toScope="page">
+        My Errors go here:<html:errors header="custom.errors.header"
+                                       footer="custom.errors.footer"
+                                       prefix="custom.errors.prefix"
+                                       suffix="custom.errors.suffix"/>
+    </bean:define>
+    <bean:define id="TEST_RESULTS" toScope="page">
+        My Errors go here:custom_error_header<custom_error_prefix>My Errors
+        Text<custom_error_suffix><custom_error_prefix>My Errors Text
+        2<custom_error_suffix>custom_error_footer
+    </bean:define>
 </logic:equal>
 
 <logic:equal name="runTest" value="testErrorsCustomResourcesAltBundle">
-<%
-//This should be done in your action.  I do it here to keep the tests simple.
-	ActionMessages errors = new ActionMessages();
-    errors.add(ActionMessages.GLOBAL_MESSAGE,
-         new ActionMessage("alternate.testing.errors.tag"));
-    errors.add(ActionMessages.GLOBAL_MESSAGE,
-         new ActionMessage("alternate.testing.errors.tag2"));
-    request.setAttribute(Globals.ERROR_KEY, errors);
-%>
-	<bean:define id="EXPECTED_RESULTS" toScope="page">
-		My Errors go here:<html:errors bundle="alternate" header="custom.alternate.errors.header" footer="custom.alternate.errors.footer" prefix="custom.alternate.errors.prefix" suffix="custom.alternate.errors.suffix"/>
-	</bean:define>
-	<bean:define id="TEST_RESULTS" toScope="page">
-		My Errors go here:custom_alternate_error_header<custom_alternate_error_prefix>My Alternate Errors Text<custom_alternate_error_suffix><custom_alternate_error_prefix>My Alternate Errors Text 2<custom_alternate_error_suffix>custom_alternate_error_footer
-	</bean:define>
+    <%
+        //This should be done in your action.  I do it here to keep the tests simple.
+        ActionMessages errors = new ActionMessages();
+        errors.add(ActionMessages.GLOBAL_MESSAGE,
+                new ActionMessage("alternate.testing.errors.tag"));
+        errors.add(ActionMessages.GLOBAL_MESSAGE,
+                new ActionMessage("alternate.testing.errors.tag2"));
+        request.setAttribute(Globals.ERROR_KEY, errors);
+    %>
+    <bean:define id="EXPECTED_RESULTS" toScope="page">
+        My Errors go here:<html:errors bundle="alternate"
+                                       header="custom.alternate.errors.header"
+                                       footer="custom.alternate.errors.footer"
+                                       prefix="custom.alternate.errors.prefix"
+                                       suffix="custom.alternate.errors.suffix"/>
+    </bean:define>
+    <bean:define id="TEST_RESULTS" toScope="page">
+        My Errors go
+        here:custom_alternate_error_header<custom_alternate_error_prefix>My
+        Alternate Errors
+        Text<custom_alternate_error_suffix><custom_alternate_error_prefix>My
+        Alternate Errors Text
+        2<custom_alternate_error_suffix>custom_alternate_error_footer
+    </bean:define>
 </logic:equal>
 
 
+<%
+    String expected = "";
+    String compareTo = "";
 
-<% 
-String expected = "";
-String compareTo = "";
-
-if (pageContext.getAttribute("EXPECTED_RESULTS") == null){
-    throw new javax.servlet.jsp.JspException("No tests on this page were called.  Please verify that you've setup the tests correctly.");
-}else{
-	expected=pageContext.getAttribute("TEST_RESULTS").toString();
-}
-if (pageContext.getAttribute("TEST_RESULTS") != null){
-	compareTo=pageContext.getAttribute("EXPECTED_RESULTS").toString();
-}
+    if (pageContext.getAttribute("EXPECTED_RESULTS") == null) {
+        throw new javax.servlet.jsp.JspException(
+                "No tests on this page were called.  Please verify that you've setup the tests correctly.");
+    } else {
+        expected = pageContext.getAttribute("TEST_RESULTS").toString();
+    }
+    if (pageContext.getAttribute("TEST_RESULTS") != null) {
+        compareTo = pageContext.getAttribute("EXPECTED_RESULTS").toString();
+    }
 
-Assert.assertEquals(expected, compareTo);
+    Assert.assertEquals(expected, compareTo);
 %>

Modified: struts/taglib/trunk/src/webapp/org/apache/struts/taglib/html/TestFileTag1.jsp
URL: http://svn.apache.org/viewcvs/struts/taglib/trunk/src/webapp/org/apache/struts/taglib/html/TestFileTag1.jsp?rev=376852&r1=376851&r2=376852&view=diff
==============================================================================
--- struts/taglib/trunk/src/webapp/org/apache/struts/taglib/html/TestFileTag1.jsp (original)
+++ struts/taglib/trunk/src/webapp/org/apache/struts/taglib/html/TestFileTag1.jsp Fri Feb 10 13:08:44 2006
@@ -1,265 +1,286 @@
 <%@ page contentType="text/html;charset=UTF-8" language="java" %>
-<%@page import="junit.framework.Assert"%>
+<%@ page import="junit.framework.Assert" %>
 <%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %>
 <%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
 <%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>
 
 <logic:equal name="runTest" value="testFileProperty">
-	<bean:define id="TEST_RESULTS" toScope="page">
-		<html:file property="string"/>
-	</bean:define>
-	<bean:define id="EXPECTED_RESULTS" toScope="page">
-		<input type="file" name="string" value="Test Value">
-	</bean:define>
+    <bean:define id="TEST_RESULTS" toScope="page">
+        <html:file property="string"/>
+    </bean:define>
+    <bean:define id="EXPECTED_RESULTS" toScope="page">
+        <input type="file" name="string" value="Test Value">
+    </bean:define>
 </logic:equal>
- 
+
 <logic:equal name="runTest" value="testFilePropertyAccept">
-	<bean:define id="TEST_RESULTS" toScope="page">
-		<html:file property="string" accept="image/jpeg, image/gif"/>
-	</bean:define>
-	<bean:define id="EXPECTED_RESULTS" toScope="page">
-		<input type="file" name="string" accept="image/jpeg, image/gif" value="Test Value">
-	</bean:define>
+    <bean:define id="TEST_RESULTS" toScope="page">
+        <html:file property="string" accept="image/jpeg, image/gif"/>
+    </bean:define>
+    <bean:define id="EXPECTED_RESULTS" toScope="page">
+        <input type="file" name="string" accept="image/jpeg, image/gif"
+               value="Test Value">
+    </bean:define>
 </logic:equal>
 
 <logic:equal name="runTest" value="testFilePropertyAccesskey">
-	<bean:define id="TEST_RESULTS" toScope="page">
-		<html:file property="string" accesskey="a"/>
-	</bean:define>
-	<bean:define id="EXPECTED_RESULTS" toScope="page">
-		<input type="file" name="string" accesskey="a" value="Test Value">
-	</bean:define>
+    <bean:define id="TEST_RESULTS" toScope="page">
+        <html:file property="string" accesskey="a"/>
+    </bean:define>
+    <bean:define id="EXPECTED_RESULTS" toScope="page">
+        <input type="file" name="string" accesskey="a" value="Test Value">
+    </bean:define>
 </logic:equal>
 
 <logic:equal name="runTest" value="testFilePropertyAlt">
-	<bean:define id="TEST_RESULTS" toScope="page">
-		<html:file property="string" alt="Testing alt attribute"/>
-	</bean:define>
-	<bean:define id="EXPECTED_RESULTS" toScope="page">
-		<input type="file" name="string" value="Test Value" alt="Testing alt attribute">
-	</bean:define>
+    <bean:define id="TEST_RESULTS" toScope="page">
+        <html:file property="string" alt="Testing alt attribute"/>
+    </bean:define>
+    <bean:define id="EXPECTED_RESULTS" toScope="page">
+        <input type="file" name="string" value="Test Value"
+               alt="Testing alt attribute">
+    </bean:define>
 </logic:equal>
 
 <logic:equal name="runTest" value="testFilePropertyAltKey1">
-	<bean:define id="TEST_RESULTS" toScope="page">
-		<html:file property="string" altKey="default.bundle.message"/>
-	</bean:define>
-	<bean:define id="EXPECTED_RESULTS" toScope="page">
-		<input type="file" name="string" value="Test Value" alt="Testing Message">
-	</bean:define>
+    <bean:define id="TEST_RESULTS" toScope="page">
+        <html:file property="string" altKey="default.bundle.message"/>
+    </bean:define>
+    <bean:define id="EXPECTED_RESULTS" toScope="page">
+        <input type="file" name="string" value="Test Value"
+               alt="Testing Message">
+    </bean:define>
 </logic:equal>
 
 <logic:equal name="runTest" value="testFilePropertyAltKey2">
-	<bean:define id="TEST_RESULTS" toScope="page">
-		<html:file property="string" altKey="no.such.key"/>
-	</bean:define>
-	<bean:define id="EXPECTED_RESULTS" toScope="page">
-		<input type="file" name="string" value="Test Value">
-	</bean:define>
+    <bean:define id="TEST_RESULTS" toScope="page">
+        <html:file property="string" altKey="no.such.key"/>
+    </bean:define>
+    <bean:define id="EXPECTED_RESULTS" toScope="page">
+        <input type="file" name="string" value="Test Value">
+    </bean:define>
 </logic:equal>
 
 <logic:equal name="runTest" value="testFilePropertyAltKey3">
-	<bean:define id="TEST_RESULTS" toScope="page">
-		<html:file property="string" altKey="alternate.bundle.message" bundle="alternate"/>
-	</bean:define>
-	<bean:define id="EXPECTED_RESULTS" toScope="page">
-		<input type="file" name="string" value="Test Value" alt="Testing Message">
-	</bean:define>
+    <bean:define id="TEST_RESULTS" toScope="page">
+        <html:file property="string" altKey="alternate.bundle.message"
+                   bundle="alternate"/>
+    </bean:define>
+    <bean:define id="EXPECTED_RESULTS" toScope="page">
+        <input type="file" name="string" value="Test Value"
+               alt="Testing Message">
+    </bean:define>
 </logic:equal>
 
 <logic:equal name="runTest" value="testFilePropertyAltKey1_fr">
-	<bean:define id="TEST_RESULTS" toScope="page">
-		<html:file property="string" altKey="default.bundle.message"/>
-	</bean:define>
-	<bean:define id="EXPECTED_RESULTS" toScope="page">
-		<input type="file" name="string" value="Test Value" alt="Message D'Essai">
-	</bean:define>
+    <bean:define id="TEST_RESULTS" toScope="page">
+        <html:file property="string" altKey="default.bundle.message"/>
+    </bean:define>
+    <bean:define id="EXPECTED_RESULTS" toScope="page">
+        <input type="file" name="string" value="Test Value"
+               alt="Message D'Essai">
+    </bean:define>
 </logic:equal>
 
 <logic:equal name="runTest" value="testFilePropertyAltKey2_fr">
-	<bean:define id="TEST_RESULTS" toScope="page">
-		<html:file property="string" altKey="no.such.key"/>
-	</bean:define>
-	<bean:define id="EXPECTED_RESULTS" toScope="page">
-		<input type="file" name="string" value="Test Value">
-	</bean:define>
+    <bean:define id="TEST_RESULTS" toScope="page">
+        <html:file property="string" altKey="no.such.key"/>
+    </bean:define>
+    <bean:define id="EXPECTED_RESULTS" toScope="page">
+        <input type="file" name="string" value="Test Value">
+    </bean:define>
 </logic:equal>
 
 <logic:equal name="runTest" value="testFilePropertyDisabled_True">
-	<bean:define id="TEST_RESULTS" toScope="page">
-		<html:file property="string" disabled="true"/>
-	</bean:define>
-	<bean:define id="EXPECTED_RESULTS" toScope="page">
-		<input type="file" name="string" value="Test Value" disabled="disabled">
-	</bean:define>
+    <bean:define id="TEST_RESULTS" toScope="page">
+        <html:file property="string" disabled="true"/>
+    </bean:define>
+    <bean:define id="EXPECTED_RESULTS" toScope="page">
+        <input type="file" name="string" value="Test Value"
+               disabled="disabled">
+    </bean:define>
 </logic:equal>
 
 <logic:equal name="runTest" value="testFilePropertyDisabled_False1">
-	<bean:define id="TEST_RESULTS" toScope="page">
-		<html:file property="string" disabled="false"/>
-	</bean:define>
-	<bean:define id="EXPECTED_RESULTS" toScope="page">
-		<input type="file" name="string" value="Test Value">
-	</bean:define>
+    <bean:define id="TEST_RESULTS" toScope="page">
+        <html:file property="string" disabled="false"/>
+    </bean:define>
+    <bean:define id="EXPECTED_RESULTS" toScope="page">
+        <input type="file" name="string" value="Test Value">
+    </bean:define>
 </logic:equal>
 
 <logic:equal name="runTest" value="testFilePropertyDisabled_False2">
-	<!--  This was changed recently by overwhelming consensus.  The prior functionality
-	      was very counter-intuitive.  It used to be that putting disabled="false"
-	      was the same as putting disabled="true".  Craig sited the confusion is due
-	      to the HTML spec.
-	-->
-	<bean:define id="TEST_RESULTS" toScope="page">
-		<html:file property="string" disabled="anything but true"/>
-	</bean:define>
-	<bean:define id="EXPECTED_RESULTS" toScope="page">
-		<input type="file" name="string" value="Test Value">
-	</bean:define>
+    <!-- This was changed recently by overwhelming consensus. The prior
+    functionality
+    was very counter-intuitive. It used to be that putting disabled="false"
+    was the same as putting disabled="true". Craig sited the confusion is due
+    to the HTML spec.
+    -->
+    <bean:define id="TEST_RESULTS" toScope="page">
+        <html:file property="string" disabled="anything but true"/>
+    </bean:define>
+    <bean:define id="EXPECTED_RESULTS" toScope="page">
+        <input type="file" name="string" value="Test Value">
+    </bean:define>
 </logic:equal>
 
 <logic:equal name="runTest" value="testFilePropertyOnblur">
-	<bean:define id="TEST_RESULTS" toScope="page">
-		<html:file property="string" onblur="Put script here"/>
-	</bean:define>
-	<bean:define id="EXPECTED_RESULTS" toScope="page">
-		<input type="file" name="string" value="Test Value" onblur="Put script here">
-	</bean:define>
+    <bean:define id="TEST_RESULTS" toScope="page">
+        <html:file property="string" onblur="Put script here"/>
+    </bean:define>
+    <bean:define id="EXPECTED_RESULTS" toScope="page">
+        <input type="file" name="string" value="Test Value"
+               onblur="Put script here">
+    </bean:define>
 </logic:equal>
 
 
-
 <logic:equal name="runTest" value="testFilePropertyOnchange">
-	<bean:define id="TEST_RESULTS" toScope="page">
-		<html:file property="string" onchange="Put script here"/>
-	</bean:define>
-	<bean:define id="EXPECTED_RESULTS" toScope="page">
-		<input type="file" name="string" value="Test Value" onchange="Put script here">
-	</bean:define>
+    <bean:define id="TEST_RESULTS" toScope="page">
+        <html:file property="string" onchange="Put script here"/>
+    </bean:define>
+    <bean:define id="EXPECTED_RESULTS" toScope="page">
+        <input type="file" name="string" value="Test Value"
+               onchange="Put script here">
+    </bean:define>
 </logic:equal>
 
 
 <logic:equal name="runTest" value="testFilePropertyOnclick">
-	<bean:define id="TEST_RESULTS" toScope="page">
-		<html:file property="string" onclick="Put script here"/>
-	</bean:define>
-	<bean:define id="EXPECTED_RESULTS" toScope="page">
-		<input type="file" name="string" value="Test Value" onclick="Put script here">
-	</bean:define>
+    <bean:define id="TEST_RESULTS" toScope="page">
+        <html:file property="string" onclick="Put script here"/>
+    </bean:define>
+    <bean:define id="EXPECTED_RESULTS" toScope="page">
+        <input type="file" name="string" value="Test Value"
+               onclick="Put script here">
+    </bean:define>
 </logic:equal>
 
 
 <logic:equal name="runTest" value="testFilePropertyOndblclick">
-	<bean:define id="TEST_RESULTS" toScope="page">
-		<html:file property="string" ondblclick="Put script here"/>
-	</bean:define>
-	<bean:define id="EXPECTED_RESULTS" toScope="page">
-		<input type="file" name="string" value="Test Value" ondblclick="Put script here">
-	</bean:define>
+    <bean:define id="TEST_RESULTS" toScope="page">
+        <html:file property="string" ondblclick="Put script here"/>
+    </bean:define>
+    <bean:define id="EXPECTED_RESULTS" toScope="page">
+        <input type="file" name="string" value="Test Value"
+               ondblclick="Put script here">
+    </bean:define>
 </logic:equal>
 
 
 <logic:equal name="runTest" value="testFilePropertyOnfocus">
-	<bean:define id="TEST_RESULTS" toScope="page">
-		<html:file property="string" onfocus="Put script here"/>
-	</bean:define>
-	<bean:define id="EXPECTED_RESULTS" toScope="page">
-		<input type="file" name="string" value="Test Value" onfocus="Put script here">
-	</bean:define>
+    <bean:define id="TEST_RESULTS" toScope="page">
+        <html:file property="string" onfocus="Put script here"/>
+    </bean:define>
+    <bean:define id="EXPECTED_RESULTS" toScope="page">
+        <input type="file" name="string" value="Test Value"
+               onfocus="Put script here">
+    </bean:define>
 </logic:equal>
 
 
 <logic:equal name="runTest" value="testFilePropertyOnkeydown">
-	<bean:define id="TEST_RESULTS" toScope="page">
-		<html:file property="string" onkeydown="Put script here"/>
-	</bean:define>
-	<bean:define id="EXPECTED_RESULTS" toScope="page">
-		<input type="file" name="string" value="Test Value" onkeydown="Put script here">
-	</bean:define>
+    <bean:define id="TEST_RESULTS" toScope="page">
+        <html:file property="string" onkeydown="Put script here"/>
+    </bean:define>
+    <bean:define id="EXPECTED_RESULTS" toScope="page">
+        <input type="file" name="string" value="Test Value"
+               onkeydown="Put script here">
+    </bean:define>
 </logic:equal>
 
 
 <logic:equal name="runTest" value="testFilePropertyOnkeypress">
-	<bean:define id="TEST_RESULTS" toScope="page">
-		<html:file property="string" onkeypress="Put script here"/>
-	</bean:define>
-	<bean:define id="EXPECTED_RESULTS" toScope="page">
-		<input type="file" name="string" value="Test Value" onkeypress="Put script here">
-	</bean:define>
+    <bean:define id="TEST_RESULTS" toScope="page">
+        <html:file property="string" onkeypress="Put script here"/>
+    </bean:define>
+    <bean:define id="EXPECTED_RESULTS" toScope="page">
+        <input type="file" name="string" value="Test Value"
+               onkeypress="Put script here">
+    </bean:define>
 </logic:equal>
 
 
 <logic:equal name="runTest" value="testFilePropertyOnkeyup">
-	<bean:define id="TEST_RESULTS" toScope="page">
-		<html:file property="string" onkeyup="Put script here"/>
-	</bean:define>
-	<bean:define id="EXPECTED_RESULTS" toScope="page">
-		<input type="file" name="string" value="Test Value" onkeyup="Put script here">
-	</bean:define>
+    <bean:define id="TEST_RESULTS" toScope="page">
+        <html:file property="string" onkeyup="Put script here"/>
+    </bean:define>
+    <bean:define id="EXPECTED_RESULTS" toScope="page">
+        <input type="file" name="string" value="Test Value"
+               onkeyup="Put script here">
+    </bean:define>
 </logic:equal>
 
 
 <logic:equal name="runTest" value="testFilePropertyOnmousedown">
-	<bean:define id="TEST_RESULTS" toScope="page">
-		<html:file property="string" onmousedown="Put script here"/>
-	</bean:define>
-	<bean:define id="EXPECTED_RESULTS" toScope="page">
-		<input type="file" name="string" value="Test Value" onmousedown="Put script here">
-	</bean:define>
+    <bean:define id="TEST_RESULTS" toScope="page">
+        <html:file property="string" onmousedown="Put script here"/>
+    </bean:define>
+    <bean:define id="EXPECTED_RESULTS" toScope="page">
+        <input type="file" name="string" value="Test Value"
+               onmousedown="Put script here">
+    </bean:define>
 </logic:equal>
 
 
 <logic:equal name="runTest" value="testFilePropertyOnmousemove">
-	<bean:define id="TEST_RESULTS" toScope="page">
-		<html:file property="string" onmousemove="Put script here"/>
-	</bean:define>
-	<bean:define id="EXPECTED_RESULTS" toScope="page">
-		<input type="file" name="string" value="Test Value" onmousemove="Put script here">
-	</bean:define>
+    <bean:define id="TEST_RESULTS" toScope="page">
+        <html:file property="string" onmousemove="Put script here"/>
+    </bean:define>
+    <bean:define id="EXPECTED_RESULTS" toScope="page">
+        <input type="file" name="string" value="Test Value"
+               onmousemove="Put script here">
+    </bean:define>
 </logic:equal>
 
 
 <logic:equal name="runTest" value="testFilePropertyOnmouseout">
-	<bean:define id="TEST_RESULTS" toScope="page">
-		<html:file property="string" onmouseout="Put script here"/>
-	</bean:define>
-	<bean:define id="EXPECTED_RESULTS" toScope="page">
-		<input type="file" name="string" value="Test Value" onmouseout="Put script here">
-	</bean:define>
+    <bean:define id="TEST_RESULTS" toScope="page">
+        <html:file property="string" onmouseout="Put script here"/>
+    </bean:define>
+    <bean:define id="EXPECTED_RESULTS" toScope="page">
+        <input type="file" name="string" value="Test Value"
+               onmouseout="Put script here">
+    </bean:define>
 </logic:equal>
 
 
 <logic:equal name="runTest" value="testFilePropertyOnmouseover">
-	<bean:define id="TEST_RESULTS" toScope="page">
-		<html:file property="string" onmouseover="Put script here"/>
-	</bean:define>
-	<bean:define id="EXPECTED_RESULTS" toScope="page">
-		<input type="file" name="string" value="Test Value" onmouseover="Put script here">
-	</bean:define>
+    <bean:define id="TEST_RESULTS" toScope="page">
+        <html:file property="string" onmouseover="Put script here"/>
+    </bean:define>
+    <bean:define id="EXPECTED_RESULTS" toScope="page">
+        <input type="file" name="string" value="Test Value"
+               onmouseover="Put script here">
+    </bean:define>
 </logic:equal>
 
 
 <logic:equal name="runTest" value="testFilePropertyOnmouseup">
-	<bean:define id="TEST_RESULTS" toScope="page">
-		<html:file property="string" onmouseup="Put script here"/>
-	</bean:define>
-	<bean:define id="EXPECTED_RESULTS" toScope="page">
-		<input type="file" name="string" value="Test Value" onmouseup="Put script here">
-	</bean:define>
+    <bean:define id="TEST_RESULTS" toScope="page">
+        <html:file property="string" onmouseup="Put script here"/>
+    </bean:define>
+    <bean:define id="EXPECTED_RESULTS" toScope="page">
+        <input type="file" name="string" value="Test Value"
+               onmouseup="Put script here">
+    </bean:define>
 </logic:equal>
 
 
-<% 
-String expected = "";
-String compareTo = "";
-
-if (pageContext.getAttribute("EXPECTED_RESULTS") == null){
-    throw new javax.servlet.jsp.JspException("No tests on this page were called.  Please verify that you've setup the tests correctly.");
-}else{
-	expected=pageContext.getAttribute("TEST_RESULTS").toString();
-}
-if (pageContext.getAttribute("TEST_RESULTS") != null){
-	compareTo=pageContext.getAttribute("EXPECTED_RESULTS").toString();
-}
+<%
+    String expected = "";
+    String compareTo = "";
+
+    if (pageContext.getAttribute("EXPECTED_RESULTS") == null) {
+        throw new javax.servlet.jsp.JspException(
+                "No tests on this page were called.  Please verify that you've setup the tests correctly.");
+    } else {
+        expected = pageContext.getAttribute("TEST_RESULTS").toString();
+    }
+    if (pageContext.getAttribute("TEST_RESULTS") != null) {
+        compareTo = pageContext.getAttribute("EXPECTED_RESULTS").toString();
+    }
 
-Assert.assertEquals(expected, compareTo);
+    Assert.assertEquals(expected, compareTo);
 %>

Modified: struts/taglib/trunk/src/webapp/org/apache/struts/taglib/html/TestFileTag2.jsp
URL: http://svn.apache.org/viewcvs/struts/taglib/trunk/src/webapp/org/apache/struts/taglib/html/TestFileTag2.jsp?rev=376852&r1=376851&r2=376852&view=diff
==============================================================================
--- struts/taglib/trunk/src/webapp/org/apache/struts/taglib/html/TestFileTag2.jsp (original)
+++ struts/taglib/trunk/src/webapp/org/apache/struts/taglib/html/TestFileTag2.jsp Fri Feb 10 13:08:44 2006
@@ -1,8 +1,8 @@
 <%@ page contentType="text/html;charset=UTF-8" language="java" %>
-<%@page import="junit.framework.Assert"%>
-<%@page import="org.apache.struts.Globals"%>
-<%@page import="org.apache.struts.action.ActionMessage"%>
-<%@page import="org.apache.struts.action.ActionMessages"%>
+<%@ page import="junit.framework.Assert" %>
+<%@ page import="org.apache.struts.Globals" %>
+<%@ page import="org.apache.struts.action.ActionMessage" %>
+<%@ page import="org.apache.struts.action.ActionMessages" %>
 
 <%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %>
 <%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
@@ -10,252 +10,278 @@
 
 
 <logic:equal name="runTest" value="testFilePropertyStyle">
-	<bean:define id="TEST_RESULTS" toScope="page">
-		<html:file property="string" style="Put something here" errorStyle="some error style"/>
-	</bean:define>
-	<bean:define id="EXPECTED_RESULTS" toScope="page">
-		<input type="file" name="string" value="Test Value" style="Put something here">
-	</bean:define>
+    <bean:define id="TEST_RESULTS" toScope="page">
+        <html:file property="string" style="Put something here"
+                   errorStyle="some error style"/>
+    </bean:define>
+    <bean:define id="EXPECTED_RESULTS" toScope="page">
+        <input type="file" name="string" value="Test Value"
+               style="Put something here">
+    </bean:define>
 </logic:equal>
 
 <logic:equal name="runTest" value="testFilePropertyErrorStyle">
-<%
-    ActionMessages errors = new ActionMessages();
-    errors.add("string",
-         new ActionMessage("default.testing.errors.tag"));
-    request.setAttribute(Globals.ERROR_KEY, errors);
-%>
-	<bean:define id="TEST_RESULTS" toScope="page">
-		<html:file property="string" style="Put something here" errorStyle="some error style"/>
-	</bean:define>
-	<bean:define id="EXPECTED_RESULTS" toScope="page">
-		<input type="file" name="string" value="Test Value" style="some error style">
-	</bean:define>
+    <%
+        ActionMessages errors = new ActionMessages();
+        errors.add("string",
+                new ActionMessage("default.testing.errors.tag"));
+        request.setAttribute(Globals.ERROR_KEY, errors);
+    %>
+    <bean:define id="TEST_RESULTS" toScope="page">
+        <html:file property="string" style="Put something here"
+                   errorStyle="some error style"/>
+    </bean:define>
+    <bean:define id="EXPECTED_RESULTS" toScope="page">
+        <input type="file" name="string" value="Test Value"
+               style="some error style">
+    </bean:define>
 </logic:equal>
 
 <logic:equal name="runTest" value="testFilePropertyStyleClass">
-	<bean:define id="TEST_RESULTS" toScope="page">
-		<html:file property="string" styleClass="Put something here" errorStyleClass="some error style class"/>
-	</bean:define>
-	<bean:define id="EXPECTED_RESULTS" toScope="page">
-		<input type="file" name="string" value="Test Value" class="Put something here">
-	</bean:define>
+    <bean:define id="TEST_RESULTS" toScope="page">
+        <html:file property="string" styleClass="Put something here"
+                   errorStyleClass="some error style class"/>
+    </bean:define>
+    <bean:define id="EXPECTED_RESULTS" toScope="page">
+        <input type="file" name="string" value="Test Value"
+               class="Put something here">
+    </bean:define>
 </logic:equal>
 
 <logic:equal name="runTest" value="testFilePropertyErrorStyleClass">
-<%
-    ActionMessages errors = new ActionMessages();
-    errors.add("string",
-         new ActionMessage("default.testing.errors.tag"));
-    request.setAttribute(Globals.ERROR_KEY, errors);
-%>
-	<bean:define id="TEST_RESULTS" toScope="page">
-		<html:file property="string" styleClass="Put something here" errorStyleClass="some error style class"/>
-	</bean:define>
-	<bean:define id="EXPECTED_RESULTS" toScope="page">
-		<input type="file" name="string" value="Test Value" class="some error style class">
-	</bean:define>
+    <%
+        ActionMessages errors = new ActionMessages();
+        errors.add("string",
+                new ActionMessage("default.testing.errors.tag"));
+        request.setAttribute(Globals.ERROR_KEY, errors);
+    %>
+    <bean:define id="TEST_RESULTS" toScope="page">
+        <html:file property="string" styleClass="Put something here"
+                   errorStyleClass="some error style class"/>
+    </bean:define>
+    <bean:define id="EXPECTED_RESULTS" toScope="page">
+        <input type="file" name="string" value="Test Value"
+               class="some error style class">
+    </bean:define>
 </logic:equal>
 
 <logic:equal name="runTest" value="testFilePropertyStyleId">
-	<bean:define id="TEST_RESULTS" toScope="page">
-		<html:file property="string" styleId="Put something here" errorStyleId="some error style id"/>
-	</bean:define>
-	<bean:define id="EXPECTED_RESULTS" toScope="page">
-		<input type="file" name="string" value="Test Value" id="Put something here">
-	</bean:define>
+    <bean:define id="TEST_RESULTS" toScope="page">
+        <html:file property="string" styleId="Put something here"
+                   errorStyleId="some error style id"/>
+    </bean:define>
+    <bean:define id="EXPECTED_RESULTS" toScope="page">
+        <input type="file" name="string" value="Test Value"
+               id="Put something here">
+    </bean:define>
 </logic:equal>
 
 <logic:equal name="runTest" value="testFilePropertyErrorStyleId">
-<%
-    ActionMessages errors = new ActionMessages();
-    errors.add("string",
-         new ActionMessage("default.testing.errors.tag"));
-    request.setAttribute(Globals.ERROR_KEY, errors);
-%>
-	<bean:define id="TEST_RESULTS" toScope="page">
-		<html:file property="string" styleId="Put something here" errorStyleId="some error style id"/>
-	</bean:define>
-	<bean:define id="EXPECTED_RESULTS" toScope="page">
-		<input type="file" name="string" value="Test Value" id="some error style id">
-	</bean:define>
+    <%
+        ActionMessages errors = new ActionMessages();
+        errors.add("string",
+                new ActionMessage("default.testing.errors.tag"));
+        request.setAttribute(Globals.ERROR_KEY, errors);
+    %>
+    <bean:define id="TEST_RESULTS" toScope="page">
+        <html:file property="string" styleId="Put something here"
+                   errorStyleId="some error style id"/>
+    </bean:define>
+    <bean:define id="EXPECTED_RESULTS" toScope="page">
+        <input type="file" name="string" value="Test Value"
+               id="some error style id">
+    </bean:define>
 </logic:equal>
 
 <logic:equal name="runTest" value="testFilePropertyTabindex">
-	<bean:define id="TEST_RESULTS" toScope="page">
-		<html:file property="string" tabindex="Put something here"/>
-	</bean:define>
-	<bean:define id="EXPECTED_RESULTS" toScope="page">
-		<input type="file" name="string" tabindex="Put something here" value="Test Value">
-	</bean:define>
+    <bean:define id="TEST_RESULTS" toScope="page">
+        <html:file property="string" tabindex="Put something here"/>
+    </bean:define>
+    <bean:define id="EXPECTED_RESULTS" toScope="page">
+        <input type="file" name="string" tabindex="Put something here"
+               value="Test Value">
+    </bean:define>
 </logic:equal>
 
 <logic:equal name="runTest" value="testFilePropertyTitle">
-	<bean:define id="TEST_RESULTS" toScope="page">
-		<html:file property="string" title="Put something here"/>
-	</bean:define>
-	<bean:define id="EXPECTED_RESULTS" toScope="page">
-		<input type="file" name="string" value="Test Value" title="Put something here">
-	</bean:define>
+    <bean:define id="TEST_RESULTS" toScope="page">
+        <html:file property="string" title="Put something here"/>
+    </bean:define>
+    <bean:define id="EXPECTED_RESULTS" toScope="page">
+        <input type="file" name="string" value="Test Value"
+               title="Put something here">
+    </bean:define>
 </logic:equal>
 
 <logic:equal name="runTest" value="testFilePropertyTitleKey">
-	<bean:define id="TEST_RESULTS" toScope="page">
-		<html:file property="string" titleKey="default.bundle.message"/>
-	</bean:define>
-	<bean:define id="EXPECTED_RESULTS" toScope="page">
-		<input type="file" name="string" value="Test Value" title="Testing Message">
-	</bean:define>
+    <bean:define id="TEST_RESULTS" toScope="page">
+        <html:file property="string" titleKey="default.bundle.message"/>
+    </bean:define>
+    <bean:define id="EXPECTED_RESULTS" toScope="page">
+        <input type="file" name="string" value="Test Value"
+               title="Testing Message">
+    </bean:define>
 </logic:equal>
 
 <logic:equal name="runTest" value="testFilePropertyTitleKey_fr">
-	<bean:define id="TEST_RESULTS" toScope="page">
-		<html:file property="string" titleKey="default.bundle.message"/>
-	</bean:define>
-	<bean:define id="EXPECTED_RESULTS" toScope="page">
-		<input type="file" name="string" value="Test Value" title="Message D'Essai">
-	</bean:define>
+    <bean:define id="TEST_RESULTS" toScope="page">
+        <html:file property="string" titleKey="default.bundle.message"/>
+    </bean:define>
+    <bean:define id="EXPECTED_RESULTS" toScope="page">
+        <input type="file" name="string" value="Test Value"
+               title="Message D'Essai">
+    </bean:define>
 </logic:equal>
 
 <logic:equal name="runTest" value="testFilePropertyValue">
-	<bean:define id="TEST_RESULTS" toScope="page">
-		<html:file property="string" value ="Put something here"/>
-	</bean:define>
-	<bean:define id="EXPECTED_RESULTS" toScope="page">
-		<input type="file" name="string" value="Put something here">
-	</bean:define>
+    <bean:define id="TEST_RESULTS" toScope="page">
+        <html:file property="string" value="Put something here"/>
+    </bean:define>
+    <bean:define id="EXPECTED_RESULTS" toScope="page">
+        <input type="file" name="string" value="Put something here">
+    </bean:define>
 </logic:equal>
 
 
 <logic:equal name="runTest" value="testFilePropertyBodyContent">
-	<bean:define id="TEST_RESULTS" toScope="page">
-		<html:file property="string">File Value Here</html:file>
-	</bean:define>
-	<bean:define id="EXPECTED_RESULTS" toScope="page">
-		<input type="file" name="string" value="Test Value">
-	</bean:define>
+    <bean:define id="TEST_RESULTS" toScope="page">
+        <html:file property="string">File Value Here</html:file>
+    </bean:define>
+    <bean:define id="EXPECTED_RESULTS" toScope="page">
+        <input type="file" name="string" value="Test Value">
+    </bean:define>
 </logic:equal>
 
 
 <logic:equal name="runTest" value="testFilePropertyBodyContentMessageKey">
-	<bean:define id="TEST_RESULTS" toScope="page">
-		<html:file property="string">
-			<bean:message key="default.bundle.message"/>
-		</html:file>
-	</bean:define>
-	<bean:define id="EXPECTED_RESULTS" toScope="page">
-		<input type="file" name="string" value="Test Value">
-	</bean:define>
+    <bean:define id="TEST_RESULTS" toScope="page">
+        <html:file property="string">
+            <bean:message key="default.bundle.message"/>
+        </html:file>
+    </bean:define>
+    <bean:define id="EXPECTED_RESULTS" toScope="page">
+        <input type="file" name="string" value="Test Value">
+    </bean:define>
 </logic:equal>
 
 
 <logic:equal name="runTest" value="testFilePropertyBodyContentMessageKey_fr">
-	<bean:define id="TEST_RESULTS" toScope="page">
-		<html:file property="string">
-			<bean:message key="default.bundle.message"/>
-		</html:file>
-	</bean:define>
-	<bean:define id="EXPECTED_RESULTS" toScope="page">
-		<input type="file" name="string" value="Test Value">
-	</bean:define>
+    <bean:define id="TEST_RESULTS" toScope="page">
+        <html:file property="string">
+            <bean:message key="default.bundle.message"/>
+        </html:file>
+    </bean:define>
+    <bean:define id="EXPECTED_RESULTS" toScope="page">
+        <input type="file" name="string" value="Test Value">
+    </bean:define>
 </logic:equal>
 
 
 <logic:equal name="runTest" value="testFilePropertyIndexedArray">
-	<bean:define id="TEST_RESULTS" toScope="page">
-	  <logic:iterate id="indivItem" name="lst">
-		<html:file property="string" indexed="true"/>
-	  </logic:iterate>
-	</bean:define>
-	<bean:define id="EXPECTED_RESULTS" toScope="page">
-	
-		<input type="file" name="org.apache.struts.taglib.html.BEAN[0].string" value="Test Value">
-		
-	</bean:define>
+    <bean:define id="TEST_RESULTS" toScope="page">
+        <logic:iterate id="indivItem" name="lst">
+            <html:file property="string" indexed="true"/>
+        </logic:iterate>
+    </bean:define>
+    <bean:define id="EXPECTED_RESULTS" toScope="page">
+
+        <input type="file" name="org.apache.struts.taglib.html.BEAN[0].string"
+               value="Test Value">
+
+    </bean:define>
 </logic:equal>
 
 <logic:equal name="runTest" value="testFilePropertyIndexedArrayProperty">
-	<bean:define id="TEST_RESULTS" toScope="page">
-	  <logic:iterate id="indivItem" name="lst" property="list">
-		<html:file property="string" indexed="true"/>
-	  </logic:iterate>
-	</bean:define>
-	<bean:define id="EXPECTED_RESULTS" toScope="page">
-	
-		<input type="file" name="org.apache.struts.taglib.html.BEAN[0].string" value="Test Value">
-		
-	</bean:define>
+    <bean:define id="TEST_RESULTS" toScope="page">
+        <logic:iterate id="indivItem" name="lst" property="list">
+            <html:file property="string" indexed="true"/>
+        </logic:iterate>
+    </bean:define>
+    <bean:define id="EXPECTED_RESULTS" toScope="page">
+
+        <input type="file" name="org.apache.struts.taglib.html.BEAN[0].string"
+               value="Test Value">
+
+    </bean:define>
 </logic:equal>
 
 <logic:equal name="runTest" value="testFilePropertyIndexedMap">
-	<bean:define id="TEST_RESULTS" toScope="page">
-	  <logic:iterate id="indivItem" name="lst">
-		<html:file property="string" indexed="true"/>
-	  </logic:iterate>
-	</bean:define>
-	<bean:define id="EXPECTED_RESULTS" toScope="page">
-	
-		<input type="file" name="org.apache.struts.taglib.html.BEAN[0].string" value="Test Value">
-		
-	</bean:define>
+    <bean:define id="TEST_RESULTS" toScope="page">
+        <logic:iterate id="indivItem" name="lst">
+            <html:file property="string" indexed="true"/>
+        </logic:iterate>
+    </bean:define>
+    <bean:define id="EXPECTED_RESULTS" toScope="page">
+
+        <input type="file" name="org.apache.struts.taglib.html.BEAN[0].string"
+               value="Test Value">
+
+    </bean:define>
 </logic:equal>
 
 <logic:equal name="runTest" value="testFilePropertyIndexedMapProperty">
-	<bean:define id="TEST_RESULTS" toScope="page">
-	  <logic:iterate id="indivItem" name="lst" property="map">
-		<html:file property="string" indexed="true"/>
-	  </logic:iterate>
-	</bean:define>
-	<bean:define id="EXPECTED_RESULTS" toScope="page">
-	
-		<input type="file" name="org.apache.struts.taglib.html.BEAN[0].string" value="Test Value">
-		
-	</bean:define>
+    <bean:define id="TEST_RESULTS" toScope="page">
+        <logic:iterate id="indivItem" name="lst" property="map">
+            <html:file property="string" indexed="true"/>
+        </logic:iterate>
+    </bean:define>
+    <bean:define id="EXPECTED_RESULTS" toScope="page">
+
+        <input type="file" name="org.apache.struts.taglib.html.BEAN[0].string"
+               value="Test Value">
+
+    </bean:define>
 </logic:equal>
 
 <logic:equal name="runTest" value="testFilePropertyIndexedEnumeration">
-	<bean:define id="TEST_RESULTS" toScope="page">
-	<logic:iterate id="indivItem" name="lst">
-		<html:file property="string" indexed="true"/>
-	</logic:iterate>
-	</bean:define>
-	<bean:define id="EXPECTED_RESULTS" toScope="page">
-	
-		<input type="file" name="org.apache.struts.taglib.html.BEAN[0].string" value="Test Value">
-	
-		<input type="file" name="org.apache.struts.taglib.html.BEAN[1].string" value="Test Value">
-	
-	</bean:define>
-</logic:equal>
-
-<logic:equal name="runTest" value="testFilePropertyIndexedEnumerationProperty">
-	<bean:define id="TEST_RESULTS" toScope="page">
-	<logic:iterate id="indivItem" name="lst" property="enumeration">
-		<html:file property="string" indexed="true"/>
-	</logic:iterate>
-	</bean:define>
-	<bean:define id="EXPECTED_RESULTS" toScope="page">
-	
-		<input type="file" name="org.apache.struts.taglib.html.BEAN[0].string" value="Test Value">
-	
-		<input type="file" name="org.apache.struts.taglib.html.BEAN[1].string" value="Test Value">
-	
-	</bean:define>
+    <bean:define id="TEST_RESULTS" toScope="page">
+        <logic:iterate id="indivItem" name="lst">
+            <html:file property="string" indexed="true"/>
+        </logic:iterate>
+    </bean:define>
+    <bean:define id="EXPECTED_RESULTS" toScope="page">
+
+        <input type="file" name="org.apache.struts.taglib.html.BEAN[0].string"
+               value="Test Value">
+
+        <input type="file" name="org.apache.struts.taglib.html.BEAN[1].string"
+               value="Test Value">
+
+    </bean:define>
+</logic:equal>
+
+<logic:equal name="runTest"
+             value="testFilePropertyIndexedEnumerationProperty">
+    <bean:define id="TEST_RESULTS" toScope="page">
+        <logic:iterate id="indivItem" name="lst" property="enumeration">
+            <html:file property="string" indexed="true"/>
+        </logic:iterate>
+    </bean:define>
+    <bean:define id="EXPECTED_RESULTS" toScope="page">
+
+        <input type="file" name="org.apache.struts.taglib.html.BEAN[0].string"
+               value="Test Value">
+
+        <input type="file" name="org.apache.struts.taglib.html.BEAN[1].string"
+               value="Test Value">
+
+    </bean:define>
 </logic:equal>
 
 
-<% 
-String expected = "";
-String compareTo = "";
-
-if (pageContext.getAttribute("EXPECTED_RESULTS") == null){
-    throw new javax.servlet.jsp.JspException("No tests on this page were called.  Please verify that you've setup the tests correctly.");
-}else{
-	expected=pageContext.getAttribute("TEST_RESULTS").toString();
-}
-if (pageContext.getAttribute("TEST_RESULTS") != null){
-	compareTo=pageContext.getAttribute("EXPECTED_RESULTS").toString();
-}
+<%
+    String expected = "";
+    String compareTo = "";
+
+    if (pageContext.getAttribute("EXPECTED_RESULTS") == null) {
+        throw new javax.servlet.jsp.JspException(
+                "No tests on this page were called.  Please verify that you've setup the tests correctly.");
+    } else {
+        expected = pageContext.getAttribute("TEST_RESULTS").toString();
+    }
+    if (pageContext.getAttribute("TEST_RESULTS") != null) {
+        compareTo = pageContext.getAttribute("EXPECTED_RESULTS").toString();
+    }
 
-Assert.assertEquals(expected, compareTo);
+    Assert.assertEquals(expected, compareTo);
 %>

Modified: struts/taglib/trunk/src/webapp/org/apache/struts/taglib/html/TestFormTag1.jsp
URL: http://svn.apache.org/viewcvs/struts/taglib/trunk/src/webapp/org/apache/struts/taglib/html/TestFormTag1.jsp?rev=376852&r1=376851&r2=376852&view=diff
==============================================================================
--- struts/taglib/trunk/src/webapp/org/apache/struts/taglib/html/TestFormTag1.jsp (original)
+++ struts/taglib/trunk/src/webapp/org/apache/struts/taglib/html/TestFormTag1.jsp Fri Feb 10 13:08:44 2006
@@ -1,230 +1,258 @@
 <%@ page contentType="text/html;charset=UTF-8" language="java" %>
-<%@ page import="org.apache.struts.taglib.TaglibTestBase"%>
-<%@ page import="org.apache.oro.text.perl.Perl5Util"%>
+<%@ page import="org.apache.struts.taglib.TaglibTestBase" %>
 <%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %>
 <%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
 <%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>
 
 
 <logic:equal name="runTest" value="testFormAction">
-	<bean:define id="TEST_RESULTS" toScope="page">
-		<html:form action="/testFormTag">
-		</html:form>
-	</bean:define>
-	<bean:define id="EXPECTED_RESULTS" toScope="page">
-		<form name="testFormBean" method="post" action="<%=response.encodeURL( request.getContextPath() + "/testFormTag.do")%>">
-		</form>
-	</bean:define>
+    <bean:define id="TEST_RESULTS" toScope="page">
+        <html:form action="/testFormTag">
+        </html:form>
+    </bean:define>
+    <bean:define id="EXPECTED_RESULTS" toScope="page">
+        <form name="testFormBean" method="post"
+              action="<%=response.encodeURL( request.getContextPath() + "/testFormTag.do")%>">
+        </form>
+    </bean:define>
 </logic:equal>
 
 
 <logic:equal name="runTest" value="testFormActionEnctype">
-	<bean:define id="TEST_RESULTS" toScope="page">
-		<html:form action="/testFormTag" enctype="multipart/form-data">
-		</html:form>
-	</bean:define>
-	<bean:define id="EXPECTED_RESULTS" toScope="page">
-		<form name="testFormBean" method="post" action="<%=response.encodeURL( request.getContextPath() + "/testFormTag.do")%>" enctype="multipart/form-data">
-		</form>
-	</bean:define>
+    <bean:define id="TEST_RESULTS" toScope="page">
+        <html:form action="/testFormTag" enctype="multipart/form-data">
+        </html:form>
+    </bean:define>
+    <bean:define id="EXPECTED_RESULTS" toScope="page">
+        <form name="testFormBean" method="post"
+              action="<%=response.encodeURL( request.getContextPath() + "/testFormTag.do")%>"
+              enctype="multipart/form-data">
+        </form>
+    </bean:define>
 </logic:equal>
- 
+
 <logic:equal name="runTest" value="testFormActionAcceptCharset">
-	<bean:define id="TEST_RESULTS" toScope="page">
-		<html:form action="/testFormTag" acceptCharset="UTF-8">
-		</html:form>
-	</bean:define>
-	<bean:define id="EXPECTED_RESULTS" toScope="page">
-		<form name="testFormBean" method="post" action="<%=response.encodeURL( request.getContextPath() + "/testFormTag.do")%>" accept-charset="UTF-8">
-		</form>
-	</bean:define>
+    <bean:define id="TEST_RESULTS" toScope="page">
+        <html:form action="/testFormTag" acceptCharset="UTF-8">
+        </html:form>
+    </bean:define>
+    <bean:define id="EXPECTED_RESULTS" toScope="page">
+        <form name="testFormBean" method="post"
+              action="<%=response.encodeURL( request.getContextPath() + "/testFormTag.do")%>"
+              accept-charset="UTF-8">
+        </form>
+    </bean:define>
 </logic:equal>
 
 <logic:equal name="runTest" value="testFormActionFocus">
-	<bean:define id="TEST_RESULTS" toScope="page">
-		<html:form action="/testFormTag" focus="string">
-		</html:form>
-	</bean:define>
-	<bean:define id="EXPECTED_RESULTS" toScope="page">
-		<form name="testFormBean" method="post" action="<%=response.encodeURL( request.getContextPath() + "/testFormTag.do")%>">
-		</form>
-<script type="text/javascript" language="JavaScript">
-  <!--
-  var focusControl = document.forms["testFormBean"].elements["string"];
-
-  if (focusControl.type != "hidden" && !focusControl.disabled) {
-     focusControl.focus();
-  }
-  // -->
+    <bean:define id="TEST_RESULTS" toScope="page">
+        <html:form action="/testFormTag" focus="string">
+        </html:form>
+    </bean:define>
+    <bean:define id="EXPECTED_RESULTS" toScope="page">
+        <form name="testFormBean" method="post"
+              action="<%=response.encodeURL( request.getContextPath() + "/testFormTag.do")%>">
+        </form>
+        <script type="text/javascript" language="JavaScript">
+            <!--
+            var focusControl = document.forms["testFormBean"].elements["string"];
+
+            if (focusControl.type != "hidden" && !focusControl.disabled) {
+                focusControl.focus();
+            }
+            // -->
 
-</script>
-	</bean:define>
+        </script>
+    </bean:define>
 </logic:equal>
- 
+
 
 <logic:equal name="runTest" value="testFormActionFocusIndexed">
-	<bean:define id="TEST_RESULTS" toScope="page">
-		<html:form action="/testFormTag" focus="stringIndexed" focusIndex="2">
-		</html:form>
-	</bean:define>
-	<bean:define id="EXPECTED_RESULTS" toScope="page">
-		<form name="testFormBean" method="post" action="<%=response.encodeURL( request.getContextPath() + "/testFormTag.do")%>">
-		</form>
-<script type="text/javascript" language="JavaScript">
-  <!--
-  var focusControl = document.forms["testFormBean"].elements["stringIndexed"];
-
-  if (focusControl.type != "hidden" && !focusControl.disabled) {
-     focusControl[2].focus();
-  }
-  // -->
-</script>
-	</bean:define>
+    <bean:define id="TEST_RESULTS" toScope="page">
+        <html:form action="/testFormTag" focus="stringIndexed" focusIndex="2">
+        </html:form>
+    </bean:define>
+    <bean:define id="EXPECTED_RESULTS" toScope="page">
+        <form name="testFormBean" method="post"
+              action="<%=response.encodeURL( request.getContextPath() + "/testFormTag.do")%>">
+        </form>
+        <script type="text/javascript" language="JavaScript">
+            <!--
+            var focusControl = document.forms["testFormBean"].elements["stringIndexed"];
+
+            if (focusControl.type != "hidden" && !focusControl.disabled) {
+                focusControl[2].focus();
+            }
+            // -->
+        </script>
+    </bean:define>
 </logic:equal>
- 
+
 
 <logic:equal name="runTest" value="testFormActionMethod1">
-	<bean:define id="TEST_RESULTS" toScope="page">
-		<html:form action="/testFormTag" method="post">
-		</html:form>
-	</bean:define>
-	<bean:define id="EXPECTED_RESULTS" toScope="page">
-		<form name="testFormBean" method="post" action="<%=response.encodeURL( request.getContextPath() + "/testFormTag.do")%>">
-		</form>
-	</bean:define>
+    <bean:define id="TEST_RESULTS" toScope="page">
+        <html:form action="/testFormTag" method="post">
+        </html:form>
+    </bean:define>
+    <bean:define id="EXPECTED_RESULTS" toScope="page">
+        <form name="testFormBean" method="post"
+              action="<%=response.encodeURL( request.getContextPath() + "/testFormTag.do")%>">
+        </form>
+    </bean:define>
 </logic:equal>
 
 <logic:equal name="runTest" value="testFormActionMethod2">
-	<bean:define id="TEST_RESULTS" toScope="page">
-		<html:form action="/testFormTag" method="Post">
-		</html:form>
-	</bean:define>
-	<bean:define id="EXPECTED_RESULTS" toScope="page">
-		<form name="testFormBean" method="Post" action="<%=response.encodeURL( request.getContextPath() + "/testFormTag.do")%>">
-		</form>
-	</bean:define>
+    <bean:define id="TEST_RESULTS" toScope="page">
+        <html:form action="/testFormTag" method="Post">
+        </html:form>
+    </bean:define>
+    <bean:define id="EXPECTED_RESULTS" toScope="page">
+        <form name="testFormBean" method="Post"
+              action="<%=response.encodeURL( request.getContextPath() + "/testFormTag.do")%>">
+        </form>
+    </bean:define>
 </logic:equal>
 
 <logic:equal name="runTest" value="testFormActionMethod3">
-	<bean:define id="TEST_RESULTS" toScope="page">
-		<html:form action="/testFormTag" method="get">
-		</html:form>
-	</bean:define>
-	<bean:define id="EXPECTED_RESULTS" toScope="page">
-		<form name="testFormBean" method="get" action="<%=response.encodeURL( request.getContextPath() + "/testFormTag.do")%>">
-		</form>
-	</bean:define>
+    <bean:define id="TEST_RESULTS" toScope="page">
+        <html:form action="/testFormTag" method="get">
+        </html:form>
+    </bean:define>
+    <bean:define id="EXPECTED_RESULTS" toScope="page">
+        <form name="testFormBean" method="get"
+              action="<%=response.encodeURL( request.getContextPath() + "/testFormTag.do")%>">
+        </form>
+    </bean:define>
 </logic:equal>
 
 <logic:equal name="runTest" value="testFormActionMethod4">
-	<bean:define id="TEST_RESULTS" toScope="page">
-		<html:form action="/testFormTag" method="Get">
-		</html:form>
-	</bean:define>
-	<bean:define id="EXPECTED_RESULTS" toScope="page">
-		<form name="testFormBean" method="Get" action="<%=response.encodeURL( request.getContextPath() + "/testFormTag.do")%>">
-		</form>
-	</bean:define>
+    <bean:define id="TEST_RESULTS" toScope="page">
+        <html:form action="/testFormTag" method="Get">
+        </html:form>
+    </bean:define>
+    <bean:define id="EXPECTED_RESULTS" toScope="page">
+        <form name="testFormBean" method="Get"
+              action="<%=response.encodeURL( request.getContextPath() + "/testFormTag.do")%>">
+        </form>
+    </bean:define>
 </logic:equal>
 
 <logic:equal name="runTest" value="testFormActionMethod5">
-	<bean:define id="TEST_RESULTS" toScope="page">
-		<html:form action="/testFormTag" method="GET">
-		</html:form>
-	</bean:define>
-	<bean:define id="EXPECTED_RESULTS" toScope="page">
-		<form name="testFormBean" method="GET" action="<%=response.encodeURL( request.getContextPath() + "/testFormTag.do")%>">
-		</form>
-	</bean:define>
+    <bean:define id="TEST_RESULTS" toScope="page">
+        <html:form action="/testFormTag" method="GET">
+        </html:form>
+    </bean:define>
+    <bean:define id="EXPECTED_RESULTS" toScope="page">
+        <form name="testFormBean" method="GET"
+              action="<%=response.encodeURL( request.getContextPath() + "/testFormTag.do")%>">
+        </form>
+    </bean:define>
 </logic:equal>
 
 <logic:equal name="runTest" value="testFormActionMethod6">
-	<bean:define id="TEST_RESULTS" toScope="page">
-		<html:form action="/testFormTag" method="misc">
-		</html:form>
-	</bean:define>
-	<bean:define id="EXPECTED_RESULTS" toScope="page">
-		<form name="testFormBean" method="misc" action="<%=response.encodeURL( request.getContextPath() + "/testFormTag.do")%>">
-		</form>
-	</bean:define>
+    <bean:define id="TEST_RESULTS" toScope="page">
+        <html:form action="/testFormTag" method="misc">
+        </html:form>
+    </bean:define>
+    <bean:define id="EXPECTED_RESULTS" toScope="page">
+        <form name="testFormBean" method="misc"
+              action="<%=response.encodeURL( request.getContextPath() + "/testFormTag.do")%>">
+        </form>
+    </bean:define>
 </logic:equal>
 
 
 <logic:equal name="runTest" value="testFormActionOnreset">
-	<bean:define id="TEST_RESULTS" toScope="page">
-		<html:form action="/testFormTag" method="misc" onreset="script goes here">
-		</html:form>
-	</bean:define>
-	<bean:define id="EXPECTED_RESULTS" toScope="page">
-		<form name="testFormBean" method="misc" action="<%=response.encodeURL( request.getContextPath() + "/testFormTag.do")%>" onreset="script goes here">
-		</form>
-	</bean:define>
+    <bean:define id="TEST_RESULTS" toScope="page">
+        <html:form action="/testFormTag" method="misc"
+                   onreset="script goes here">
+        </html:form>
+    </bean:define>
+    <bean:define id="EXPECTED_RESULTS" toScope="page">
+        <form name="testFormBean" method="misc"
+              action="<%=response.encodeURL( request.getContextPath() + "/testFormTag.do")%>"
+              onreset="script goes here">
+        </form>
+    </bean:define>
 </logic:equal>
 
 <logic:equal name="runTest" value="testFormActionOnsubmit">
-	<bean:define id="TEST_RESULTS" toScope="page">
-		<html:form action="/testFormTag" method="misc" onsubmit="script goes here">
-		</html:form>
-	</bean:define>
-	<bean:define id="EXPECTED_RESULTS" toScope="page">
-		<form name="testFormBean" method="misc" action="<%=response.encodeURL( request.getContextPath() + "/testFormTag.do")%>" onsubmit="script goes here">
-		</form>
-	</bean:define>
+    <bean:define id="TEST_RESULTS" toScope="page">
+        <html:form action="/testFormTag" method="misc"
+                   onsubmit="script goes here">
+        </html:form>
+    </bean:define>
+    <bean:define id="EXPECTED_RESULTS" toScope="page">
+        <form name="testFormBean" method="misc"
+              action="<%=response.encodeURL( request.getContextPath() + "/testFormTag.do")%>"
+              onsubmit="script goes here">
+        </form>
+    </bean:define>
 </logic:equal>
 
 
 <logic:equal name="runTest" value="testFormActionStyle">
-	<bean:define id="TEST_RESULTS" toScope="page">
-		<html:form action="/testFormTag" method="misc" style="style.goes.here">
-		</html:form>
-	</bean:define>
-	<bean:define id="EXPECTED_RESULTS" toScope="page">
-		<form name="testFormBean" method="misc" action="<%=response.encodeURL( request.getContextPath() + "/testFormTag.do")%>" style="style.goes.here">
-		</form>
-	</bean:define>
+    <bean:define id="TEST_RESULTS" toScope="page">
+        <html:form action="/testFormTag" method="misc"
+                   style="style.goes.here">
+        </html:form>
+    </bean:define>
+    <bean:define id="EXPECTED_RESULTS" toScope="page">
+        <form name="testFormBean" method="misc"
+              action="<%=response.encodeURL( request.getContextPath() + "/testFormTag.do")%>"
+              style="style.goes.here">
+        </form>
+    </bean:define>
 </logic:equal>
 
 <logic:equal name="runTest" value="testFormActionStyleClass">
-	<bean:define id="TEST_RESULTS" toScope="page">
-		<html:form action="/testFormTag" method="misc" styleClass="style.goes.here">
-		</html:form>
-	</bean:define>
-	<bean:define id="EXPECTED_RESULTS" toScope="page">
-		<form name="testFormBean" method="misc" action="<%=response.encodeURL( request.getContextPath() + "/testFormTag.do")%>" class="style.goes.here">
-		</form>
-	</bean:define>
+    <bean:define id="TEST_RESULTS" toScope="page">
+        <html:form action="/testFormTag" method="misc"
+                   styleClass="style.goes.here">
+        </html:form>
+    </bean:define>
+    <bean:define id="EXPECTED_RESULTS" toScope="page">
+        <form name="testFormBean" method="misc"
+              action="<%=response.encodeURL( request.getContextPath() + "/testFormTag.do")%>"
+              class="style.goes.here">
+        </form>
+    </bean:define>
 </logic:equal>
 
 <logic:equal name="runTest" value="testFormActionStyleId">
-	<bean:define id="TEST_RESULTS" toScope="page">
-		<html:form action="/testFormTag" method="misc" styleId="id.goes.here">
-		</html:form>
-	</bean:define>
-	<bean:define id="EXPECTED_RESULTS" toScope="page">
-		<form name="testFormBean" id="id.goes.here" method="misc" action="<%=response.encodeURL( request.getContextPath() + "/testFormTag.do")%>">
-		</form>
-	</bean:define>
+    <bean:define id="TEST_RESULTS" toScope="page">
+        <html:form action="/testFormTag" method="misc" styleId="id.goes.here">
+        </html:form>
+    </bean:define>
+    <bean:define id="EXPECTED_RESULTS" toScope="page">
+        <form name="testFormBean" id="id.goes.here" method="misc"
+              action="<%=response.encodeURL( request.getContextPath() + "/testFormTag.do")%>">
+        </form>
+    </bean:define>
 </logic:equal>
 
 <logic:equal name="runTest" value="testFormActionTarget">
-	<bean:define id="TEST_RESULTS" toScope="page">
-		<html:form action="/testFormTag" method="misc" target="_new">
-		</html:form>
-	</bean:define>
-	<bean:define id="EXPECTED_RESULTS" toScope="page">
-		<form name="testFormBean" method="misc" action="<%=response.encodeURL( request.getContextPath() + "/testFormTag.do")%>" target="_new">
-		</form>
-	</bean:define>
+    <bean:define id="TEST_RESULTS" toScope="page">
+        <html:form action="/testFormTag" method="misc" target="_new">
+        </html:form>
+    </bean:define>
+    <bean:define id="EXPECTED_RESULTS" toScope="page">
+        <form name="testFormBean" method="misc"
+              action="<%=response.encodeURL( request.getContextPath() + "/testFormTag.do")%>"
+              target="_new">
+        </form>
+    </bean:define>
 </logic:equal>
 
 
-<% 
-String expected  = (String) pageContext.getAttribute("EXPECTED_RESULTS");
-String compareTo = (String) pageContext.getAttribute("TEST_RESULTS");
-
-if ((expected == null) || (expected == null)){
-    TaglibTestBase.fail("An invalid (or mispelled) test on this page was called.  Please verify that you've setup the tests (and spellings) correctly.");
-}
+<%
+    String expected = (String) pageContext.getAttribute("EXPECTED_RESULTS");
+    String compareTo = (String) pageContext.getAttribute("TEST_RESULTS");
+
+    if ((expected == null) || (expected == null)) {
+        TaglibTestBase
+                .fail("An invalid (or mispelled) test on this page was called.  Please verify that you've setup the tests (and spellings) correctly.");
+    }
 
-TaglibTestBase.assertResults(expected, compareTo);
+    TaglibTestBase.assertResults(expected, compareTo);
 %>



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org


Mime
View raw message