struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hus...@apache.org
Subject svn commit: r376852 [12/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/TestLinkTag8.jsp
URL: http://svn.apache.org/viewcvs/struts/taglib/trunk/src/webapp/org/apache/struts/taglib/html/TestLinkTag8.jsp?rev=376852&r1=376851&r2=376852&view=diff
==============================================================================
--- struts/taglib/trunk/src/webapp/org/apache/struts/taglib/html/TestLinkTag8.jsp (original)
+++ struts/taglib/trunk/src/webapp/org/apache/struts/taglib/html/TestLinkTag8.jsp Fri Feb 10 13:08:44 2006
@@ -1,7 +1,5 @@
 <%@ page contentType="text/html;charset=UTF-8" language="java" %>
-<%@page import="junit.framework.Assert"%>
-<%@page import="org.apache.struts.util.RequestUtils"%>
-<%@page import="java.util.HashMap"%>
+<%@ 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" %>
@@ -11,203 +9,241 @@
         <html:link page="/some/page.do" onblur="onblur">Test Link</html:link>
     </bean:define>
     <bean:define id="TEST_RESULTS" toScope="page">
-        <a href="<%=org.apache.struts.taglib.TagUtils.getInstance().computeURL(pageContext, null, null, "/some/page.do", null, null, null, null, false)%>" onblur="onblur">Test Link</a>
+        <a href="<%=org.apache.struts.taglib.TagUtils.getInstance().computeURL(pageContext, null, null, "/some/page.do", null, null, null, null, false)%>"
+           onblur="onblur">Test Link</a>
     </bean:define>
 </logic:equal>
 
 <logic:equal name="runTest" value="testLinkPageOnclick">
     <bean:define id="EXPECTED_RESULTS" toScope="page">
-        <html:link page="/some/page.do" onclick="onclick">Test Link</html:link>
+        <html:link page="/some/page.do" onclick="onclick">Test
+            Link</html:link>
     </bean:define>
     <bean:define id="TEST_RESULTS" toScope="page">
-        <a href="<%=org.apache.struts.taglib.TagUtils.getInstance().computeURL(pageContext, null, null, "/some/page.do", null, null, null, null, false)%>" onclick="onclick">Test Link</a>
+        <a href="<%=org.apache.struts.taglib.TagUtils.getInstance().computeURL(pageContext, null, null, "/some/page.do", null, null, null, null, false)%>"
+           onclick="onclick">Test Link</a>
     </bean:define>
 </logic:equal>
 
 <logic:equal name="runTest" value="testLinkPageOndblclick">
     <bean:define id="EXPECTED_RESULTS" toScope="page">
-        <html:link page="/some/page.do" ondblclick="ondblclick">Test Link</html:link>
+        <html:link page="/some/page.do" ondblclick="ondblclick">Test
+            Link</html:link>
     </bean:define>
     <bean:define id="TEST_RESULTS" toScope="page">
-        <a href="<%=org.apache.struts.taglib.TagUtils.getInstance().computeURL(pageContext, null, null, "/some/page.do", null, null, null, null, false)%>" ondblclick="ondblclick">Test Link</a>
+        <a href="<%=org.apache.struts.taglib.TagUtils.getInstance().computeURL(pageContext, null, null, "/some/page.do", null, null, null, null, false)%>"
+           ondblclick="ondblclick">Test Link</a>
     </bean:define>
 </logic:equal>
 
 <logic:equal name="runTest" value="testLinkPageOnfocus">
     <bean:define id="EXPECTED_RESULTS" toScope="page">
-        <html:link page="/some/page.do" onfocus="onfocus">Test Link</html:link>
+        <html:link page="/some/page.do" onfocus="onfocus">Test
+            Link</html:link>
     </bean:define>
     <bean:define id="TEST_RESULTS" toScope="page">
-        <a href="<%=org.apache.struts.taglib.TagUtils.getInstance().computeURL(pageContext, null, null, "/some/page.do", null, null, null, null, false)%>" onfocus="onfocus">Test Link</a>
+        <a href="<%=org.apache.struts.taglib.TagUtils.getInstance().computeURL(pageContext, null, null, "/some/page.do", null, null, null, null, false)%>"
+           onfocus="onfocus">Test Link</a>
     </bean:define>
 </logic:equal>
 
 <logic:equal name="runTest" value="testLinkPageOnkeydown">
     <bean:define id="EXPECTED_RESULTS" toScope="page">
-        <html:link page="/some/page.do" onkeydown="onkeydown">Test Link</html:link>
+        <html:link page="/some/page.do" onkeydown="onkeydown">Test
+            Link</html:link>
     </bean:define>
     <bean:define id="TEST_RESULTS" toScope="page">
-        <a href="<%=org.apache.struts.taglib.TagUtils.getInstance().computeURL(pageContext, null, null, "/some/page.do", null, null, null, null, false)%>" onkeydown="onkeydown">Test Link</a>
+        <a href="<%=org.apache.struts.taglib.TagUtils.getInstance().computeURL(pageContext, null, null, "/some/page.do", null, null, null, null, false)%>"
+           onkeydown="onkeydown">Test Link</a>
     </bean:define>
 </logic:equal>
 
 <logic:equal name="runTest" value="testLinkPageOnkeypress">
     <bean:define id="EXPECTED_RESULTS" toScope="page">
-        <html:link page="/some/page.do" onkeypress="onkeypress">Test Link</html:link>
+        <html:link page="/some/page.do" onkeypress="onkeypress">Test
+            Link</html:link>
     </bean:define>
     <bean:define id="TEST_RESULTS" toScope="page">
-        <a href="<%=org.apache.struts.taglib.TagUtils.getInstance().computeURL(pageContext, null, null, "/some/page.do", null, null, null, null, false)%>" onkeypress="onkeypress">Test Link</a>
+        <a href="<%=org.apache.struts.taglib.TagUtils.getInstance().computeURL(pageContext, null, null, "/some/page.do", null, null, null, null, false)%>"
+           onkeypress="onkeypress">Test Link</a>
     </bean:define>
 </logic:equal>
 
 <logic:equal name="runTest" value="testLinkPageOnkeyup">
     <bean:define id="EXPECTED_RESULTS" toScope="page">
-        <html:link page="/some/page.do" onkeyup="onkeyup">Test Link</html:link>
+        <html:link page="/some/page.do" onkeyup="onkeyup">Test
+            Link</html:link>
     </bean:define>
     <bean:define id="TEST_RESULTS" toScope="page">
-        <a href="<%=org.apache.struts.taglib.TagUtils.getInstance().computeURL(pageContext, null, null, "/some/page.do", null, null, null, null, false)%>" onkeyup="onkeyup">Test Link</a>
+        <a href="<%=org.apache.struts.taglib.TagUtils.getInstance().computeURL(pageContext, null, null, "/some/page.do", null, null, null, null, false)%>"
+           onkeyup="onkeyup">Test Link</a>
     </bean:define>
 </logic:equal>
 
 <logic:equal name="runTest" value="testLinkPageOnmousedown">
     <bean:define id="EXPECTED_RESULTS" toScope="page">
-        <html:link page="/some/page.do" onmousedown="onmousedown">Test Link</html:link>
+        <html:link page="/some/page.do" onmousedown="onmousedown">Test
+            Link</html:link>
     </bean:define>
     <bean:define id="TEST_RESULTS" toScope="page">
-        <a href="<%=org.apache.struts.taglib.TagUtils.getInstance().computeURL(pageContext, null, null, "/some/page.do", null, null, null, null, false)%>" onmousedown="onmousedown">Test Link</a>
+        <a href="<%=org.apache.struts.taglib.TagUtils.getInstance().computeURL(pageContext, null, null, "/some/page.do", null, null, null, null, false)%>"
+           onmousedown="onmousedown">Test Link</a>
     </bean:define>
 </logic:equal>
 
 <logic:equal name="runTest" value="testLinkPageOnmousemove">
     <bean:define id="EXPECTED_RESULTS" toScope="page">
-        <html:link page="/some/page.do" onmousemove="onmousemove">Test Link</html:link>
+        <html:link page="/some/page.do" onmousemove="onmousemove">Test
+            Link</html:link>
     </bean:define>
     <bean:define id="TEST_RESULTS" toScope="page">
-        <a href="<%=org.apache.struts.taglib.TagUtils.getInstance().computeURL(pageContext, null, null, "/some/page.do", null, null, null, null, false)%>" onmousemove="onmousemove">Test Link</a>
+        <a href="<%=org.apache.struts.taglib.TagUtils.getInstance().computeURL(pageContext, null, null, "/some/page.do", null, null, null, null, false)%>"
+           onmousemove="onmousemove">Test Link</a>
     </bean:define>
 </logic:equal>
 
 <logic:equal name="runTest" value="testLinkPageOnmouseout">
     <bean:define id="EXPECTED_RESULTS" toScope="page">
-        <html:link page="/some/page.do" onmouseout="onmouseout">Test Link</html:link>
+        <html:link page="/some/page.do" onmouseout="onmouseout">Test
+            Link</html:link>
     </bean:define>
     <bean:define id="TEST_RESULTS" toScope="page">
-        <a href="<%=org.apache.struts.taglib.TagUtils.getInstance().computeURL(pageContext, null, null, "/some/page.do", null, null, null, null, false)%>" onmouseout="onmouseout">Test Link</a>
+        <a href="<%=org.apache.struts.taglib.TagUtils.getInstance().computeURL(pageContext, null, null, "/some/page.do", null, null, null, null, false)%>"
+           onmouseout="onmouseout">Test Link</a>
     </bean:define>
 </logic:equal>
 
 <logic:equal name="runTest" value="testLinkPageOnmouseover">
     <bean:define id="EXPECTED_RESULTS" toScope="page">
-        <html:link page="/some/page.do" onmouseover="onmouseover">Test Link</html:link>
+        <html:link page="/some/page.do" onmouseover="onmouseover">Test
+            Link</html:link>
     </bean:define>
     <bean:define id="TEST_RESULTS" toScope="page">
-        <a href="<%=org.apache.struts.taglib.TagUtils.getInstance().computeURL(pageContext, null, null, "/some/page.do", null, null, null, null, false)%>" onmouseover="onmouseover">Test Link</a>
+        <a href="<%=org.apache.struts.taglib.TagUtils.getInstance().computeURL(pageContext, null, null, "/some/page.do", null, null, null, null, false)%>"
+           onmouseover="onmouseover">Test Link</a>
     </bean:define>
 </logic:equal>
 
 <logic:equal name="runTest" value="testLinkPageOnmouseup">
     <bean:define id="EXPECTED_RESULTS" toScope="page">
-        <html:link page="/some/page.do" onmouseup="onmouseup">Test Link</html:link>
+        <html:link page="/some/page.do" onmouseup="onmouseup">Test
+            Link</html:link>
     </bean:define>
     <bean:define id="TEST_RESULTS" toScope="page">
-        <a href="<%=org.apache.struts.taglib.TagUtils.getInstance().computeURL(pageContext, null, null, "/some/page.do", null, null, null, null, false)%>" onmouseup="onmouseup">Test Link</a>
+        <a href="<%=org.apache.struts.taglib.TagUtils.getInstance().computeURL(pageContext, null, null, "/some/page.do", null, null, null, null, false)%>"
+           onmouseup="onmouseup">Test Link</a>
     </bean:define>
 </logic:equal>
 
 
-
-
-
-
-
-
 <logic:equal name="runTest" value="testLinkPageParamIdParamNameNoScope">
     <bean:define id="TEST_RESULTS" toScope="page">
-		<html:link page="/some/page.do" paramId="myParam" paramName="paramName">Test Link</html:link>
+        <html:link page="/some/page.do" paramId="myParam"
+                   paramName="paramName">Test Link</html:link>
     </bean:define>
     <bean:define id="EXPECTED_RESULTS" toScope="page">
-		<a href="<%=org.apache.struts.taglib.TagUtils.getInstance().computeURL(pageContext, null, null, "/some/page.do", null, null, null, null, false)%>?myParam=paramValue">Test Link</a>
+        <a href="<%=org.apache.struts.taglib.TagUtils.getInstance().computeURL(pageContext, null, null, "/some/page.do", null, null, null, null, false)%>?myParam=paramValue">Test
+            Link</a>
     </bean:define>
 </logic:equal>
 
-<logic:equal name="runTest" value="testLinkPageParamIdParamNameParamPropertyNoScope">
+<logic:equal name="runTest"
+             value="testLinkPageParamIdParamNameParamPropertyNoScope">
     <bean:define id="TEST_RESULTS" toScope="page">
-		<html:link page="/some/page.do" paramId="myParam" 
-			paramName="testingParamProperty" paramProperty="string">Test Link</html:link>
+        <html:link page="/some/page.do" paramId="myParam"
+                   paramName="testingParamProperty" paramProperty="string">
+            Test Link</html:link>
     </bean:define>
     <bean:define id="EXPECTED_RESULTS" toScope="page">
-		<a href="<%=org.apache.struts.taglib.TagUtils.getInstance().computeURL(pageContext, null, null, "/some/page.do", null, null, null, null, false)%>?myParam=paramPropertyValue">Test Link</a>
+        <a href="<%=org.apache.struts.taglib.TagUtils.getInstance().computeURL(pageContext, null, null, "/some/page.do", null, null, null, null, false)%>?myParam=paramPropertyValue">Test
+            Link</a>
     </bean:define>
 </logic:equal>
 
 
-<logic:equal name="runTest" value="testLinkPageParamIdParamNameApplicationScope">
+<logic:equal name="runTest"
+             value="testLinkPageParamIdParamNameApplicationScope">
     <bean:define id="TEST_RESULTS" toScope="page">
-		<html:link page="/some/page.do" paramId="myParam" paramName="paramName">Test Link</html:link>
+        <html:link page="/some/page.do" paramId="myParam"
+                   paramName="paramName">Test Link</html:link>
     </bean:define>
     <bean:define id="EXPECTED_RESULTS" toScope="page">
-		<a href="<%=org.apache.struts.taglib.TagUtils.getInstance().computeURL(pageContext, null, null, "/some/page.do", null, null, null, null, false)%>?myParam=paramValue">Test Link</a>
+        <a href="<%=org.apache.struts.taglib.TagUtils.getInstance().computeURL(pageContext, null, null, "/some/page.do", null, null, null, null, false)%>?myParam=paramValue">Test
+            Link</a>
     </bean:define>
 </logic:equal>
 
-<logic:equal name="runTest" value="testLinkPageParamIdParamNameParamPropertyApplicationScope">
+<logic:equal name="runTest"
+             value="testLinkPageParamIdParamNameParamPropertyApplicationScope">
     <bean:define id="TEST_RESULTS" toScope="page">
-		<html:link page="/some/page.do" paramId="myParam" 
-			paramName="testingParamProperty" paramProperty="string">Test Link</html:link>
+        <html:link page="/some/page.do" paramId="myParam"
+                   paramName="testingParamProperty" paramProperty="string">
+            Test Link</html:link>
     </bean:define>
     <bean:define id="EXPECTED_RESULTS" toScope="page">
-		<a href="<%=org.apache.struts.taglib.TagUtils.getInstance().computeURL(pageContext, null, null, "/some/page.do", null, null, null, null, false)%>?myParam=paramPropertyValue">Test Link</a>
+        <a href="<%=org.apache.struts.taglib.TagUtils.getInstance().computeURL(pageContext, null, null, "/some/page.do", null, null, null, null, false)%>?myParam=paramPropertyValue">Test
+            Link</a>
     </bean:define>
 </logic:equal>
 
 
 <logic:equal name="runTest" value="testLinkPageParamIdParamNameSessionScope">
     <bean:define id="TEST_RESULTS" toScope="page">
-		<html:link page="/some/page.do" paramId="myParam" paramName="paramName">Test Link</html:link>
+        <html:link page="/some/page.do" paramId="myParam"
+                   paramName="paramName">Test Link</html:link>
     </bean:define>
     <bean:define id="EXPECTED_RESULTS" toScope="page">
-		<a href="<%=org.apache.struts.taglib.TagUtils.getInstance().computeURL(pageContext, null, null, "/some/page.do", null, null, null, null, false)%>?myParam=paramValue">Test Link</a>
+        <a href="<%=org.apache.struts.taglib.TagUtils.getInstance().computeURL(pageContext, null, null, "/some/page.do", null, null, null, null, false)%>?myParam=paramValue">Test
+            Link</a>
     </bean:define>
 </logic:equal>
 
-<logic:equal name="runTest" value="testLinkPageParamIdParamNameParamPropertySessionScope">
+<logic:equal name="runTest"
+             value="testLinkPageParamIdParamNameParamPropertySessionScope">
     <bean:define id="TEST_RESULTS" toScope="page">
-		<html:link page="/some/page.do" paramId="myParam" 
-			paramName="testingParamProperty" paramProperty="string">Test Link</html:link>
+        <html:link page="/some/page.do" paramId="myParam"
+                   paramName="testingParamProperty" paramProperty="string">
+            Test Link</html:link>
     </bean:define>
     <bean:define id="EXPECTED_RESULTS" toScope="page">
-		<a href="<%=org.apache.struts.taglib.TagUtils.getInstance().computeURL(pageContext, null, null, "/some/page.do", null, null, null, null, false)%>?myParam=paramPropertyValue">Test Link</a>
+        <a href="<%=org.apache.struts.taglib.TagUtils.getInstance().computeURL(pageContext, null, null, "/some/page.do", null, null, null, null, false)%>?myParam=paramPropertyValue">Test
+            Link</a>
     </bean:define>
 </logic:equal>
 
 
 <logic:equal name="runTest" value="testLinkPageParamIdParamNameRequestScope">
     <bean:define id="TEST_RESULTS" toScope="page">
-		<html:link page="/some/page.do" paramId="myParam" paramName="paramName">Test Link</html:link>
+        <html:link page="/some/page.do" paramId="myParam"
+                   paramName="paramName">Test Link</html:link>
     </bean:define>
     <bean:define id="EXPECTED_RESULTS" toScope="page">
-		<a href="<%=org.apache.struts.taglib.TagUtils.getInstance().computeURL(pageContext, null, null, "/some/page.do", null, null, null, null, false)%>?myParam=paramValue">Test Link</a>
+        <a href="<%=org.apache.struts.taglib.TagUtils.getInstance().computeURL(pageContext, null, null, "/some/page.do", null, null, null, null, false)%>?myParam=paramValue">Test
+            Link</a>
     </bean:define>
 </logic:equal>
 
-<logic:equal name="runTest" value="testLinkPageParamIdParamNameParamPropertyRequestScope">
+<logic:equal name="runTest"
+             value="testLinkPageParamIdParamNameParamPropertyRequestScope">
     <bean:define id="TEST_RESULTS" toScope="page">
-		<html:link page="/some/page.do" paramId="myParam" 
-			paramName="testingParamProperty" paramProperty="string">Test Link</html:link>
+        <html:link page="/some/page.do" paramId="myParam"
+                   paramName="testingParamProperty" paramProperty="string">
+            Test Link</html:link>
     </bean:define>
     <bean:define id="EXPECTED_RESULTS" toScope="page">
-		<a href="<%=org.apache.struts.taglib.TagUtils.getInstance().computeURL(pageContext, null, null, "/some/page.do", null, null, null, null, false)%>?myParam=paramPropertyValue">Test Link</a>
+        <a href="<%=org.apache.struts.taglib.TagUtils.getInstance().computeURL(pageContext, null, null, "/some/page.do", null, null, null, null, false)%>?myParam=paramPropertyValue">Test
+            Link</a>
     </bean:define>
 </logic:equal>
 
 
-
 <logic:equal name="runTest" value="testLinkPageStyle">
     <bean:define id="TEST_RESULTS" toScope="page">
         <html:link page="/some/page.do" style="XXX">Test Link</html:link>
     </bean:define>
     <bean:define id="EXPECTED_RESULTS" toScope="page">
-        <a href="<%=org.apache.struts.taglib.TagUtils.getInstance().computeURL(pageContext, null, null, "/some/page.do", null, null, null, null, false)%>" style="XXX">Test Link</a>
+        <a href="<%=org.apache.struts.taglib.TagUtils.getInstance().computeURL(pageContext, null, null, "/some/page.do", null, null, null, null, false)%>"
+           style="XXX">Test Link</a>
     </bean:define>
 </logic:equal>
 
@@ -217,7 +253,8 @@
         <html:link page="/some/page.do" styleClass="XXX">Test Link</html:link>
     </bean:define>
     <bean:define id="EXPECTED_RESULTS" toScope="page">
-        <a href="<%=org.apache.struts.taglib.TagUtils.getInstance().computeURL(pageContext, null, null, "/some/page.do", null, null, null, null, false)%>" class="XXX">Test Link</a>
+        <a href="<%=org.apache.struts.taglib.TagUtils.getInstance().computeURL(pageContext, null, null, "/some/page.do", null, null, null, null, false)%>"
+           class="XXX">Test Link</a>
     </bean:define>
 </logic:equal>
 
@@ -227,7 +264,8 @@
         <html:link page="/some/page.do" styleId="XXX">Test Link</html:link>
     </bean:define>
     <bean:define id="EXPECTED_RESULTS" toScope="page">
-        <a href="<%=org.apache.struts.taglib.TagUtils.getInstance().computeURL(pageContext, null, null, "/some/page.do", null, null, null, null, false)%>" id="XXX">Test Link</a>
+        <a href="<%=org.apache.struts.taglib.TagUtils.getInstance().computeURL(pageContext, null, null, "/some/page.do", null, null, null, null, false)%>"
+           id="XXX">Test Link</a>
     </bean:define>
 </logic:equal>
 
@@ -237,7 +275,8 @@
         <html:link page="/some/page.do" tabindex="4">Test Link</html:link>
     </bean:define>
     <bean:define id="EXPECTED_RESULTS" toScope="page">
-        <a href="<%=org.apache.struts.taglib.TagUtils.getInstance().computeURL(pageContext, null, null, "/some/page.do", null, null, null, null, false)%>" tabindex="4">Test Link</a>
+        <a href="<%=org.apache.struts.taglib.TagUtils.getInstance().computeURL(pageContext, null, null, "/some/page.do", null, null, null, null, false)%>"
+           tabindex="4">Test Link</a>
     </bean:define>
 </logic:equal>
 
@@ -247,7 +286,8 @@
         <html:link page="/some/page.do" target="_new">Test Link</html:link>
     </bean:define>
     <bean:define id="EXPECTED_RESULTS" toScope="page">
-        <a href="<%=org.apache.struts.taglib.TagUtils.getInstance().computeURL(pageContext, null, null, "/some/page.do", null, null, null, null, false)%>" target="_new">Test Link</a>
+        <a href="<%=org.apache.struts.taglib.TagUtils.getInstance().computeURL(pageContext, null, null, "/some/page.do", null, null, null, null, false)%>"
+           target="_new">Test Link</a>
     </bean:define>
 </logic:equal>
 
@@ -257,41 +297,44 @@
         <html:link page="/some/page.do" title="XXX">Test Link</html:link>
     </bean:define>
     <bean:define id="EXPECTED_RESULTS" toScope="page">
-        <a href="<%=org.apache.struts.taglib.TagUtils.getInstance().computeURL(pageContext, null, null, "/some/page.do", null, null, null, null, false)%>" title="XXX">Test Link</a>
+        <a href="<%=org.apache.struts.taglib.TagUtils.getInstance().computeURL(pageContext, null, null, "/some/page.do", null, null, null, null, false)%>"
+           title="XXX">Test Link</a>
     </bean:define>
 </logic:equal>
 
 
 <logic:equal name="runTest" value="testLinkPageTitleKey">
     <bean:define id="TEST_RESULTS" toScope="page">
-        <html:link page="/some/page.do" titleKey="default.bundle.message">Test Link</html:link>
+        <html:link page="/some/page.do" titleKey="default.bundle.message">Test
+            Link</html:link>
     </bean:define>
     <bean:define id="EXPECTED_RESULTS" toScope="page">
-        <a href="<%=org.apache.struts.taglib.TagUtils.getInstance().computeURL(pageContext, null, null, "/some/page.do", null, null, null, null, false)%>" title="Testing Message">Test Link</a>
+        <a href="<%=org.apache.struts.taglib.TagUtils.getInstance().computeURL(pageContext, null, null, "/some/page.do", null, null, null, null, false)%>"
+           title="Testing Message">Test Link</a>
     </bean:define>
 </logic:equal>
 
 
 <logic:equal name="runTest" value="testLinkPageTransaction">
     <bean:define id="TEST_RESULTS" toScope="page">
-        <html:link page="/some/page.do" transaction="true">Test Link</html:link>
+        <html:link page="/some/page.do" transaction="true">Test
+            Link</html:link>
     </bean:define>
     <bean:define id="EXPECTED_RESULTS" toScope="page">
-        <a href="<%=org.apache.struts.taglib.TagUtils.getInstance().computeURL(pageContext, null, null, "/some/page.do", null, null, null, null, false)%>?org.apache.struts.taglib.html.TOKEN=Some_Token_Here">Test Link</a>
+        <a href="<%=org.apache.struts.taglib.TagUtils.getInstance().computeURL(pageContext, null, null, "/some/page.do", null, null, null, null, false)%>?org.apache.struts.taglib.html.TOKEN=Some_Token_Here">Test
+            Link</a>
     </bean:define>
 </logic:equal>
 
 
+<%
+    String expected = (String) pageContext.getAttribute("EXPECTED_RESULTS");
+    String compareTo = (String) pageContext.getAttribute("TEST_RESULTS");
 
+    if ((expected == null) || (compareTo == null)) {
+        Assert.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) || (compareTo == null)){
-    Assert.fail("An invalid (or mispelled) test on this page was called.  Please verify that you've setup the tests (and spellings) correctly.");
-}
-	
-Assert.assertEquals(expected, compareTo);
+    Assert.assertEquals(expected, compareTo);
 %>

