You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by hu...@apache.org on 2006/02/10 22:08:50 UTC
svn commit: r376852 [10/20] -
/struts/taglib/trunk/src/webapp/org/apache/struts/taglib/html/
Modified: struts/taglib/trunk/src/webapp/org/apache/struts/taglib/html/TestLinkTag2.jsp
URL: http://svn.apache.org/viewcvs/struts/taglib/trunk/src/webapp/org/apache/struts/taglib/html/TestLinkTag2.jsp?rev=376852&r1=376851&r2=376852&view=diff
==============================================================================
--- struts/taglib/trunk/src/webapp/org/apache/struts/taglib/html/TestLinkTag2.jsp (original)
+++ struts/taglib/trunk/src/webapp/org/apache/struts/taglib/html/TestLinkTag2.jsp Fri Feb 10 13:08:44 2006
@@ -1,222 +1,264 @@
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
-<%@page import="junit.framework.Assert"%>
-<%@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" %>
<logic:equal name="runTest" value="testLinkForwardOnblur">
<bean:define id="EXPECTED_RESULTS" toScope="page">
- <html:link forward="simpleForward" onblur="onblur">Test Link</html:link>
+ <html:link forward="simpleForward" onblur="onblur">Test
+ Link</html:link>
</bean:define>
<bean:define id="TEST_RESULTS" toScope="page">
- <a href="<%=response.encodeURL( request.getContextPath() + "/path/to/non/existing/jsp.jsp")%>" onblur="onblur">Test Link</a>
+ <a href="<%=response.encodeURL( request.getContextPath() + "/path/to/non/existing/jsp.jsp")%>"
+ onblur="onblur">Test Link</a>
</bean:define>
</logic:equal>
<logic:equal name="runTest" value="testLinkForwardOnclick">
<bean:define id="EXPECTED_RESULTS" toScope="page">
- <html:link forward="simpleForward" onclick="onclick">Test Link</html:link>
+ <html:link forward="simpleForward" onclick="onclick">Test
+ Link</html:link>
</bean:define>
<bean:define id="TEST_RESULTS" toScope="page">
- <a href="<%=response.encodeURL( request.getContextPath() + "/path/to/non/existing/jsp.jsp")%>" onclick="onclick">Test Link</a>
+ <a href="<%=response.encodeURL( request.getContextPath() + "/path/to/non/existing/jsp.jsp")%>"
+ onclick="onclick">Test Link</a>
</bean:define>
</logic:equal>
<logic:equal name="runTest" value="testLinkForwardOndblclick">
<bean:define id="EXPECTED_RESULTS" toScope="page">
- <html:link forward="simpleForward" ondblclick="ondblclick">Test Link</html:link>
+ <html:link forward="simpleForward" ondblclick="ondblclick">Test
+ Link</html:link>
</bean:define>
<bean:define id="TEST_RESULTS" toScope="page">
- <a href="<%=response.encodeURL( request.getContextPath() + "/path/to/non/existing/jsp.jsp")%>" ondblclick="ondblclick">Test Link</a>
+ <a href="<%=response.encodeURL( request.getContextPath() + "/path/to/non/existing/jsp.jsp")%>"
+ ondblclick="ondblclick">Test Link</a>
</bean:define>
</logic:equal>
<logic:equal name="runTest" value="testLinkForwardOnfocus">
<bean:define id="EXPECTED_RESULTS" toScope="page">
- <html:link forward="simpleForward" onfocus="onfocus">Test Link</html:link>
+ <html:link forward="simpleForward" onfocus="onfocus">Test
+ Link</html:link>
</bean:define>
<bean:define id="TEST_RESULTS" toScope="page">
- <a href="<%=response.encodeURL( request.getContextPath() + "/path/to/non/existing/jsp.jsp")%>" onfocus="onfocus">Test Link</a>
+ <a href="<%=response.encodeURL( request.getContextPath() + "/path/to/non/existing/jsp.jsp")%>"
+ onfocus="onfocus">Test Link</a>
</bean:define>
</logic:equal>
<logic:equal name="runTest" value="testLinkForwardOnkeydown">
<bean:define id="EXPECTED_RESULTS" toScope="page">
- <html:link forward="simpleForward" onkeydown="onkeydown">Test Link</html:link>
+ <html:link forward="simpleForward" onkeydown="onkeydown">Test
+ Link</html:link>
</bean:define>
<bean:define id="TEST_RESULTS" toScope="page">
- <a href="<%=response.encodeURL( request.getContextPath() + "/path/to/non/existing/jsp.jsp")%>" onkeydown="onkeydown">Test Link</a>
+ <a href="<%=response.encodeURL( request.getContextPath() + "/path/to/non/existing/jsp.jsp")%>"
+ onkeydown="onkeydown">Test Link</a>
</bean:define>
</logic:equal>
<logic:equal name="runTest" value="testLinkForwardOnkeypress">
<bean:define id="EXPECTED_RESULTS" toScope="page">
- <html:link forward="simpleForward" onkeypress="onkeypress">Test Link</html:link>
+ <html:link forward="simpleForward" onkeypress="onkeypress">Test
+ Link</html:link>
</bean:define>
<bean:define id="TEST_RESULTS" toScope="page">
- <a href="<%=response.encodeURL( request.getContextPath() + "/path/to/non/existing/jsp.jsp")%>" onkeypress="onkeypress">Test Link</a>
+ <a href="<%=response.encodeURL( request.getContextPath() + "/path/to/non/existing/jsp.jsp")%>"
+ onkeypress="onkeypress">Test Link</a>
</bean:define>
</logic:equal>
<logic:equal name="runTest" value="testLinkForwardOnkeyup">
<bean:define id="EXPECTED_RESULTS" toScope="page">
- <html:link forward="simpleForward" onkeyup="onkeyup">Test Link</html:link>
+ <html:link forward="simpleForward" onkeyup="onkeyup">Test
+ Link</html:link>
</bean:define>
<bean:define id="TEST_RESULTS" toScope="page">
- <a href="<%=response.encodeURL( request.getContextPath() + "/path/to/non/existing/jsp.jsp")%>" onkeyup="onkeyup">Test Link</a>
+ <a href="<%=response.encodeURL( request.getContextPath() + "/path/to/non/existing/jsp.jsp")%>"
+ onkeyup="onkeyup">Test Link</a>
</bean:define>
</logic:equal>
<logic:equal name="runTest" value="testLinkForwardOnmousedown">
<bean:define id="EXPECTED_RESULTS" toScope="page">
- <html:link forward="simpleForward" onmousedown="onmousedown">Test Link</html:link>
+ <html:link forward="simpleForward" onmousedown="onmousedown">Test
+ Link</html:link>
</bean:define>
<bean:define id="TEST_RESULTS" toScope="page">
- <a href="<%=response.encodeURL( request.getContextPath() + "/path/to/non/existing/jsp.jsp")%>" onmousedown="onmousedown">Test Link</a>
+ <a href="<%=response.encodeURL( request.getContextPath() + "/path/to/non/existing/jsp.jsp")%>"
+ onmousedown="onmousedown">Test Link</a>
</bean:define>
</logic:equal>
<logic:equal name="runTest" value="testLinkForwardOnmousemove">
<bean:define id="EXPECTED_RESULTS" toScope="page">
- <html:link forward="simpleForward" onmousemove="onmousemove">Test Link</html:link>
+ <html:link forward="simpleForward" onmousemove="onmousemove">Test
+ Link</html:link>
</bean:define>
<bean:define id="TEST_RESULTS" toScope="page">
- <a href="<%=response.encodeURL( request.getContextPath() + "/path/to/non/existing/jsp.jsp")%>" onmousemove="onmousemove">Test Link</a>
+ <a href="<%=response.encodeURL( request.getContextPath() + "/path/to/non/existing/jsp.jsp")%>"
+ onmousemove="onmousemove">Test Link</a>
</bean:define>
</logic:equal>
<logic:equal name="runTest" value="testLinkForwardOnmouseout">
<bean:define id="EXPECTED_RESULTS" toScope="page">
- <html:link forward="simpleForward" onmouseout="onmouseout">Test Link</html:link>
+ <html:link forward="simpleForward" onmouseout="onmouseout">Test
+ Link</html:link>
</bean:define>
<bean:define id="TEST_RESULTS" toScope="page">
- <a href="<%=response.encodeURL( request.getContextPath() + "/path/to/non/existing/jsp.jsp")%>" onmouseout="onmouseout">Test Link</a>
+ <a href="<%=response.encodeURL( request.getContextPath() + "/path/to/non/existing/jsp.jsp")%>"
+ onmouseout="onmouseout">Test Link</a>
</bean:define>
</logic:equal>
<logic:equal name="runTest" value="testLinkForwardOnmouseover">
<bean:define id="EXPECTED_RESULTS" toScope="page">
- <html:link forward="simpleForward" onmouseover="onmouseover">Test Link</html:link>
+ <html:link forward="simpleForward" onmouseover="onmouseover">Test
+ Link</html:link>
</bean:define>
<bean:define id="TEST_RESULTS" toScope="page">
- <a href="<%=response.encodeURL( request.getContextPath() + "/path/to/non/existing/jsp.jsp")%>" onmouseover="onmouseover">Test Link</a>
+ <a href="<%=response.encodeURL( request.getContextPath() + "/path/to/non/existing/jsp.jsp")%>"
+ onmouseover="onmouseover">Test Link</a>
</bean:define>
</logic:equal>
<logic:equal name="runTest" value="testLinkForwardOnmouseup">
<bean:define id="EXPECTED_RESULTS" toScope="page">
- <html:link forward="simpleForward" onmouseup="onmouseup">Test Link</html:link>
+ <html:link forward="simpleForward" onmouseup="onmouseup">Test
+ Link</html:link>
</bean:define>
<bean:define id="TEST_RESULTS" toScope="page">
- <a href="<%=response.encodeURL( request.getContextPath() + "/path/to/non/existing/jsp.jsp")%>" onmouseup="onmouseup">Test Link</a>
+ <a href="<%=response.encodeURL( request.getContextPath() + "/path/to/non/existing/jsp.jsp")%>"
+ onmouseup="onmouseup">Test Link</a>
</bean:define>
</logic:equal>
-
-
-
-
-
-
<logic:equal name="runTest" value="testLinkForwardParamIdParamNameNoScope">
<bean:define id="TEST_RESULTS" toScope="page">
- <html:link forward="simpleForward" paramId="myParam" paramName="paramName">Test Link</html:link>
+ <html:link forward="simpleForward" paramId="myParam"
+ paramName="paramName">Test Link</html:link>
</bean:define>
<bean:define id="EXPECTED_RESULTS" toScope="page">
- <a href="<%=response.encodeURL( request.getContextPath() + "/path/to/non/existing/jsp.jsp")%>?myParam=paramValue">Test Link</a>
+ <a href="<%=response.encodeURL( request.getContextPath() + "/path/to/non/existing/jsp.jsp")%>?myParam=paramValue">Test
+ Link</a>
</bean:define>
</logic:equal>
-<logic:equal name="runTest" value="testLinkForwardParamIdParamNameParamPropertyNoScope">
+<logic:equal name="runTest"
+ value="testLinkForwardParamIdParamNameParamPropertyNoScope">
<bean:define id="TEST_RESULTS" toScope="page">
- <html:link forward="simpleForward" paramId="myParam"
- paramName="testingParamProperty" paramProperty="string">Test Link</html:link>
+ <html:link forward="simpleForward" paramId="myParam"
+ paramName="testingParamProperty" paramProperty="string">
+ Test Link</html:link>
</bean:define>
<bean:define id="EXPECTED_RESULTS" toScope="page">
- <a href="<%=response.encodeURL( request.getContextPath() + "/path/to/non/existing/jsp.jsp")%>?myParam=paramPropertyValue">Test Link</a>
+ <a href="<%=response.encodeURL( request.getContextPath() + "/path/to/non/existing/jsp.jsp")%>?myParam=paramPropertyValue">Test
+ Link</a>
</bean:define>
</logic:equal>
-<logic:equal name="runTest" value="testLinkForwardParamIdParamNameApplicationScope">
+<logic:equal name="runTest"
+ value="testLinkForwardParamIdParamNameApplicationScope">
<bean:define id="TEST_RESULTS" toScope="page">
- <html:link forward="simpleForward" paramId="myParam" paramName="paramName">Test Link</html:link>
+ <html:link forward="simpleForward" paramId="myParam"
+ paramName="paramName">Test Link</html:link>
</bean:define>
<bean:define id="EXPECTED_RESULTS" toScope="page">
- <a href="<%=response.encodeURL( request.getContextPath() + "/path/to/non/existing/jsp.jsp")%>?myParam=paramValue">Test Link</a>
+ <a href="<%=response.encodeURL( request.getContextPath() + "/path/to/non/existing/jsp.jsp")%>?myParam=paramValue">Test
+ Link</a>
</bean:define>
</logic:equal>
-<logic:equal name="runTest" value="testLinkForwardParamIdParamNameParamPropertyApplicationScope">
+<logic:equal name="runTest"
+ value="testLinkForwardParamIdParamNameParamPropertyApplicationScope">
<bean:define id="TEST_RESULTS" toScope="page">
- <html:link forward="simpleForward" paramId="myParam"
- paramName="testingParamProperty" paramProperty="string">Test Link</html:link>
+ <html:link forward="simpleForward" paramId="myParam"
+ paramName="testingParamProperty" paramProperty="string">
+ Test Link</html:link>
</bean:define>
<bean:define id="EXPECTED_RESULTS" toScope="page">
- <a href="<%=response.encodeURL( request.getContextPath() + "/path/to/non/existing/jsp.jsp")%>?myParam=paramPropertyValue">Test Link</a>
+ <a href="<%=response.encodeURL( request.getContextPath() + "/path/to/non/existing/jsp.jsp")%>?myParam=paramPropertyValue">Test
+ Link</a>
</bean:define>
</logic:equal>
-<logic:equal name="runTest" value="testLinkForwardParamIdParamNameSessionScope">
+<logic:equal name="runTest"
+ value="testLinkForwardParamIdParamNameSessionScope">
<bean:define id="TEST_RESULTS" toScope="page">
- <html:link forward="simpleForward" paramId="myParam" paramName="paramName">Test Link</html:link>
+ <html:link forward="simpleForward" paramId="myParam"
+ paramName="paramName">Test Link</html:link>
</bean:define>
<bean:define id="EXPECTED_RESULTS" toScope="page">
- <a href="<%=response.encodeURL( request.getContextPath() + "/path/to/non/existing/jsp.jsp")%>?myParam=paramValue">Test Link</a>
+ <a href="<%=response.encodeURL( request.getContextPath() + "/path/to/non/existing/jsp.jsp")%>?myParam=paramValue">Test
+ Link</a>
</bean:define>
</logic:equal>
-<logic:equal name="runTest" value="testLinkForwardParamIdParamNameParamPropertySessionScope">
+<logic:equal name="runTest"
+ value="testLinkForwardParamIdParamNameParamPropertySessionScope">
<bean:define id="TEST_RESULTS" toScope="page">
- <html:link forward="simpleForward" paramId="myParam"
- paramName="testingParamProperty" paramProperty="string">Test Link</html:link>
+ <html:link forward="simpleForward" paramId="myParam"
+ paramName="testingParamProperty" paramProperty="string">
+ Test Link</html:link>
</bean:define>
<bean:define id="EXPECTED_RESULTS" toScope="page">
- <a href="<%=response.encodeURL( request.getContextPath() + "/path/to/non/existing/jsp.jsp")%>?myParam=paramPropertyValue">Test Link</a>
+ <a href="<%=response.encodeURL( request.getContextPath() + "/path/to/non/existing/jsp.jsp")%>?myParam=paramPropertyValue">Test
+ Link</a>
</bean:define>
</logic:equal>
-<logic:equal name="runTest" value="testLinkForwardParamIdParamNameRequestScope">
+<logic:equal name="runTest"
+ value="testLinkForwardParamIdParamNameRequestScope">
<bean:define id="TEST_RESULTS" toScope="page">
- <html:link forward="simpleForward" paramId="myParam" paramName="paramName">Test Link</html:link>
+ <html:link forward="simpleForward" paramId="myParam"
+ paramName="paramName">Test Link</html:link>
</bean:define>
<bean:define id="EXPECTED_RESULTS" toScope="page">
- <a href="<%=response.encodeURL( request.getContextPath() + "/path/to/non/existing/jsp.jsp")%>?myParam=paramValue">Test Link</a>
+ <a href="<%=response.encodeURL( request.getContextPath() + "/path/to/non/existing/jsp.jsp")%>?myParam=paramValue">Test
+ Link</a>
</bean:define>
</logic:equal>
-<logic:equal name="runTest" value="testLinkForwardParamIdParamNameParamPropertyRequestScope">
+<logic:equal name="runTest"
+ value="testLinkForwardParamIdParamNameParamPropertyRequestScope">
<bean:define id="TEST_RESULTS" toScope="page">
- <html:link forward="simpleForward" paramId="myParam"
- paramName="testingParamProperty" paramProperty="string">Test Link</html:link>
+ <html:link forward="simpleForward" paramId="myParam"
+ paramName="testingParamProperty" paramProperty="string">
+ Test Link</html:link>
</bean:define>
<bean:define id="EXPECTED_RESULTS" toScope="page">
- <a href="<%=response.encodeURL( request.getContextPath() + "/path/to/non/existing/jsp.jsp")%>?myParam=paramPropertyValue">Test Link</a>
+ <a href="<%=response.encodeURL( request.getContextPath() + "/path/to/non/existing/jsp.jsp")%>?myParam=paramPropertyValue">Test
+ Link</a>
</bean:define>
</logic:equal>
-
<logic:equal name="runTest" value="testLinkForwardStyle">
<bean:define id="TEST_RESULTS" toScope="page">
<html:link forward="simpleForward" style="XXX">Test Link</html:link>
</bean:define>
<bean:define id="EXPECTED_RESULTS" toScope="page">
- <a href="<%=response.encodeURL( request.getContextPath() + "/path/to/non/existing/jsp.jsp")%>" style="XXX">Test Link</a>
+ <a href="<%=response.encodeURL( request.getContextPath() + "/path/to/non/existing/jsp.jsp")%>"
+ style="XXX">Test Link</a>
</bean:define>
</logic:equal>
<logic:equal name="runTest" value="testLinkForwardStyleClass">
<bean:define id="TEST_RESULTS" toScope="page">
- <html:link forward="simpleForward" styleClass="XXX">Test Link</html:link>
+ <html:link forward="simpleForward" styleClass="XXX">Test
+ Link</html:link>
</bean:define>
<bean:define id="EXPECTED_RESULTS" toScope="page">
- <a href="<%=response.encodeURL( request.getContextPath() + "/path/to/non/existing/jsp.jsp")%>" class="XXX">Test Link</a>
+ <a href="<%=response.encodeURL( request.getContextPath() + "/path/to/non/existing/jsp.jsp")%>"
+ class="XXX">Test Link</a>
</bean:define>
</logic:equal>
@@ -226,7 +268,8 @@
<html:link forward="simpleForward" styleId="XXX">Test Link</html:link>
</bean:define>
<bean:define id="EXPECTED_RESULTS" toScope="page">
- <a href="<%=response.encodeURL( request.getContextPath() + "/path/to/non/existing/jsp.jsp")%>" id="XXX">Test Link</a>
+ <a href="<%=response.encodeURL( request.getContextPath() + "/path/to/non/existing/jsp.jsp")%>"
+ id="XXX">Test Link</a>
</bean:define>
</logic:equal>
@@ -236,7 +279,8 @@
<html:link forward="simpleForward" tabindex="4">Test Link</html:link>
</bean:define>
<bean:define id="EXPECTED_RESULTS" toScope="page">
- <a href="<%=response.encodeURL( request.getContextPath() + "/path/to/non/existing/jsp.jsp")%>" tabindex="4">Test Link</a>
+ <a href="<%=response.encodeURL( request.getContextPath() + "/path/to/non/existing/jsp.jsp")%>"
+ tabindex="4">Test Link</a>
</bean:define>
</logic:equal>
@@ -246,7 +290,8 @@
<html:link forward="simpleForward" target="_new">Test Link</html:link>
</bean:define>
<bean:define id="EXPECTED_RESULTS" toScope="page">
- <a href="<%=response.encodeURL( request.getContextPath() + "/path/to/non/existing/jsp.jsp")%>" target="_new">Test Link</a>
+ <a href="<%=response.encodeURL( request.getContextPath() + "/path/to/non/existing/jsp.jsp")%>"
+ target="_new">Test Link</a>
</bean:define>
</logic:equal>
@@ -256,50 +301,55 @@
<html:link forward="simpleForward" title="XXX">Test Link</html:link>
</bean:define>
<bean:define id="EXPECTED_RESULTS" toScope="page">
- <a href="<%=response.encodeURL( request.getContextPath() + "/path/to/non/existing/jsp.jsp")%>" title="XXX">Test Link</a>
+ <a href="<%=response.encodeURL( request.getContextPath() + "/path/to/non/existing/jsp.jsp")%>"
+ title="XXX">Test Link</a>
</bean:define>
</logic:equal>
<logic:equal name="runTest" value="testLinkForwardTitleKey">
<bean:define id="TEST_RESULTS" toScope="page">
- <html:link forward="simpleForward" titleKey="default.bundle.message">Test Link</html:link>
+ <html:link forward="simpleForward" titleKey="default.bundle.message">
+ Test Link</html:link>
</bean:define>
<bean:define id="EXPECTED_RESULTS" toScope="page">
- <a href="<%=response.encodeURL( request.getContextPath() + "/path/to/non/existing/jsp.jsp")%>" title="Testing Message">Test Link</a>
+ <a href="<%=response.encodeURL( request.getContextPath() + "/path/to/non/existing/jsp.jsp")%>"
+ title="Testing Message">Test Link</a>
</bean:define>
</logic:equal>
<logic:equal name="runTest" value="testLinkForwardTitleKeyAlt">
<bean:define id="TEST_RESULTS" toScope="page">
- <html:link forward="simpleForward" titleKey="alternate.bundle.message" bundle="alternate">Test Link</html:link>
+ <html:link forward="simpleForward" titleKey="alternate.bundle.message"
+ bundle="alternate">Test Link</html:link>
</bean:define>
<bean:define id="EXPECTED_RESULTS" toScope="page">
- <a href="<%=response.encodeURL( request.getContextPath() + "/path/to/non/existing/jsp.jsp")%>" title="Testing Message">Test Link</a>
+ <a href="<%=response.encodeURL( request.getContextPath() + "/path/to/non/existing/jsp.jsp")%>"
+ title="Testing Message">Test Link</a>
</bean:define>
</logic:equal>
<logic:equal name="runTest" value="testLinkForwardTransaction">
<bean:define id="TEST_RESULTS" toScope="page">
- <html:link forward="simpleForward" transaction="true">Test Link</html:link>
+ <html:link forward="simpleForward" transaction="true">Test
+ Link</html:link>
</bean:define>
<bean:define id="EXPECTED_RESULTS" toScope="page">
- <a href="<%=response.encodeURL( request.getContextPath() + "/path/to/non/existing/jsp.jsp")%>?org.apache.struts.taglib.html.TOKEN=Some_Token_Here">Test Link</a>
+ <a href="<%=response.encodeURL( request.getContextPath() + "/path/to/non/existing/jsp.jsp")%>?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/TestLinkTag3.jsp
URL: http://svn.apache.org/viewcvs/struts/taglib/trunk/src/webapp/org/apache/struts/taglib/html/TestLinkTag3.jsp?rev=376852&r1=376851&r2=376852&view=diff
==============================================================================
--- struts/taglib/trunk/src/webapp/org/apache/struts/taglib/html/TestLinkTag3.jsp (original)
+++ struts/taglib/trunk/src/webapp/org/apache/struts/taglib/html/TestLinkTag3.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" %>
@@ -13,7 +11,8 @@
<html:link action="simpleAction">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, null, "simpleAction", null, null, null, false)%>">Test Link</a>
+ <a href="<%=org.apache.struts.taglib.TagUtils.getInstance().computeURL(pageContext, null, null, null, "simpleAction", null, null, null, false)%>">Test
+ Link</a>
</bean:define>
</logic:equal>
@@ -22,7 +21,8 @@
<html:link action="simpleAction" accesskey="XXX">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, null, "simpleAction", null, null, null, false)%>" accesskey="XXX">Test Link</a>
+ <a href="<%=org.apache.struts.taglib.TagUtils.getInstance().computeURL(pageContext, null, null, null, "simpleAction", null, null, null, false)%>"
+ accesskey="XXX">Test Link</a>
</bean:define>
</logic:equal>
@@ -32,192 +32,217 @@
<html:link action="simpleAction" anchor="XXX">Test Link</html:link>
</bean:define>
<bean:define id="TEST_RESULTS" toScope="page">
- <a href="<%=response.encodeURL( request.getContextPath() + "/simpleAction.do#XXX")%>">Test Link</a>
+ <a href="<%=response.encodeURL( request.getContextPath() + "/simpleAction.do#XXX")%>">Test
+ Link</a>
</bean:define>
</logic:equal>
<logic:equal name="runTest" value="testLinkActionIndexedArray">
- <bean:define id="EXPECTED_RESULTS" toScope="page">
- <logic:iterate id="indivItem" name="lst">
- <html:link action="simpleAction" indexed="true">Test Link</html:link>
- </logic:iterate>
- </bean:define>
- <bean:define id="TEST_RESULTS" toScope="page">
-
- <a href="<%=response.encodeURL( request.getContextPath() + "/simpleAction.do?index=0")%>">Test Link</a>
-
- </bean:define>
+ <bean:define id="EXPECTED_RESULTS" toScope="page">
+ <logic:iterate id="indivItem" name="lst">
+ <html:link action="simpleAction" indexed="true">Test
+ Link</html:link>
+ </logic:iterate>
+ </bean:define>
+ <bean:define id="TEST_RESULTS" toScope="page">
+
+ <a href="<%=response.encodeURL( request.getContextPath() + "/simpleAction.do?index=0")%>">Test
+ Link</a>
+
+ </bean:define>
</logic:equal>
<logic:equal name="runTest" value="testLinkActionIndexedArrayProperty">
- <bean:define id="EXPECTED_RESULTS" toScope="page">
- <logic:iterate id="indivItem" name="lst" property="list">
- <html:link action="simpleAction" indexed="true">Test Link</html:link>
- </logic:iterate>
- </bean:define>
- <bean:define id="TEST_RESULTS" toScope="page">
-
- <a href="<%=response.encodeURL( request.getContextPath() + "/simpleAction.do?index=0")%>">Test Link</a>
-
- </bean:define>
+ <bean:define id="EXPECTED_RESULTS" toScope="page">
+ <logic:iterate id="indivItem" name="lst" property="list">
+ <html:link action="simpleAction" indexed="true">Test
+ Link</html:link>
+ </logic:iterate>
+ </bean:define>
+ <bean:define id="TEST_RESULTS" toScope="page">
+
+ <a href="<%=response.encodeURL( request.getContextPath() + "/simpleAction.do?index=0")%>">Test
+ Link</a>
+
+ </bean:define>
</logic:equal>
<logic:equal name="runTest" value="testLinkActionIndexedMap">
- <bean:define id="EXPECTED_RESULTS" toScope="page">
- <logic:iterate id="indivItem" name="lst">
- <html:link action="simpleAction" indexed="true">Test Link</html:link>
- </logic:iterate>
- </bean:define>
- <bean:define id="TEST_RESULTS" toScope="page">
-
- <a href="<%=response.encodeURL( request.getContextPath() + "/simpleAction.do?index=0")%>">Test Link</a>
-
- </bean:define>
+ <bean:define id="EXPECTED_RESULTS" toScope="page">
+ <logic:iterate id="indivItem" name="lst">
+ <html:link action="simpleAction" indexed="true">Test
+ Link</html:link>
+ </logic:iterate>
+ </bean:define>
+ <bean:define id="TEST_RESULTS" toScope="page">
+
+ <a href="<%=response.encodeURL( request.getContextPath() + "/simpleAction.do?index=0")%>">Test
+ Link</a>
+
+ </bean:define>
</logic:equal>
<logic:equal name="runTest" value="testLinkActionIndexedMapProperty">
- <bean:define id="EXPECTED_RESULTS" toScope="page">
- <logic:iterate id="indivItem" name="lst" property="map">
- <html:link action="simpleAction" indexed="true">Test Link</html:link>
- </logic:iterate>
- </bean:define>
- <bean:define id="TEST_RESULTS" toScope="page">
-
- <a href="<%=response.encodeURL( request.getContextPath() + "/simpleAction.do?index=0")%>">Test Link</a>
-
- </bean:define>
+ <bean:define id="EXPECTED_RESULTS" toScope="page">
+ <logic:iterate id="indivItem" name="lst" property="map">
+ <html:link action="simpleAction" indexed="true">Test
+ Link</html:link>
+ </logic:iterate>
+ </bean:define>
+ <bean:define id="TEST_RESULTS" toScope="page">
+
+ <a href="<%=response.encodeURL( request.getContextPath() + "/simpleAction.do?index=0")%>">Test
+ Link</a>
+
+ </bean:define>
</logic:equal>
<logic:equal name="runTest" value="testLinkActionIndexedEnumeration">
- <bean:define id="EXPECTED_RESULTS" toScope="page">
- <logic:iterate id="indivItem" name="lst">
- <html:link action="simpleAction" indexed="true">Test Link</html:link>
- </logic:iterate>
- </bean:define>
- <bean:define id="TEST_RESULTS" toScope="page">
-
- <a href="<%=response.encodeURL( request.getContextPath() + "/simpleAction.do?index=0")%>">Test Link</a>
-
- <a href="<%=response.encodeURL( request.getContextPath() + "/simpleAction.do?index=1")%>">Test Link</a>
-
- </bean:define>
+ <bean:define id="EXPECTED_RESULTS" toScope="page">
+ <logic:iterate id="indivItem" name="lst">
+ <html:link action="simpleAction" indexed="true">Test
+ Link</html:link>
+ </logic:iterate>
+ </bean:define>
+ <bean:define id="TEST_RESULTS" toScope="page">
+
+ <a href="<%=response.encodeURL( request.getContextPath() + "/simpleAction.do?index=0")%>">Test
+ Link</a>
+
+ <a href="<%=response.encodeURL( request.getContextPath() + "/simpleAction.do?index=1")%>">Test
+ Link</a>
+
+ </bean:define>
</logic:equal>
<logic:equal name="runTest" value="testLinkActionIndexedEnumerationProperty">
- <bean:define id="EXPECTED_RESULTS" toScope="page">
- <logic:iterate id="indivItem" name="lst" property="enumeration">
- <html:link action="simpleAction" indexed="true">Test Link</html:link>
- </logic:iterate>
- </bean:define>
- <bean:define id="TEST_RESULTS" toScope="page">
-
- <a href="<%=response.encodeURL( request.getContextPath() + "/simpleAction.do?index=0")%>">Test Link</a>
-
- <a href="<%=response.encodeURL( request.getContextPath() + "/simpleAction.do?index=1")%>">Test Link</a>
-
- </bean:define>
+ <bean:define id="EXPECTED_RESULTS" toScope="page">
+ <logic:iterate id="indivItem" name="lst" property="enumeration">
+ <html:link action="simpleAction" indexed="true">Test
+ Link</html:link>
+ </logic:iterate>
+ </bean:define>
+ <bean:define id="TEST_RESULTS" toScope="page">
+
+ <a href="<%=response.encodeURL( request.getContextPath() + "/simpleAction.do?index=0")%>">Test
+ Link</a>
+
+ <a href="<%=response.encodeURL( request.getContextPath() + "/simpleAction.do?index=1")%>">Test
+ Link</a>
+
+ </bean:define>
</logic:equal>
+<logic:equal name="runTest" value="testLinkActionIndexedAlternateIdArray">
+ <bean:define id="EXPECTED_RESULTS" toScope="page">
+ <logic:iterate id="indivItem" name="lst">
+ <html:link action="simpleAction" indexed="true"
+ indexId="alternateId">Test Link</html:link>
+ </logic:iterate>
+ </bean:define>
+ <bean:define id="TEST_RESULTS" toScope="page">
+ <a href="<%=response.encodeURL( request.getContextPath() + "/simpleAction.do?alternateId=0")%>">Test
+ Link</a>
+ </bean:define>
+</logic:equal>
+<logic:equal name="runTest"
+ value="testLinkActionIndexedAlternateIdArrayProperty">
+ <bean:define id="EXPECTED_RESULTS" toScope="page">
+ <logic:iterate id="indivItem" name="lst" property="list">
+ <html:link action="simpleAction" indexed="true"
+ indexId="alternateId">Test Link</html:link>
+ </logic:iterate>
+ </bean:define>
+ <bean:define id="TEST_RESULTS" toScope="page">
+ <a href="<%=response.encodeURL( request.getContextPath() + "/simpleAction.do?alternateId=0")%>">Test
+ Link</a>
-<logic:equal name="runTest" value="testLinkActionIndexedAlternateIdArray">
- <bean:define id="EXPECTED_RESULTS" toScope="page">
- <logic:iterate id="indivItem" name="lst">
- <html:link action="simpleAction" indexed="true" indexId="alternateId">Test Link</html:link>
- </logic:iterate>
- </bean:define>
- <bean:define id="TEST_RESULTS" toScope="page">
-
- <a href="<%=response.encodeURL( request.getContextPath() + "/simpleAction.do?alternateId=0")%>">Test Link</a>
-
- </bean:define>
-</logic:equal>
-
-<logic:equal name="runTest" value="testLinkActionIndexedAlternateIdArrayProperty">
- <bean:define id="EXPECTED_RESULTS" toScope="page">
- <logic:iterate id="indivItem" name="lst" property="list">
- <html:link action="simpleAction" indexed="true" indexId="alternateId">Test Link</html:link>
- </logic:iterate>
- </bean:define>
- <bean:define id="TEST_RESULTS" toScope="page">
-
- <a href="<%=response.encodeURL( request.getContextPath() + "/simpleAction.do?alternateId=0")%>">Test Link</a>
-
- </bean:define>
+ </bean:define>
</logic:equal>
<logic:equal name="runTest" value="testLinkActionIndexedAlternateIdMap">
- <bean:define id="EXPECTED_RESULTS" toScope="page">
- <logic:iterate id="indivItem" name="lst">
- <html:link action="simpleAction" indexed="true" indexId="alternateId">Test Link</html:link>
- </logic:iterate>
- </bean:define>
- <bean:define id="TEST_RESULTS" toScope="page">
-
- <a href="<%=response.encodeURL( request.getContextPath() + "/simpleAction.do?alternateId=0")%>">Test Link</a>
-
- </bean:define>
-</logic:equal>
-
-<logic:equal name="runTest" value="testLinkActionIndexedAlternateIdMapProperty">
- <bean:define id="EXPECTED_RESULTS" toScope="page">
- <logic:iterate id="indivItem" name="lst" property="map">
- <html:link action="simpleAction" indexed="true" indexId="alternateId">Test Link</html:link>
- </logic:iterate>
- </bean:define>
- <bean:define id="TEST_RESULTS" toScope="page">
-
- <a href="<%=response.encodeURL( request.getContextPath() + "/simpleAction.do?alternateId=0")%>">Test Link</a>
-
- </bean:define>
-</logic:equal>
-
-<logic:equal name="runTest" value="testLinkActionIndexedAlternateIdEnumeration">
- <bean:define id="EXPECTED_RESULTS" toScope="page">
- <logic:iterate id="indivItem" name="lst">
- <html:link action="simpleAction" indexed="true" indexId="alternateId">Test Link</html:link>
- </logic:iterate>
- </bean:define>
- <bean:define id="TEST_RESULTS" toScope="page">
-
- <a href="<%=response.encodeURL( request.getContextPath() + "/simpleAction.do?alternateId=0")%>">Test Link</a>
-
- <a href="<%=response.encodeURL( request.getContextPath() + "/simpleAction.do?alternateId=1")%>">Test Link</a>
-
- </bean:define>
-</logic:equal>
-
-<logic:equal name="runTest" value="testLinkActionIndexedAlternateIdEnumerationProperty">
- <bean:define id="EXPECTED_RESULTS" toScope="page">
- <logic:iterate id="indivItem" name="lst" property="enumeration">
- <html:link action="simpleAction" indexed="true" indexId="alternateId">Test Link</html:link>
- </logic:iterate>
- </bean:define>
- <bean:define id="TEST_RESULTS" toScope="page">
-
- <a href="<%=response.encodeURL( request.getContextPath() + "/simpleAction.do?alternateId=0")%>">Test Link</a>
-
- <a href="<%=response.encodeURL( request.getContextPath() + "/simpleAction.do?alternateId=1")%>">Test Link</a>
-
- </bean:define>
+ <bean:define id="EXPECTED_RESULTS" toScope="page">
+ <logic:iterate id="indivItem" name="lst">
+ <html:link action="simpleAction" indexed="true"
+ indexId="alternateId">Test Link</html:link>
+ </logic:iterate>
+ </bean:define>
+ <bean:define id="TEST_RESULTS" toScope="page">
+
+ <a href="<%=response.encodeURL( request.getContextPath() + "/simpleAction.do?alternateId=0")%>">Test
+ Link</a>
+
+ </bean:define>
</logic:equal>
-<logic:equal name="runTest" value="testLinkActionLinkName">
+<logic:equal name="runTest"
+ value="testLinkActionIndexedAlternateIdMapProperty">
<bean:define id="EXPECTED_RESULTS" toScope="page">
- <html:link linkName="linkName">Test Link</html:link>
+ <logic:iterate id="indivItem" name="lst" property="map">
+ <html:link action="simpleAction" indexed="true"
+ indexId="alternateId">Test Link</html:link>
+ </logic:iterate>
</bean:define>
<bean:define id="TEST_RESULTS" toScope="page">
- <a name="linkName">Test Link</a>
+
+ <a href="<%=response.encodeURL( request.getContextPath() + "/simpleAction.do?alternateId=0")%>">Test
+ Link</a>
+
+ </bean:define>
+</logic:equal>
+
+<logic:equal name="runTest"
+ value="testLinkActionIndexedAlternateIdEnumeration">
+ <bean:define id="EXPECTED_RESULTS" toScope="page">
+ <logic:iterate id="indivItem" name="lst">
+ <html:link action="simpleAction" indexed="true"
+ indexId="alternateId">Test Link</html:link>
+ </logic:iterate>
+ </bean:define>
+ <bean:define id="TEST_RESULTS" toScope="page">
+
+ <a href="<%=response.encodeURL( request.getContextPath() + "/simpleAction.do?alternateId=0")%>">Test
+ Link</a>
+
+ <a href="<%=response.encodeURL( request.getContextPath() + "/simpleAction.do?alternateId=1")%>">Test
+ Link</a>
+
</bean:define>
</logic:equal>
+<logic:equal name="runTest"
+ value="testLinkActionIndexedAlternateIdEnumerationProperty">
+ <bean:define id="EXPECTED_RESULTS" toScope="page">
+ <logic:iterate id="indivItem" name="lst" property="enumeration">
+ <html:link action="simpleAction" indexed="true"
+ indexId="alternateId">Test Link</html:link>
+ </logic:iterate>
+ </bean:define>
+ <bean:define id="TEST_RESULTS" toScope="page">
+ <a href="<%=response.encodeURL( request.getContextPath() + "/simpleAction.do?alternateId=0")%>">Test
+ Link</a>
+ <a href="<%=response.encodeURL( request.getContextPath() + "/simpleAction.do?alternateId=1")%>">Test
+ Link</a>
+
+ </bean:define>
+</logic:equal>
+
+<logic:equal name="runTest" value="testLinkActionLinkName">
+ <bean:define id="EXPECTED_RESULTS" toScope="page">
+ <html:link linkName="linkName">Test Link</html:link>
+ </bean:define>
+ <bean:define id="TEST_RESULTS" toScope="page">
+ <a name="linkName">Test Link</a>
+ </bean:define>
+</logic:equal>
<logic:equal name="runTest" value="testLinkActionNameNoScope">
@@ -226,88 +251,109 @@
</bean:define>
<bean:define id="thisMap" name="paramMap" type="java.util.Map"/>
<bean:define id="TEST_RESULTS" toScope="page">
- <a href="<%=org.apache.struts.taglib.TagUtils.getInstance().computeURL(pageContext, null, null, null, "simpleAction", null, thisMap, null, false)%>">Test Link</a>
+ <a href="<%=org.apache.struts.taglib.TagUtils.getInstance().computeURL(pageContext, null, null, null, "simpleAction", null, thisMap, null, false)%>">Test
+ Link</a>
</bean:define>
</logic:equal>
<logic:equal name="runTest" value="testLinkActionNamePropertyNoScope">
- <bean:define id="EXPECTED_RESULTS" toScope="page">
- <html:link action="simpleAction" name="paramPropertyMap" property="map">Test Link</html:link>
- </bean:define>
- <bean:define id="thisMap" name="paramPropertyMap" property="map" type="java.util.Map"/>
- <bean:define id="TEST_RESULTS" toScope="page">
- <a href="<%=org.apache.struts.taglib.TagUtils.getInstance().computeURL(pageContext, null, null, null, "simpleAction", null, thisMap, null, false)%>">Test Link</a>
+ <bean:define id="EXPECTED_RESULTS" toScope="page">
+ <html:link action="simpleAction" name="paramPropertyMap"
+ property="map">Test Link</html:link>
+ </bean:define>
+ <bean:define id="thisMap" name="paramPropertyMap" property="map"
+ type="java.util.Map"/>
+ <bean:define id="TEST_RESULTS" toScope="page">
+ <a href="<%=org.apache.struts.taglib.TagUtils.getInstance().computeURL(pageContext, null, null, null, "simpleAction", null, thisMap, null, false)%>">Test
+ Link</a>
</bean:define>
</logic:equal>
<logic:equal name="runTest" value="testLinkActionNameApplicationScope">
<bean:define id="EXPECTED_RESULTS" toScope="page">
- <html:link action="simpleAction" name="paramMap" scope="application">Test Link</html:link>
+ <html:link action="simpleAction" name="paramMap" scope="application">
+ Test Link</html:link>
</bean:define>
<bean:define id="thisMap" name="paramMap" type="java.util.Map"/>
<bean:define id="TEST_RESULTS" toScope="page">
- <a href="<%=org.apache.struts.taglib.TagUtils.getInstance().computeURL(pageContext, null, null, null, "simpleAction", null, thisMap, null, false)%>">Test Link</a>
+ <a href="<%=org.apache.struts.taglib.TagUtils.getInstance().computeURL(pageContext, null, null, null, "simpleAction", null, thisMap, null, false)%>">Test
+ Link</a>
</bean:define>
</logic:equal>
-<logic:equal name="runTest" value="testLinkActionNamePropertyApplicationScope">
+<logic:equal name="runTest"
+ value="testLinkActionNamePropertyApplicationScope">
<bean:define id="EXPECTED_RESULTS" toScope="page">
- <html:link action="simpleAction" name="paramPropertyMap" property="map" scope="application">Test Link</html:link>
+ <html:link action="simpleAction" name="paramPropertyMap"
+ property="map" scope="application">Test Link</html:link>
</bean:define>
- <bean:define id="thisMap" name="paramPropertyMap" property="map" type="java.util.Map"/>
+ <bean:define id="thisMap" name="paramPropertyMap" property="map"
+ type="java.util.Map"/>
<bean:define id="TEST_RESULTS" toScope="page">
- <a href="<%=org.apache.struts.taglib.TagUtils.getInstance().computeURL(pageContext, null, null, null, "simpleAction", null, thisMap, null, false)%>">Test Link</a>
+ <a href="<%=org.apache.struts.taglib.TagUtils.getInstance().computeURL(pageContext, null, null, null, "simpleAction", null, thisMap, null, false)%>">Test
+ Link</a>
</bean:define>
</logic:equal>
<logic:equal name="runTest" value="testLinkActionNameSessionScope">
<bean:define id="EXPECTED_RESULTS" toScope="page">
- <html:link action="simpleAction" name="paramMap" scope="session">Test Link</html:link>
+ <html:link action="simpleAction" name="paramMap" scope="session">Test
+ Link</html:link>
</bean:define>
<bean:define id="thisMap" name="paramMap" type="java.util.Map"/>
<bean:define id="TEST_RESULTS" toScope="page">
- <a href="<%=org.apache.struts.taglib.TagUtils.getInstance().computeURL(pageContext, null, null, null, "simpleAction", null, thisMap, null, false)%>">Test Link</a>
+ <a href="<%=org.apache.struts.taglib.TagUtils.getInstance().computeURL(pageContext, null, null, null, "simpleAction", null, thisMap, null, false)%>">Test
+ Link</a>
</bean:define>
</logic:equal>
<logic:equal name="runTest" value="testLinkActionNamePropertySessionScope">
<bean:define id="EXPECTED_RESULTS" toScope="page">
- <html:link action="simpleAction" name="paramPropertyMap" property="map" scope="session">Test Link</html:link>
+ <html:link action="simpleAction" name="paramPropertyMap"
+ property="map" scope="session">Test Link</html:link>
</bean:define>
- <bean:define id="thisMap" name="paramPropertyMap" property="map" type="java.util.Map"/>
+ <bean:define id="thisMap" name="paramPropertyMap" property="map"
+ type="java.util.Map"/>
<bean:define id="TEST_RESULTS" toScope="page">
- <a href="<%=org.apache.struts.taglib.TagUtils.getInstance().computeURL(pageContext, null, null, null, "simpleAction", null, thisMap, null, false)%>">Test Link</a>
+ <a href="<%=org.apache.struts.taglib.TagUtils.getInstance().computeURL(pageContext, null, null, null, "simpleAction", null, thisMap, null, false)%>">Test
+ Link</a>
</bean:define>
</logic:equal>
<logic:equal name="runTest" value="testLinkActionNameRequestScope">
<bean:define id="EXPECTED_RESULTS" toScope="page">
- <html:link action="simpleAction" name="paramMap" scope="request">Test Link</html:link>
+ <html:link action="simpleAction" name="paramMap" scope="request">Test
+ Link</html:link>
</bean:define>
<bean:define id="thisMap" name="paramMap" type="java.util.Map"/>
<bean:define id="TEST_RESULTS" toScope="page">
- <a href="<%=org.apache.struts.taglib.TagUtils.getInstance().computeURL(pageContext, null, null, null, "simpleAction", null, thisMap, null, false)%>">Test Link</a>
+ <a href="<%=org.apache.struts.taglib.TagUtils.getInstance().computeURL(pageContext, null, null, null, "simpleAction", null, thisMap, null, false)%>">Test
+ Link</a>
</bean:define>
</logic:equal>
<logic:equal name="runTest" value="testLinkActionNamePropertyRequestScope">
<bean:define id="EXPECTED_RESULTS" toScope="page">
- <html:link action="simpleAction" name="paramPropertyMap" property="map" scope="request">Test Link</html:link>
+ <html:link action="simpleAction" name="paramPropertyMap"
+ property="map" scope="request">Test Link</html:link>
</bean:define>
- <bean:define id="thisMap" name="paramPropertyMap" property="map" type="java.util.Map"/>
+ <bean:define id="thisMap" name="paramPropertyMap" property="map"
+ type="java.util.Map"/>
<bean:define id="TEST_RESULTS" toScope="page">
- <a href="<%=org.apache.struts.taglib.TagUtils.getInstance().computeURL(pageContext, null, null, null, "simpleAction", null, thisMap, null, false)%>">Test Link</a>
+ <a href="<%=org.apache.struts.taglib.TagUtils.getInstance().computeURL(pageContext, null, null, null, "simpleAction", null, thisMap, null, false)%>">Test
+ Link</a>
</bean:define>
</logic:equal>
-<%
-String expected = (String) pageContext.getAttribute("EXPECTED_RESULTS");
-String compareTo = (String) pageContext.getAttribute("TEST_RESULTS");
+<%
+ 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.");
+ }
-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/TestLinkTag4.jsp
URL: http://svn.apache.org/viewcvs/struts/taglib/trunk/src/webapp/org/apache/struts/taglib/html/TestLinkTag4.jsp?rev=376852&r1=376851&r2=376852&view=diff
==============================================================================
--- struts/taglib/trunk/src/webapp/org/apache/struts/taglib/html/TestLinkTag4.jsp (original)
+++ struts/taglib/trunk/src/webapp/org/apache/struts/taglib/html/TestLinkTag4.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,213 +9,255 @@
<html:link action="simpleAction" 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, null, "simpleAction", null, null, null, false)%>" onblur="onblur">Test Link</a>
+ <a href="<%=org.apache.struts.taglib.TagUtils.getInstance().computeURL(pageContext, null, null, null, "simpleAction", null, null, null, false)%>"
+ onblur="onblur">Test Link</a>
</bean:define>
</logic:equal>
<logic:equal name="runTest" value="testLinkActionOnclick">
<bean:define id="EXPECTED_RESULTS" toScope="page">
- <html:link action="simpleAction" onclick="onclick">Test Link</html:link>
+ <html:link action="simpleAction" 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, null, "simpleAction", null, null, null, false)%>" onclick="onclick">Test Link</a>
+ <a href="<%=org.apache.struts.taglib.TagUtils.getInstance().computeURL(pageContext, null, null, null, "simpleAction", null, null, null, false)%>"
+ onclick="onclick">Test Link</a>
</bean:define>
</logic:equal>
<logic:equal name="runTest" value="testLinkActionOndblclick">
<bean:define id="EXPECTED_RESULTS" toScope="page">
- <html:link action="simpleAction" ondblclick="ondblclick">Test Link</html:link>
+ <html:link action="simpleAction" 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, null, "simpleAction", null, null, null, false)%>" ondblclick="ondblclick">Test Link</a>
+ <a href="<%=org.apache.struts.taglib.TagUtils.getInstance().computeURL(pageContext, null, null, null, "simpleAction", null, null, null, false)%>"
+ ondblclick="ondblclick">Test Link</a>
</bean:define>
</logic:equal>
<logic:equal name="runTest" value="testLinkActionOnfocus">
<bean:define id="EXPECTED_RESULTS" toScope="page">
- <html:link action="simpleAction" onfocus="onfocus">Test Link</html:link>
+ <html:link action="simpleAction" 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, null, "simpleAction", null, null, null, false)%>" onfocus="onfocus">Test Link</a>
+ <a href="<%=org.apache.struts.taglib.TagUtils.getInstance().computeURL(pageContext, null, null, null, "simpleAction", null, null, null, false)%>"
+ onfocus="onfocus">Test Link</a>
</bean:define>
</logic:equal>
<logic:equal name="runTest" value="testLinkActionOnkeydown">
<bean:define id="EXPECTED_RESULTS" toScope="page">
- <html:link action="simpleAction" onkeydown="onkeydown">Test Link</html:link>
+ <html:link action="simpleAction" 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, null, "simpleAction", null, null, null, false)%>" onkeydown="onkeydown">Test Link</a>
+ <a href="<%=org.apache.struts.taglib.TagUtils.getInstance().computeURL(pageContext, null, null, null, "simpleAction", null, null, null, false)%>"
+ onkeydown="onkeydown">Test Link</a>
</bean:define>
</logic:equal>
<logic:equal name="runTest" value="testLinkActionOnkeypress">
<bean:define id="EXPECTED_RESULTS" toScope="page">
- <html:link action="simpleAction" onkeypress="onkeypress">Test Link</html:link>
+ <html:link action="simpleAction" 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, null, "simpleAction", null, null, null, false)%>" onkeypress="onkeypress">Test Link</a>
+ <a href="<%=org.apache.struts.taglib.TagUtils.getInstance().computeURL(pageContext, null, null, null, "simpleAction", null, null, null, false)%>"
+ onkeypress="onkeypress">Test Link</a>
</bean:define>
</logic:equal>
<logic:equal name="runTest" value="testLinkActionOnkeyup">
<bean:define id="EXPECTED_RESULTS" toScope="page">
- <html:link action="simpleAction" onkeyup="onkeyup">Test Link</html:link>
+ <html:link action="simpleAction" 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, null, "simpleAction", null, null, null, false)%>" onkeyup="onkeyup">Test Link</a>
+ <a href="<%=org.apache.struts.taglib.TagUtils.getInstance().computeURL(pageContext, null, null, null, "simpleAction", null, null, null, false)%>"
+ onkeyup="onkeyup">Test Link</a>
</bean:define>
</logic:equal>
<logic:equal name="runTest" value="testLinkActionOnmousedown">
<bean:define id="EXPECTED_RESULTS" toScope="page">
- <html:link action="simpleAction" onmousedown="onmousedown">Test Link</html:link>
+ <html:link action="simpleAction" 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, null, "simpleAction", null, null, null, false)%>" onmousedown="onmousedown">Test Link</a>
+ <a href="<%=org.apache.struts.taglib.TagUtils.getInstance().computeURL(pageContext, null, null, null, "simpleAction", null, null, null, false)%>"
+ onmousedown="onmousedown">Test Link</a>
</bean:define>
</logic:equal>
<logic:equal name="runTest" value="testLinkActionOnmousemove">
<bean:define id="EXPECTED_RESULTS" toScope="page">
- <html:link action="simpleAction" onmousemove="onmousemove">Test Link</html:link>
+ <html:link action="simpleAction" 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, null, "simpleAction", null, null, null, false)%>" onmousemove="onmousemove">Test Link</a>
+ <a href="<%=org.apache.struts.taglib.TagUtils.getInstance().computeURL(pageContext, null, null, null, "simpleAction", null, null, null, false)%>"
+ onmousemove="onmousemove">Test Link</a>
</bean:define>
</logic:equal>
<logic:equal name="runTest" value="testLinkActionOnmouseout">
<bean:define id="EXPECTED_RESULTS" toScope="page">
- <html:link action="simpleAction" onmouseout="onmouseout">Test Link</html:link>
+ <html:link action="simpleAction" 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, null, "simpleAction", null, null, null, false)%>" onmouseout="onmouseout">Test Link</a>
+ <a href="<%=org.apache.struts.taglib.TagUtils.getInstance().computeURL(pageContext, null, null, null, "simpleAction", null, null, null, false)%>"
+ onmouseout="onmouseout">Test Link</a>
</bean:define>
</logic:equal>
<logic:equal name="runTest" value="testLinkActionOnmouseover">
<bean:define id="EXPECTED_RESULTS" toScope="page">
- <html:link action="simpleAction" onmouseover="onmouseover">Test Link</html:link>
+ <html:link action="simpleAction" 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, null, "simpleAction", null, null, null, false)%>" onmouseover="onmouseover">Test Link</a>
+ <a href="<%=org.apache.struts.taglib.TagUtils.getInstance().computeURL(pageContext, null, null, null, "simpleAction", null, null, null, false)%>"
+ onmouseover="onmouseover">Test Link</a>
</bean:define>
</logic:equal>
<logic:equal name="runTest" value="testLinkActionOnmouseup">
<bean:define id="EXPECTED_RESULTS" toScope="page">
- <html:link action="simpleAction" onmouseup="onmouseup">Test Link</html:link>
+ <html:link action="simpleAction" 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, null, "simpleAction", null, null, null, false)%>" onmouseup="onmouseup">Test Link</a>
+ <a href="<%=org.apache.struts.taglib.TagUtils.getInstance().computeURL(pageContext, null, null, null, "simpleAction", null, null, null, false)%>"
+ onmouseup="onmouseup">Test Link</a>
</bean:define>
</logic:equal>
-
-
-
-
-
-
<logic:equal name="runTest" value="testLinkActionParamIdParamNameNoScope">
<bean:define id="TEST_RESULTS" toScope="page">
- <html:link action="simpleAction" paramId="myParam" paramName="paramName">Test Link</html:link>
+ <html:link action="simpleAction" 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, null, "simpleAction", null, null, null, false)%>?myParam=paramValue">Test Link</a>
+ <a href="<%=org.apache.struts.taglib.TagUtils.getInstance().computeURL(pageContext, null, null, null, "simpleAction", null, null, null, false)%>?myParam=paramValue">Test
+ Link</a>
</bean:define>
</logic:equal>
-<logic:equal name="runTest" value="testLinkActionParamIdParamNameParamPropertyNoScope">
+<logic:equal name="runTest"
+ value="testLinkActionParamIdParamNameParamPropertyNoScope">
<bean:define id="TEST_RESULTS" toScope="page">
- <html:link action="simpleAction" paramId="myParam"
- paramName="testingParamProperty" paramProperty="string">Test Link</html:link>
+ <html:link action="simpleAction" 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, null, "simpleAction", null, null, null, false)%>?myParam=paramPropertyValue">Test Link</a>
+ <a href="<%=org.apache.struts.taglib.TagUtils.getInstance().computeURL(pageContext, null, null, null, "simpleAction", null, null, null, false)%>?myParam=paramPropertyValue">Test
+ Link</a>
</bean:define>
</logic:equal>
-<logic:equal name="runTest" value="testLinkActionParamIdParamNameApplicationScope">
+<logic:equal name="runTest"
+ value="testLinkActionParamIdParamNameApplicationScope">
<bean:define id="TEST_RESULTS" toScope="page">
- <html:link action="simpleAction" paramId="myParam" paramName="paramName">Test Link</html:link>
+ <html:link action="simpleAction" 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, null, "simpleAction", null, null, null, false)%>?myParam=paramValue">Test Link</a>
+ <a href="<%=org.apache.struts.taglib.TagUtils.getInstance().computeURL(pageContext, null, null, null, "simpleAction", null, null, null, false)%>?myParam=paramValue">Test
+ Link</a>
</bean:define>
</logic:equal>
-<logic:equal name="runTest" value="testLinkActionParamIdParamNameParamPropertyApplicationScope">
+<logic:equal name="runTest"
+ value="testLinkActionParamIdParamNameParamPropertyApplicationScope">
<bean:define id="TEST_RESULTS" toScope="page">
- <html:link action="simpleAction" paramId="myParam"
- paramName="testingParamProperty" paramProperty="string">Test Link</html:link>
+ <html:link action="simpleAction" 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, null, "simpleAction", null, null, null, false)%>?myParam=paramPropertyValue">Test Link</a>
+ <a href="<%=org.apache.struts.taglib.TagUtils.getInstance().computeURL(pageContext, null, null, null, "simpleAction", null, null, null, false)%>?myParam=paramPropertyValue">Test
+ Link</a>
</bean:define>
</logic:equal>
-<logic:equal name="runTest" value="testLinkActionParamIdParamNameSessionScope">
+<logic:equal name="runTest"
+ value="testLinkActionParamIdParamNameSessionScope">
<bean:define id="TEST_RESULTS" toScope="page">
- <html:link action="simpleAction" paramId="myParam" paramName="paramName">Test Link</html:link>
+ <html:link action="simpleAction" 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, null, "simpleAction", null, null, null, false)%>?myParam=paramValue">Test Link</a>
+ <a href="<%=org.apache.struts.taglib.TagUtils.getInstance().computeURL(pageContext, null, null, null, "simpleAction", null, null, null, false)%>?myParam=paramValue">Test
+ Link</a>
</bean:define>
</logic:equal>
-<logic:equal name="runTest" value="testLinkActionParamIdParamNameParamPropertySessionScope">
+<logic:equal name="runTest"
+ value="testLinkActionParamIdParamNameParamPropertySessionScope">
<bean:define id="TEST_RESULTS" toScope="page">
- <html:link action="simpleAction" paramId="myParam"
- paramName="testingParamProperty" paramProperty="string">Test Link</html:link>
+ <html:link action="simpleAction" 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, null, "simpleAction", null, null, null, false)%>?myParam=paramPropertyValue">Test Link</a>
+ <a href="<%=org.apache.struts.taglib.TagUtils.getInstance().computeURL(pageContext, null, null, null, "simpleAction", null, null, null, false)%>?myParam=paramPropertyValue">Test
+ Link</a>
</bean:define>
</logic:equal>
-<logic:equal name="runTest" value="testLinkActionParamIdParamNameRequestScope">
+<logic:equal name="runTest"
+ value="testLinkActionParamIdParamNameRequestScope">
<bean:define id="TEST_RESULTS" toScope="page">
- <html:link action="simpleAction" paramId="myParam" paramName="paramName">Test Link</html:link>
+ <html:link action="simpleAction" 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, null, "simpleAction", null, null, null, false)%>?myParam=paramValue">Test Link</a>
+ <a href="<%=org.apache.struts.taglib.TagUtils.getInstance().computeURL(pageContext, null, null, null, "simpleAction", null, null, null, false)%>?myParam=paramValue">Test
+ Link</a>
</bean:define>
</logic:equal>
-<logic:equal name="runTest" value="testLinkActionParamIdParamNameParamPropertyRequestScope">
+<logic:equal name="runTest"
+ value="testLinkActionParamIdParamNameParamPropertyRequestScope">
<bean:define id="TEST_RESULTS" toScope="page">
- <html:link action="simpleAction" paramId="myParam"
- paramName="testingParamProperty" paramProperty="string">Test Link</html:link>
+ <html:link action="simpleAction" 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, null, "simpleAction", null, null, null, false)%>?myParam=paramPropertyValue">Test Link</a>
+ <a href="<%=org.apache.struts.taglib.TagUtils.getInstance().computeURL(pageContext, null, null, null, "simpleAction", null, null, null, false)%>?myParam=paramPropertyValue">Test
+ Link</a>
</bean:define>
</logic:equal>
-
<logic:equal name="runTest" value="testLinkActionStyle">
<bean:define id="TEST_RESULTS" toScope="page">
<html:link action="simpleAction" 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, null, "simpleAction", null, null, null, false)%>" style="XXX">Test Link</a>
+ <a href="<%=org.apache.struts.taglib.TagUtils.getInstance().computeURL(pageContext, null, null, null, "simpleAction", null, null, null, false)%>"
+ style="XXX">Test Link</a>
</bean:define>
</logic:equal>
<logic:equal name="runTest" value="testLinkActionStyleClass">
<bean:define id="TEST_RESULTS" toScope="page">
- <html:link action="simpleAction" styleClass="XXX">Test Link</html:link>
+ <html:link action="simpleAction" 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, null, "simpleAction", null, null, null, false)%>" class="XXX">Test Link</a>
+ <a href="<%=org.apache.struts.taglib.TagUtils.getInstance().computeURL(pageContext, null, null, null, "simpleAction", null, null, null, false)%>"
+ class="XXX">Test Link</a>
</bean:define>
</logic:equal>
@@ -227,7 +267,8 @@
<html:link action="simpleAction" 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, null, "simpleAction", null, null, null, false)%>" id="XXX">Test Link</a>
+ <a href="<%=org.apache.struts.taglib.TagUtils.getInstance().computeURL(pageContext, null, null, null, "simpleAction", null, null, null, false)%>"
+ id="XXX">Test Link</a>
</bean:define>
</logic:equal>
@@ -237,7 +278,8 @@
<html:link action="simpleAction" 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, null, "simpleAction", null, null, null, false)%>" tabindex="4">Test Link</a>
+ <a href="<%=org.apache.struts.taglib.TagUtils.getInstance().computeURL(pageContext, null, null, null, "simpleAction", null, null, null, false)%>"
+ tabindex="4">Test Link</a>
</bean:define>
</logic:equal>
@@ -247,7 +289,8 @@
<html:link action="simpleAction" 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, null, "simpleAction", null, null, null, false)%>" target="_new">Test Link</a>
+ <a href="<%=org.apache.struts.taglib.TagUtils.getInstance().computeURL(pageContext, null, null, null, "simpleAction", null, null, null, false)%>"
+ target="_new">Test Link</a>
</bean:define>
</logic:equal>
@@ -257,41 +300,44 @@
<html:link action="simpleAction" 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, null, "simpleAction", null, null, null, false)%>" title="XXX">Test Link</a>
+ <a href="<%=org.apache.struts.taglib.TagUtils.getInstance().computeURL(pageContext, null, null, null, "simpleAction", null, null, null, false)%>"
+ title="XXX">Test Link</a>
</bean:define>
</logic:equal>
<logic:equal name="runTest" value="testLinkActionTitleKey">
<bean:define id="TEST_RESULTS" toScope="page">
- <html:link action="simpleAction" titleKey="default.bundle.message">Test Link</html:link>
+ <html:link action="simpleAction" 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, null, "simpleAction", null, null, null, false)%>" title="Testing Message">Test Link</a>
+ <a href="<%=org.apache.struts.taglib.TagUtils.getInstance().computeURL(pageContext, null, null, null, "simpleAction", null, null, null, false)%>"
+ title="Testing Message">Test Link</a>
</bean:define>
</logic:equal>
<logic:equal name="runTest" value="testLinkActionTransaction">
<bean:define id="TEST_RESULTS" toScope="page">
- <html:link action="simpleAction" transaction="true">Test Link</html:link>
+ <html:link action="simpleAction" 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, null, "simpleAction", 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, null, "simpleAction", 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);
%>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org