Modified: struts/taglib/trunk/src/webapp/org/apache/struts/taglib/html/TestMessagesTag1.jsp
URL: http://svn.apache.org/viewcvs/struts/taglib/trunk/src/webapp/org/apache/struts/taglib/html/TestMessagesTag1.jsp?rev=376852&r1=376851&r2=376852&view=diff
==============================================================================
--- struts/taglib/trunk/src/webapp/org/apache/struts/taglib/html/TestMessagesTag1.jsp (original)
+++ struts/taglib/trunk/src/webapp/org/apache/struts/taglib/html/TestMessagesTag1.jsp Fri Feb 10 13:08:44 2006
@@ -1,609 +1,669 @@
 <%@ page contentType="text/html;charset=UTF-8" language="java" %>
-<%@page import="junit.framework.Assert"%>
-<%@page import="java.util.HashMap"%>
-<%@page import="org.apache.struts.util.MessageResources"%>
-<%@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" %>
+<%@ page import="org.apache.struts.util.MessageResources" %>
 
 <%@ 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" %>
 
 <%
-/** 
-  * From the Docs:
-  * 
-  * <html:message>
-  * Displays a set of messages prepared by a business logic component and 
-  * stored as an ActionMessages object, a String, or a String array in request 
-  * scope. If such a bean is not found, nothing will be rendered.
-  * 
-  * The tests are setup to test all possible scenarios with each ojbect listed.
-  * Using Globals.ERROR_KEY in the request
-  * TestMessagesTag1.jsp - uses ActionMessages to store any keys for testing
-  * TestMessagesTag2.jsp - uses a String to store any keys for testing
-  * TestMessagesTag3.jsp - uses a String Array to store any keys for testing
-  * TestMessagesTag4.jsp - uses ActionMessages to store any keys for testing
-  * 
-  * Using Globals.MESSAGE_KEY in the request
-  * TestMessagesTag5.jsp - uses ActionMessages to store any keys for testing
-  * TestMessagesTag6.jsp - uses a String to store any keys for testing
-  * TestMessagesTag7.jsp - uses a String Array to store any keys for testing
-  * TestMessagesTag8.jsp - uses ActionMessages to store any keys for testing
-  * 
-  **/
+    /**
+     * From the Docs:
+     *
+     * <html:message>
+     * Displays a set of messages prepared by a business logic component and
+     * stored as an ActionMessages object, a String, or a String array in request
+     * scope. If such a bean is not found, nothing will be rendered.
+     *
+     * The tests are setup to test all possible scenarios with each ojbect listed.
+     * Using Globals.ERROR_KEY in the request
+     * TestMessagesTag1.jsp - uses ActionMessages to store any keys for testing
+     * TestMessagesTag2.jsp - uses a String to store any keys for testing
+     * TestMessagesTag3.jsp - uses a String Array to store any keys for testing
+     * TestMessagesTag4.jsp - uses ActionMessages to store any keys for testing
+     *
+     * Using Globals.MESSAGE_KEY in the request
+     * TestMessagesTag5.jsp - uses ActionMessages to store any keys for testing
+     * TestMessagesTag6.jsp - uses a String to store any keys for testing
+     * TestMessagesTag7.jsp - uses a String Array to store any keys for testing
+     * TestMessagesTag8.jsp - uses ActionMessages to store any keys for testing
+     *
+     **/
 %>
 
 <!-- --------Testing attributes using forward------ -->
 <logic:equal name="runTest" value="testMessages">
     <bean:define id="EXPECTED_RESULTS" toScope="page">
-      Messages:
+        Messages:
     </bean:define>
     <bean:define id="TEST_RESULTS" toScope="page">
-      Messages:
-      <html:messages id="message" >
-        Message:<bean:write name="message"/>
-      </html:messages>
+        Messages:
+        <html:messages id="message">
+            Message:<bean:write name="message"/>
+        </html:messages>
     </bean:define>
 </logic:equal>
 
 
 <logic:equal name="runTest" value="testMessagesDefaultBundleEmpty">
     <bean:define id="EXPECTED_RESULTS" toScope="page">
-      Messages:
+        Messages:
     </bean:define>
-   <% 
-     ActionMessages messages = new ActionMessages();
-     request.setAttribute(Globals.ERROR_KEY, messages);
-   %>
-    <bean:define id="TEST_RESULTS" toScope="page">
-      Messages:
-      <html:messages id="message" >
-        Message:<bean:write name="message"/>
-      </html:messages>
+    <%
+        ActionMessages messages = new ActionMessages();
+        request.setAttribute(Globals.ERROR_KEY, messages);
+    %>
+    <bean:define id="TEST_RESULTS" toScope="page">
+        Messages:
+        <html:messages id="message">
+            Message:<bean:write name="message"/>
+        </html:messages>
     </bean:define>
 </logic:equal>
 
 
 <logic:equal name="runTest" value="testMessagesActionMessageDefaultBundle">
     <bean:define id="EXPECTED_RESULTS" toScope="page">
-      Messages:
-      
+        Messages:
+
         Message:Testing Message
-      
+
         Message:Testing Message
     </bean:define>
 
-   <% 
-     ActionMessages messages = new ActionMessages();
-     messages.add("myproperty1", new ActionMessage("default.bundle.message"));
-     messages.add("myproperty2", new ActionMessage("default.bundle.message"));
-     request.setAttribute(Globals.ERROR_KEY, messages);
-   %>
+    <%
+        ActionMessages messages = new ActionMessages();
+        messages.add("myproperty1",
+                new ActionMessage("default.bundle.message"));
+        messages.add("myproperty2",
+                new ActionMessage("default.bundle.message"));
+        request.setAttribute(Globals.ERROR_KEY, messages);
+    %>
     <bean:define id="TEST_RESULTS" toScope="page">
-      Messages:
-      <html:messages id="message" >
-        Message:<bean:write name="message"/>
-      </html:messages>
+        Messages:
+        <html:messages id="message">
+            Message:<bean:write name="message"/>
+        </html:messages>
     </bean:define>
 </logic:equal>
 
 
-<logic:equal name="runTest" value="testMessagesActionMessageDefaultBundleHeader">
+<logic:equal name="runTest"
+             value="testMessagesActionMessageDefaultBundleHeader">
     <bean:define id="EXPECTED_RESULTS" toScope="page">
-      Messages:
-      custom_error_header
+        Messages:
+        custom_error_header
         Message:Testing Message
-      
+
         Message:Testing Message
     </bean:define>
 
-  <% 
-     ActionMessages messages = new ActionMessages();
-     messages.add("myproperty1", new ActionMessage("default.bundle.message"));
-     messages.add("myproperty2", new ActionMessage("default.bundle.message"));
-     request.setAttribute(Globals.ERROR_KEY, messages);
-   %>
+    <%
+        ActionMessages messages = new ActionMessages();
+        messages.add("myproperty1",
+                new ActionMessage("default.bundle.message"));
+        messages.add("myproperty2",
+                new ActionMessage("default.bundle.message"));
+        request.setAttribute(Globals.ERROR_KEY, messages);
+    %>
     <bean:define id="TEST_RESULTS" toScope="page">
-      Messages:
-      <html:messages id="message"  header="custom.errors.header">
-        Message:<bean:write name="message"/>
-      </html:messages>
+        Messages:
+        <html:messages id="message" header="custom.errors.header">
+            Message:<bean:write name="message"/>
+        </html:messages>
     </bean:define>
 </logic:equal>
 
 
-<logic:equal name="runTest" value="testMessagesActionMessageDefaultBundleHeaderFooter">
+<logic:equal name="runTest"
+             value="testMessagesActionMessageDefaultBundleHeaderFooter">
     <bean:define id="EXPECTED_RESULTS" toScope="page">
-      Messages:
-      custom_error_header
+        Messages:
+        custom_error_header
         Message:Testing Message
-      
+
         Message:Testing Message
-      custom_error_footer
+        custom_error_footer
     </bean:define>
 
-  <% 
-     ActionMessages messages = new ActionMessages();
-     messages.add("myproperty1", new ActionMessage("default.bundle.message"));
-     messages.add("myproperty2", new ActionMessage("default.bundle.message"));
-     request.setAttribute(Globals.ERROR_KEY, messages);
-   %>
+    <%
+        ActionMessages messages = new ActionMessages();
+        messages.add("myproperty1",
+                new ActionMessage("default.bundle.message"));
+        messages.add("myproperty2",
+                new ActionMessage("default.bundle.message"));
+        request.setAttribute(Globals.ERROR_KEY, messages);
+    %>
     <bean:define id="TEST_RESULTS" toScope="page">
-      Messages:
-      <html:messages id="message"  header="custom.errors.header" footer="custom.errors.footer">
-        Message:<bean:write name="message"/>
-      </html:messages>
+        Messages:
+        <html:messages id="message" header="custom.errors.header"
+                       footer="custom.errors.footer">
+            Message:<bean:write name="message"/>
+        </html:messages>
     </bean:define>
 </logic:equal>
 
 
-
 <logic:equal name="runTest" value="testMessagesNameDefaultBundleEmpty">
     <bean:define id="EXPECTED_RESULTS" toScope="page">
-      Messages:
+        Messages:
     </bean:define>
 
-   <% 
-     ActionMessages messages = new ActionMessages();
-     request.setAttribute("my-key", messages);
-   %>
+    <%
+        ActionMessages messages = new ActionMessages();
+        request.setAttribute("my-key", messages);
+    %>
     <bean:define id="TEST_RESULTS" toScope="page">
-      Messages:
-      <html:messages id="message"  name="my-key">
-        Message:<bean:write name="message"/>
-      </html:messages>
+        Messages:
+        <html:messages id="message" name="my-key">
+            Message:<bean:write name="message"/>
+        </html:messages>
     </bean:define>
 </logic:equal>
 
-<logic:equal name="runTest" value="testMessagesNamePropertyDefaultBundleEmpty">
+<logic:equal name="runTest"
+             value="testMessagesNamePropertyDefaultBundleEmpty">
     <bean:define id="EXPECTED_RESULTS" toScope="page">
-      Messages:
+        Messages:
     </bean:define>
 
-   <% 
-     ActionMessages messages = new ActionMessages();
-     request.setAttribute("my-key", messages);
-   %>
+    <%
+        ActionMessages messages = new ActionMessages();
+        request.setAttribute("my-key", messages);
+    %>
     <bean:define id="TEST_RESULTS" toScope="page">
-      Messages:
-      <html:messages id="message" name="my-key" property="myproperty2">
-        Message:<bean:write name="message"/>
-      </html:messages>
+        Messages:
+        <html:messages id="message" name="my-key" property="myproperty2">
+            Message:<bean:write name="message"/>
+        </html:messages>
     </bean:define>
 </logic:equal>
 
 
-
-<logic:equal name="runTest" value="testMessagesNameActionMessageDefaultBundle">
+<logic:equal name="runTest"
+             value="testMessagesNameActionMessageDefaultBundle">
     <bean:define id="EXPECTED_RESULTS" toScope="page">
-      Messages:
-      
+        Messages:
+
         Message:Testing Message
-      
+
         Message:Testing Message
     </bean:define>
 
-   <% 
-     ActionMessages messages = new ActionMessages();
-     messages.add("myproperty1", new ActionMessage("default.bundle.message"));
-     messages.add("myproperty2", new ActionMessage("default.bundle.message"));
-     request.setAttribute("my-key", messages);
-   %>
+    <%
+        ActionMessages messages = new ActionMessages();
+        messages.add("myproperty1",
+                new ActionMessage("default.bundle.message"));
+        messages.add("myproperty2",
+                new ActionMessage("default.bundle.message"));
+        request.setAttribute("my-key", messages);
+    %>
     <bean:define id="TEST_RESULTS" toScope="page">
-      Messages:
-      <html:messages id="message"  name="my-key">
-        Message:<bean:write name="message"/>
-      </html:messages>
+        Messages:
+        <html:messages id="message" name="my-key">
+            Message:<bean:write name="message"/>
+        </html:messages>
     </bean:define>
 </logic:equal>
 
 
-
-<logic:equal name="runTest" value="testMessagesNamePropertyActionMessageDefaultBundle">
+<logic:equal name="runTest"
+             value="testMessagesNamePropertyActionMessageDefaultBundle">
     <bean:define id="EXPECTED_RESULTS" toScope="page">
-      Messages:
-      
+        Messages:
+
         Message:Testing Message
     </bean:define>
 
-   <% 
-     ActionMessages messages = new ActionMessages();
-     messages.add("myproperty1", new ActionMessage("default.bundle.message"));
-     messages.add("myproperty2", new ActionMessage("default.bundle.message"));
-     request.setAttribute("my-key", messages);
-   %>
+    <%
+        ActionMessages messages = new ActionMessages();
+        messages.add("myproperty1",
+                new ActionMessage("default.bundle.message"));
+        messages.add("myproperty2",
+                new ActionMessage("default.bundle.message"));
+        request.setAttribute("my-key", messages);
+    %>
     <bean:define id="TEST_RESULTS" toScope="page">
-      Messages:
-      <html:messages id="message"  name="my-key" property="myproperty2">
-        Message:<bean:write name="message"/>
-      </html:messages>
+        Messages:
+        <html:messages id="message" name="my-key" property="myproperty2">
+            Message:<bean:write name="message"/>
+        </html:messages>
     </bean:define>
 </logic:equal>
 
 
-
-<logic:equal name="runTest" value="testMessagesNameActionMessageDefaultBundleHeader">
+<logic:equal name="runTest"
+             value="testMessagesNameActionMessageDefaultBundleHeader">
     <bean:define id="EXPECTED_RESULTS" toScope="page">
-      Messages:
-      custom_error_header
+        Messages:
+        custom_error_header
         Message:Testing Message
-      
+
         Message:Testing Message
     </bean:define>
 
-  <% 
-     ActionMessages messages = new ActionMessages();
-     messages.add("myproperty1", new ActionMessage("default.bundle.message"));
-     messages.add("myproperty2", new ActionMessage("default.bundle.message"));
-     request.setAttribute("my-key", messages);
-   %>
+    <%
+        ActionMessages messages = new ActionMessages();
+        messages.add("myproperty1",
+                new ActionMessage("default.bundle.message"));
+        messages.add("myproperty2",
+                new ActionMessage("default.bundle.message"));
+        request.setAttribute("my-key", messages);
+    %>
     <bean:define id="TEST_RESULTS" toScope="page">
-      Messages:
-      <html:messages id="message"  name="my-key" header="custom.errors.header">
-        Message:<bean:write name="message"/>
-      </html:messages>
+        Messages:
+        <html:messages id="message" name="my-key"
+                       header="custom.errors.header">
+            Message:<bean:write name="message"/>
+        </html:messages>
     </bean:define>
 </logic:equal>
 
 
-<logic:equal name="runTest" value="testMessagesNamePropertyActionMessageDefaultBundleHeader">
+<logic:equal name="runTest"
+             value="testMessagesNamePropertyActionMessageDefaultBundleHeader">
     <bean:define id="EXPECTED_RESULTS" toScope="page">
-      Messages:
-      custom_error_header
+        Messages:
+        custom_error_header
         Message:Testing Message
     </bean:define>
 
-  <% 
-     ActionMessages messages = new ActionMessages();
-     messages.add("myproperty1", new ActionMessage("default.bundle.message"));
-     messages.add("myproperty2", new ActionMessage("default.bundle.message"));
-     request.setAttribute("my-key", messages);
-   %>
+    <%
+        ActionMessages messages = new ActionMessages();
+        messages.add("myproperty1",
+                new ActionMessage("default.bundle.message"));
+        messages.add("myproperty2",
+                new ActionMessage("default.bundle.message"));
+        request.setAttribute("my-key", messages);
+    %>
     <bean:define id="TEST_RESULTS" toScope="page">
-      Messages:
-      <html:messages id="message"  name="my-key" header="custom.errors.header" property="myproperty2">
-        Message:<bean:write name="message"/>
-      </html:messages>
+        Messages:
+        <html:messages id="message" name="my-key"
+                       header="custom.errors.header" property="myproperty2">
+            Message:<bean:write name="message"/>
+        </html:messages>
     </bean:define>
 </logic:equal>
 
-<logic:equal name="runTest" value="testMessagesNameActionMessageDefaultBundleHeaderFooter">
+<logic:equal name="runTest"
+             value="testMessagesNameActionMessageDefaultBundleHeaderFooter">
     <bean:define id="EXPECTED_RESULTS" toScope="page">
-      Messages:
-      custom_error_header
+        Messages:
+        custom_error_header
         Message:Testing Message
-      
+
         Message:Testing Message
-      custom_error_footer
+        custom_error_footer
     </bean:define>
 
-  <% 
-     ActionMessages messages = new ActionMessages();
-     messages.add("myproperty1", new ActionMessage("default.bundle.message"));
-     messages.add("myproperty2", new ActionMessage("default.bundle.message"));
-     request.setAttribute("my-key", messages);
-   %>
+    <%
+        ActionMessages messages = new ActionMessages();
+        messages.add("myproperty1",
+                new ActionMessage("default.bundle.message"));
+        messages.add("myproperty2",
+                new ActionMessage("default.bundle.message"));
+        request.setAttribute("my-key", messages);
+    %>
     <bean:define id="TEST_RESULTS" toScope="page">
-      Messages:
-      <html:messages id="message"  name="my-key" header="custom.errors.header" footer="custom.errors.footer">
-        Message:<bean:write name="message"/>
-      </html:messages>
+        Messages:
+        <html:messages id="message" name="my-key"
+                       header="custom.errors.header"
+                       footer="custom.errors.footer">
+            Message:<bean:write name="message"/>
+        </html:messages>
     </bean:define>
 </logic:equal>
 
 
-<logic:equal name="runTest" value="testMessagesNamePropertyActionMessageDefaultBundleHeaderFooter">
+<logic:equal name="runTest"
+             value="testMessagesNamePropertyActionMessageDefaultBundleHeaderFooter">
     <bean:define id="EXPECTED_RESULTS" toScope="page">
-      Messages:
-      custom_error_header
+        Messages:
+        custom_error_header
         Message:Testing Message
-      custom_error_footer
+        custom_error_footer
     </bean:define>
 
-  <% 
-     ActionMessages messages = new ActionMessages();
-     messages.add("myproperty1", new ActionMessage("default.bundle.message"));
-     messages.add("myproperty2", new ActionMessage("default.bundle.message"));
-     request.setAttribute("my-key", messages);
-   %>
+    <%
+        ActionMessages messages = new ActionMessages();
+        messages.add("myproperty1",
+                new ActionMessage("default.bundle.message"));
+        messages.add("myproperty2",
+                new ActionMessage("default.bundle.message"));
+        request.setAttribute("my-key", messages);
+    %>
     <bean:define id="TEST_RESULTS" toScope="page">
-      Messages:
-      <html:messages id="message"  name="my-key" header="custom.errors.header" footer="custom.errors.footer" property="myproperty2">
-        Message:<bean:write name="message"/>
-      </html:messages>
+        Messages:
+        <html:messages id="message" name="my-key"
+                       header="custom.errors.header"
+                       footer="custom.errors.footer" property="myproperty2">
+            Message:<bean:write name="message"/>
+        </html:messages>
     </bean:define>
 </logic:equal>
 
 
-
-
-
-
-
 <logic:equal name="runTest" value="testMessagesAlternateBundleEmpty">
     <bean:define id="EXPECTED_RESULTS" toScope="page">
-      Messages:
+        Messages:
     </bean:define>
 
-   <% 
-     ActionMessages messages = new ActionMessages();
-     request.setAttribute(Globals.ERROR_KEY, messages);
-   %>
-    <bean:define id="TEST_RESULTS" toScope="page">
-      Messages:
-      <html:messages id="message"  bundle="alternate">
-        Message:<bean:write name="message"/>
-      </html:messages>
+    <%
+        ActionMessages messages = new ActionMessages();
+        request.setAttribute(Globals.ERROR_KEY, messages);
+    %>
+    <bean:define id="TEST_RESULTS" toScope="page">
+        Messages:
+        <html:messages id="message" bundle="alternate">
+            Message:<bean:write name="message"/>
+        </html:messages>
     </bean:define>
 </logic:equal>
 
 
 <logic:equal name="runTest" value="testMessagesActionMessageAlternateBundle">
     <bean:define id="EXPECTED_RESULTS" toScope="page">
-      Messages:
-      
+        Messages:
+
         Message:Testing Message
-      
+
         Message:Testing Message
     </bean:define>
 
-   <% 
-     ActionMessages messages = new ActionMessages();
-     messages.add("myproperty1", new ActionMessage("alternate.bundle.message"));
-     messages.add("myproperty2", new ActionMessage("alternate.bundle.message"));
-     request.setAttribute(Globals.ERROR_KEY, messages);
-   %>
+    <%
+        ActionMessages messages = new ActionMessages();
+        messages.add("myproperty1",
+                new ActionMessage("alternate.bundle.message"));
+        messages.add("myproperty2",
+                new ActionMessage("alternate.bundle.message"));
+        request.setAttribute(Globals.ERROR_KEY, messages);
+    %>
     <bean:define id="TEST_RESULTS" toScope="page">
-      Messages:
-      <html:messages id="message"  bundle="alternate">
-        Message:<bean:write name="message"/>
-      </html:messages>
+        Messages:
+        <html:messages id="message" bundle="alternate">
+            Message:<bean:write name="message"/>
+        </html:messages>
     </bean:define>
 </logic:equal>
 
 
-<logic:equal name="runTest" value="testMessagesActionMessageAlternateBundleHeader">
+<logic:equal name="runTest"
+             value="testMessagesActionMessageAlternateBundleHeader">
     <bean:define id="EXPECTED_RESULTS" toScope="page">
-      Messages:
-      custom_alternate_error_header
+        Messages:
+        custom_alternate_error_header
         Message:Testing Message
-      
+
         Message:Testing Message
     </bean:define>
 
-  <% 
-     ActionMessages messages = new ActionMessages();
-     messages.add("myproperty1", new ActionMessage("alternate.bundle.message"));
-     messages.add("myproperty2", new ActionMessage("alternate.bundle.message"));
-     request.setAttribute(Globals.ERROR_KEY, messages);
-   %>
+    <%
+        ActionMessages messages = new ActionMessages();
+        messages.add("myproperty1",
+                new ActionMessage("alternate.bundle.message"));
+        messages.add("myproperty2",
+                new ActionMessage("alternate.bundle.message"));
+        request.setAttribute(Globals.ERROR_KEY, messages);
+    %>
     <bean:define id="TEST_RESULTS" toScope="page">
-      Messages:
-      <html:messages id="message"  header="custom.alternate.errors.header" bundle="alternate">
-        Message:<bean:write name="message"/>
-      </html:messages>
+        Messages:
+        <html:messages id="message" header="custom.alternate.errors.header"
+                       bundle="alternate">
+            Message:<bean:write name="message"/>
+        </html:messages>
     </bean:define>
 </logic:equal>
 
 
-<logic:equal name="runTest" value="testMessagesActionMessageAlternateBundleHeaderFooter">
+<logic:equal name="runTest"
+             value="testMessagesActionMessageAlternateBundleHeaderFooter">
     <bean:define id="EXPECTED_RESULTS" toScope="page">
-      Messages:
-      custom_alternate_error_header
+        Messages:
+        custom_alternate_error_header
         Message:Testing Message
-      
+
         Message:Testing Message
-      custom_alternate_error_footer
+        custom_alternate_error_footer
     </bean:define>
 
-  <% 
-     ActionMessages messages = new ActionMessages();
-     messages.add("myproperty1", new ActionMessage("alternate.bundle.message"));
-     messages.add("myproperty2", new ActionMessage("alternate.bundle.message"));
-     request.setAttribute(Globals.ERROR_KEY, messages);
-   %>
+    <%
+        ActionMessages messages = new ActionMessages();
+        messages.add("myproperty1",
+                new ActionMessage("alternate.bundle.message"));
+        messages.add("myproperty2",
+                new ActionMessage("alternate.bundle.message"));
+        request.setAttribute(Globals.ERROR_KEY, messages);
+    %>
     <bean:define id="TEST_RESULTS" toScope="page">
-      Messages:
-      <html:messages id="message"  header="custom.alternate.errors.header" 
-             footer="custom.alternate.errors.footer" bundle="alternate">
-        Message:<bean:write name="message"/>
-      </html:messages>
+        Messages:
+        <html:messages id="message" header="custom.alternate.errors.header"
+                       footer="custom.alternate.errors.footer"
+                       bundle="alternate">
+            Message:<bean:write name="message"/>
+        </html:messages>
     </bean:define>
 </logic:equal>
 
 
-
-
 <logic:equal name="runTest" value="testMessagesNameAlternateBundleEmpty">
     <bean:define id="EXPECTED_RESULTS" toScope="page">
-      Messages:
+        Messages:
     </bean:define>
 
-   <% 
-     ActionMessages messages = new ActionMessages();
-     request.setAttribute("my-key", messages);
-   %>
+    <%
+        ActionMessages messages = new ActionMessages();
+        request.setAttribute("my-key", messages);
+    %>
     <bean:define id="TEST_RESULTS" toScope="page">
-      Messages:
-      <html:messages id="message"  name="my-key" bundle="alternate">
-        Message:<bean:write name="message"/>
-      </html:messages>
+        Messages:
+        <html:messages id="message" name="my-key" bundle="alternate">
+            Message:<bean:write name="message"/>
+        </html:messages>
     </bean:define>
 </logic:equal>
 
 
-<logic:equal name="runTest" value="testMessagesNamePropertyAlternateBundleEmpty">
+<logic:equal name="runTest"
+             value="testMessagesNamePropertyAlternateBundleEmpty">
     <bean:define id="EXPECTED_RESULTS" toScope="page">
-      Messages:
+        Messages:
     </bean:define>
 
-   <% 
-     ActionMessages messages = new ActionMessages();
-     request.setAttribute("my-key", messages);
-   %>
+    <%
+        ActionMessages messages = new ActionMessages();
+        request.setAttribute("my-key", messages);
+    %>
     <bean:define id="TEST_RESULTS" toScope="page">
-      Messages:
-      <html:messages id="message"  name="my-key" bundle="alternate" property="myproperty2">
-        Message:<bean:write name="message"/>
-      </html:messages>
+        Messages:
+        <html:messages id="message" name="my-key" bundle="alternate"
+                       property="myproperty2">
+            Message:<bean:write name="message"/>
+        </html:messages>
     </bean:define>
 </logic:equal>
 
 
-<logic:equal name="runTest" value="testMessagesNameActionMessageAlternateBundle">
+<logic:equal name="runTest"
+             value="testMessagesNameActionMessageAlternateBundle">
     <bean:define id="EXPECTED_RESULTS" toScope="page">
-      Messages:
-      
+        Messages:
+
         Message:Testing Message
-      
+
         Message:Testing Message
     </bean:define>
 
-   <% 
-     ActionMessages messages = new ActionMessages();
-     messages.add("myproperty1", new ActionMessage("alternate.bundle.message"));
-     messages.add("myproperty2", new ActionMessage("alternate.bundle.message"));
-     request.setAttribute("my-key", messages);
-   %>
+    <%
+        ActionMessages messages = new ActionMessages();
+        messages.add("myproperty1",
+                new ActionMessage("alternate.bundle.message"));
+        messages.add("myproperty2",
+                new ActionMessage("alternate.bundle.message"));
+        request.setAttribute("my-key", messages);
+    %>
     <bean:define id="TEST_RESULTS" toScope="page">
-      Messages:
-      <html:messages id="message"  name="my-key" bundle="alternate">
-        Message:<bean:write name="message"/>
-      </html:messages>
+        Messages:
+        <html:messages id="message" name="my-key" bundle="alternate">
+            Message:<bean:write name="message"/>
+        </html:messages>
     </bean:define>
 </logic:equal>
 
-<logic:equal name="runTest" value="testMessagesNamePropertyActionMessageAlternateBundle">
+<logic:equal name="runTest"
+             value="testMessagesNamePropertyActionMessageAlternateBundle">
     <bean:define id="EXPECTED_RESULTS" toScope="page">
-      Messages:
-      
+        Messages:
+
         Message:Testing Message
     </bean:define>
 
-   <% 
-     ActionMessages messages = new ActionMessages();
-     messages.add("myproperty1", new ActionMessage("alternate.bundle.message"));
-     messages.add("myproperty2", new ActionMessage("alternate.bundle.message"));
-     request.setAttribute("my-key", messages);
-   %>
+    <%
+        ActionMessages messages = new ActionMessages();
+        messages.add("myproperty1",
+                new ActionMessage("alternate.bundle.message"));
+        messages.add("myproperty2",
+                new ActionMessage("alternate.bundle.message"));
+        request.setAttribute("my-key", messages);
+    %>
     <bean:define id="TEST_RESULTS" toScope="page">
-      Messages:
-      <html:messages id="message"  name="my-key" bundle="alternate" property="myproperty2">
-        Message:<bean:write name="message"/>
-      </html:messages>
+        Messages:
+        <html:messages id="message" name="my-key" bundle="alternate"
+                       property="myproperty2">
+            Message:<bean:write name="message"/>
+        </html:messages>
     </bean:define>
 </logic:equal>
 
 
-<logic:equal name="runTest" value="testMessagesNameActionMessageAlternateBundleHeader">
+<logic:equal name="runTest"
+             value="testMessagesNameActionMessageAlternateBundleHeader">
     <bean:define id="EXPECTED_RESULTS" toScope="page">
-      Messages:
-      custom_alternate_error_header
+        Messages:
+        custom_alternate_error_header
         Message:Testing Message
-      
+
         Message:Testing Message
     </bean:define>
 
-  <% 
-     ActionMessages messages = new ActionMessages();
-     messages.add("myproperty1", new ActionMessage("alternate.bundle.message"));
-     messages.add("myproperty2", new ActionMessage("alternate.bundle.message"));
-     request.setAttribute("my-key", messages);
-   %>
+    <%
+        ActionMessages messages = new ActionMessages();
+        messages.add("myproperty1",
+                new ActionMessage("alternate.bundle.message"));
+        messages.add("myproperty2",
+                new ActionMessage("alternate.bundle.message"));
+        request.setAttribute("my-key", messages);
+    %>
     <bean:define id="TEST_RESULTS" toScope="page">
-      Messages:
-      <html:messages id="message"  name="my-key" header="custom.alternate.errors.header" bundle="alternate">
-        Message:<bean:write name="message"/>
-      </html:messages>
+        Messages:
+        <html:messages id="message" name="my-key"
+                       header="custom.alternate.errors.header"
+                       bundle="alternate">
+            Message:<bean:write name="message"/>
+        </html:messages>
     </bean:define>
 </logic:equal>
 
 
-<logic:equal name="runTest" value="testMessagesNamePropertyActionMessageAlternateBundleHeader">
+<logic:equal name="runTest"
+             value="testMessagesNamePropertyActionMessageAlternateBundleHeader">
     <bean:define id="EXPECTED_RESULTS" toScope="page">
-      Messages:
-      custom_alternate_error_header
+        Messages:
+        custom_alternate_error_header
         Message:Testing Message
     </bean:define>
 
-  <% 
-     ActionMessages messages = new ActionMessages();
-     messages.add("myproperty1", new ActionMessage("alternate.bundle.message"));
-     messages.add("myproperty2", new ActionMessage("alternate.bundle.message"));
-     request.setAttribute("my-key", messages);
-   %>
+    <%
+        ActionMessages messages = new ActionMessages();
+        messages.add("myproperty1",
+                new ActionMessage("alternate.bundle.message"));
+        messages.add("myproperty2",
+                new ActionMessage("alternate.bundle.message"));
+        request.setAttribute("my-key", messages);
+    %>
     <bean:define id="TEST_RESULTS" toScope="page">
-      Messages:
-      <html:messages id="message"  name="my-key" header="custom.alternate.errors.header" bundle="alternate" property="myproperty2">
-        Message:<bean:write name="message"/>
-      </html:messages>
+        Messages:
+        <html:messages id="message" name="my-key"
+                       header="custom.alternate.errors.header"
+                       bundle="alternate" property="myproperty2">
+            Message:<bean:write name="message"/>
+        </html:messages>
     </bean:define>
 </logic:equal>
 
-<logic:equal name="runTest" value="testMessagesNameActionMessageAlternateBundleHeaderFooter">
+<logic:equal name="runTest"
+             value="testMessagesNameActionMessageAlternateBundleHeaderFooter">
     <bean:define id="EXPECTED_RESULTS" toScope="page">
-      Messages:
-      custom_alternate_error_header
+        Messages:
+        custom_alternate_error_header
         Message:Testing Message
-      
+
         Message:Testing Message
-      custom_alternate_error_footer
+        custom_alternate_error_footer
     </bean:define>
 
-  <% 
-     ActionMessages messages = new ActionMessages();
-     messages.add("myproperty1", new ActionMessage("alternate.bundle.message"));
-     messages.add("myproperty2", new ActionMessage("alternate.bundle.message"));
-     request.setAttribute("my-key", messages);
-   %>
+    <%
+        ActionMessages messages = new ActionMessages();
+        messages.add("myproperty1",
+                new ActionMessage("alternate.bundle.message"));
+        messages.add("myproperty2",
+                new ActionMessage("alternate.bundle.message"));
+        request.setAttribute("my-key", messages);
+    %>
     <bean:define id="TEST_RESULTS" toScope="page">
-      Messages:
-      <html:messages id="message"  name="my-key" header="custom.alternate.errors.header" 
-             footer="custom.alternate.errors.footer" bundle="alternate">
-        Message:<bean:write name="message"/>
-      </html:messages>
+        Messages:
+        <html:messages id="message" name="my-key"
+                       header="custom.alternate.errors.header"
+                       footer="custom.alternate.errors.footer"
+                       bundle="alternate">
+            Message:<bean:write name="message"/>
+        </html:messages>
     </bean:define>
 </logic:equal>
 
 
-<logic:equal name="runTest" value="testMessagesNamePropertyActionMessageAlternateBundleHeaderFooter">
+<logic:equal name="runTest"
+             value="testMessagesNamePropertyActionMessageAlternateBundleHeaderFooter">
     <bean:define id="EXPECTED_RESULTS" toScope="page">
-      Messages:
-      custom_alternate_error_header
+        Messages:
+        custom_alternate_error_header
         Message:Testing Message
-      custom_alternate_error_footer
+        custom_alternate_error_footer
     </bean:define>
 
-  <% 
-     ActionMessages messages = new ActionMessages();
-     messages.add("myproperty1", new ActionMessage("alternate.bundle.message"));
-     messages.add("myproperty2", new ActionMessage("alternate.bundle.message"));
-     request.setAttribute("my-key", messages);
-   %>
+    <%
+        ActionMessages messages = new ActionMessages();
+        messages.add("myproperty1",
+                new ActionMessage("alternate.bundle.message"));
+        messages.add("myproperty2",
+                new ActionMessage("alternate.bundle.message"));
+        request.setAttribute("my-key", messages);
+    %>
     <bean:define id="TEST_RESULTS" toScope="page">
-      Messages:
-      <html:messages id="message"  name="my-key" header="custom.alternate.errors.header" 
-             footer="custom.alternate.errors.footer" bundle="alternate" property="myproperty2">
-        Message:<bean:write name="message"/>
-      </html:messages>
+        Messages:
+        <html:messages id="message" name="my-key"
+                       header="custom.alternate.errors.header"
+                       footer="custom.alternate.errors.footer"
+                       bundle="alternate" property="myproperty2">
+            Message:<bean:write name="message"/>
+        </html:messages>
     </bean:define>
 </logic:equal>
 
 
-
-
 <%
-   MessageResources messageResources  = 
-      MessageResources.getMessageResources("org.apache.struts.taglib.LocalStrings");
-
-String expected  = (String) pageContext.getAttribute("EXPECTED_RESULTS");
-String compareTo = (String) pageContext.getAttribute("TEST_RESULTS");
-
-if ((expected == null) || (compareTo == null)){
-    Assert.fail(messageResources.getMessage("tests.failure"));
-}
+    MessageResources messageResources =
+            MessageResources.getMessageResources(
+                    "org.apache.struts.taglib.LocalStrings");
+
+    String expected = (String) pageContext.getAttribute("EXPECTED_RESULTS");
+    String compareTo = (String) pageContext.getAttribute("TEST_RESULTS");
+
+    if ((expected == null) || (compareTo == null)) {
+        Assert.fail(messageResources.getMessage("tests.failure"));
+    }
 
-Assert.assertEquals(expected, compareTo);
+    Assert.assertEquals(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