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 [20/20] -
/struts/taglib/trunk/src/webapp/org/apache/struts/taglib/html/
Modified: struts/taglib/trunk/src/webapp/org/apache/struts/taglib/html/TestSubmitTag2.jsp
URL: http://svn.apache.org/viewcvs/struts/taglib/trunk/src/webapp/org/apache/struts/taglib/html/TestSubmitTag2.jsp?rev=376852&r1=376851&r2=376852&view=diff
==============================================================================
--- struts/taglib/trunk/src/webapp/org/apache/struts/taglib/html/TestSubmitTag2.jsp (original)
+++ struts/taglib/trunk/src/webapp/org/apache/struts/taglib/html/TestSubmitTag2.jsp Fri Feb 10 13:08:44 2006
@@ -1,213 +1,224 @@
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
-<%@page import="junit.framework.Assert"%>
+<%@ page import="junit.framework.Assert" %>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>
<logic:equal name="runTest" value="testSubmitPropertyStyle">
- <bean:define id="TEST_RESULTS" toScope="page">
- <html:submit property="propertyName" style="Put something here"/>
- </bean:define>
- <bean:define id="EXPECTED_RESULTS" toScope="page">
- <input type="submit" name="propertyName" value="Submit" style="Put something here">
- </bean:define>
+ <bean:define id="TEST_RESULTS" toScope="page">
+ <html:submit property="propertyName" style="Put something here"/>
+ </bean:define>
+ <bean:define id="EXPECTED_RESULTS" toScope="page">
+ <input type="submit" name="propertyName" value="Submit"
+ style="Put something here">
+ </bean:define>
</logic:equal>
<logic:equal name="runTest" value="testSubmitPropertyStyleClass">
- <bean:define id="TEST_RESULTS" toScope="page">
- <html:submit property="propertyName" styleClass="Put something here"/>
- </bean:define>
- <bean:define id="EXPECTED_RESULTS" toScope="page">
- <input type="submit" name="propertyName" value="Submit" class="Put something here">
- </bean:define>
+ <bean:define id="TEST_RESULTS" toScope="page">
+ <html:submit property="propertyName" styleClass="Put something here"/>
+ </bean:define>
+ <bean:define id="EXPECTED_RESULTS" toScope="page">
+ <input type="submit" name="propertyName" value="Submit"
+ class="Put something here">
+ </bean:define>
</logic:equal>
<logic:equal name="runTest" value="testSubmitPropertyStyleId">
- <bean:define id="TEST_RESULTS" toScope="page">
- <html:submit property="propertyName" styleId="Put something here"/>
- </bean:define>
- <bean:define id="EXPECTED_RESULTS" toScope="page">
- <input type="submit" name="propertyName" value="Submit" id="Put something here">
- </bean:define>
+ <bean:define id="TEST_RESULTS" toScope="page">
+ <html:submit property="propertyName" styleId="Put something here"/>
+ </bean:define>
+ <bean:define id="EXPECTED_RESULTS" toScope="page">
+ <input type="submit" name="propertyName" value="Submit"
+ id="Put something here">
+ </bean:define>
</logic:equal>
<logic:equal name="runTest" value="testSubmitPropertyTabindex">
- <bean:define id="TEST_RESULTS" toScope="page">
- <html:submit property="propertyName" tabindex="Put something here"/>
- </bean:define>
- <bean:define id="EXPECTED_RESULTS" toScope="page">
- <input type="submit" name="propertyName" tabindex="Put something here" value="Submit">
- </bean:define>
+ <bean:define id="TEST_RESULTS" toScope="page">
+ <html:submit property="propertyName" tabindex="Put something here"/>
+ </bean:define>
+ <bean:define id="EXPECTED_RESULTS" toScope="page">
+ <input type="submit" name="propertyName" tabindex="Put something here"
+ value="Submit">
+ </bean:define>
</logic:equal>
<logic:equal name="runTest" value="testSubmitPropertyTitle">
- <bean:define id="TEST_RESULTS" toScope="page">
- <html:submit property="propertyName" title="Put something here"/>
- </bean:define>
- <bean:define id="EXPECTED_RESULTS" toScope="page">
- <input type="submit" name="propertyName" value="Submit" title="Put something here">
- </bean:define>
+ <bean:define id="TEST_RESULTS" toScope="page">
+ <html:submit property="propertyName" title="Put something here"/>
+ </bean:define>
+ <bean:define id="EXPECTED_RESULTS" toScope="page">
+ <input type="submit" name="propertyName" value="Submit"
+ title="Put something here">
+ </bean:define>
</logic:equal>
<logic:equal name="runTest" value="testSubmitPropertyTitleKey">
- <bean:define id="TEST_RESULTS" toScope="page">
- <html:submit property="propertyName" titleKey="default.bundle.message"/>
- </bean:define>
- <bean:define id="EXPECTED_RESULTS" toScope="page">
- <input type="submit" name="propertyName" value="Submit" title="Testing Message">
- </bean:define>
+ <bean:define id="TEST_RESULTS" toScope="page">
+ <html:submit property="propertyName"
+ titleKey="default.bundle.message"/>
+ </bean:define>
+ <bean:define id="EXPECTED_RESULTS" toScope="page">
+ <input type="submit" name="propertyName" value="Submit"
+ title="Testing Message">
+ </bean:define>
</logic:equal>
<logic:equal name="runTest" value="testSubmitPropertyTitleKey_fr">
- <bean:define id="TEST_RESULTS" toScope="page">
- <html:submit property="propertyName" titleKey="default.bundle.message"/>
- </bean:define>
- <bean:define id="EXPECTED_RESULTS" toScope="page">
- <input type="submit" name="propertyName" value="Submit" title="Message D'Essai">
- </bean:define>
+ <bean:define id="TEST_RESULTS" toScope="page">
+ <html:submit property="propertyName"
+ titleKey="default.bundle.message"/>
+ </bean:define>
+ <bean:define id="EXPECTED_RESULTS" toScope="page">
+ <input type="submit" name="propertyName" value="Submit"
+ title="Message D'Essai">
+ </bean:define>
</logic:equal>
<logic:equal name="runTest" value="testSubmitPropertyValue">
- <bean:define id="TEST_RESULTS" toScope="page">
- <html:submit property="propertyName" value ="Put something here"/>
- </bean:define>
- <bean:define id="EXPECTED_RESULTS" toScope="page">
- <input type="submit" name="propertyName" value="Put something here">
- </bean:define>
+ <bean:define id="TEST_RESULTS" toScope="page">
+ <html:submit property="propertyName" value="Put something here"/>
+ </bean:define>
+ <bean:define id="EXPECTED_RESULTS" toScope="page">
+ <input type="submit" name="propertyName" value="Put something here">
+ </bean:define>
</logic:equal>
<logic:equal name="runTest" value="testSubmitPropertyBodyContent">
- <bean:define id="TEST_RESULTS" toScope="page">
- <html:submit property="propertyName">Submit Value Here</html:submit>
- </bean:define>
- <bean:define id="EXPECTED_RESULTS" toScope="page">
- <input type="submit" name="propertyName" value="Submit Value Here">
- </bean:define>
+ <bean:define id="TEST_RESULTS" toScope="page">
+ <html:submit property="propertyName">Submit Value Here</html:submit>
+ </bean:define>
+ <bean:define id="EXPECTED_RESULTS" toScope="page">
+ <input type="submit" name="propertyName" value="Submit Value Here">
+ </bean:define>
</logic:equal>
<logic:equal name="runTest" value="testSubmitPropertyBodyContentMessageKey">
- <bean:define id="TEST_RESULTS" toScope="page">
- <html:submit property="propertyName">
- <bean:message key="default.bundle.message"/>
- </html:submit>
- </bean:define>
- <bean:define id="EXPECTED_RESULTS" toScope="page">
- <input type="submit" name="propertyName" value="Testing Message">
- </bean:define>
+ <bean:define id="TEST_RESULTS" toScope="page">
+ <html:submit property="propertyName">
+ <bean:message key="default.bundle.message"/>
+ </html:submit>
+ </bean:define>
+ <bean:define id="EXPECTED_RESULTS" toScope="page">
+ <input type="submit" name="propertyName" value="Testing Message">
+ </bean:define>
</logic:equal>
-<logic:equal name="runTest" value="testSubmitPropertyBodyContentMessageKey_fr">
- <bean:define id="TEST_RESULTS" toScope="page">
- <html:submit property="propertyName">
- <bean:message key="default.bundle.message"/>
- </html:submit>
- </bean:define>
- <bean:define id="EXPECTED_RESULTS" toScope="page">
- <input type="submit" name="propertyName" value="Message D'Essai">
- </bean:define>
+<logic:equal name="runTest"
+ value="testSubmitPropertyBodyContentMessageKey_fr">
+ <bean:define id="TEST_RESULTS" toScope="page">
+ <html:submit property="propertyName">
+ <bean:message key="default.bundle.message"/>
+ </html:submit>
+ </bean:define>
+ <bean:define id="EXPECTED_RESULTS" toScope="page">
+ <input type="submit" name="propertyName" value="Message D'Essai">
+ </bean:define>
</logic:equal>
<logic:equal name="runTest" value="testSubmitPropertyIndexedArray">
- <bean:define id="TEST_RESULTS" toScope="page">
- <logic:iterate id="indivItem" name="lst">
- <html:submit property="propertyName" indexed="true"/>
- </logic:iterate>
- </bean:define>
- <bean:define id="EXPECTED_RESULTS" toScope="page">
-
- <input type="submit" name="propertyName[0]" value="Submit">
-
- </bean:define>
+ <bean:define id="TEST_RESULTS" toScope="page">
+ <logic:iterate id="indivItem" name="lst">
+ <html:submit property="propertyName" indexed="true"/>
+ </logic:iterate>
+ </bean:define>
+ <bean:define id="EXPECTED_RESULTS" toScope="page">
+
+ <input type="submit" name="propertyName[0]" value="Submit">
+
+ </bean:define>
</logic:equal>
<logic:equal name="runTest" value="testSubmitPropertyIndexedArrayProperty">
- <bean:define id="TEST_RESULTS" toScope="page">
- <logic:iterate id="indivItem" name="lst" property="list">
- <html:submit property="propertyName" indexed="true"/>
- </logic:iterate>
- </bean:define>
- <bean:define id="EXPECTED_RESULTS" toScope="page">
-
- <input type="submit" name="propertyName[0]" value="Submit">
-
- </bean:define>
+ <bean:define id="TEST_RESULTS" toScope="page">
+ <logic:iterate id="indivItem" name="lst" property="list">
+ <html:submit property="propertyName" indexed="true"/>
+ </logic:iterate>
+ </bean:define>
+ <bean:define id="EXPECTED_RESULTS" toScope="page">
+
+ <input type="submit" name="propertyName[0]" value="Submit">
+
+ </bean:define>
</logic:equal>
<logic:equal name="runTest" value="testSubmitPropertyIndexedMap">
- <bean:define id="TEST_RESULTS" toScope="page">
- <logic:iterate id="indivItem" name="lst">
- <html:submit property="propertyName" indexed="true"/>
- </logic:iterate>
- </bean:define>
- <bean:define id="EXPECTED_RESULTS" toScope="page">
-
- <input type="submit" name="propertyName[0]" value="Submit">
-
- </bean:define>
+ <bean:define id="TEST_RESULTS" toScope="page">
+ <logic:iterate id="indivItem" name="lst">
+ <html:submit property="propertyName" indexed="true"/>
+ </logic:iterate>
+ </bean:define>
+ <bean:define id="EXPECTED_RESULTS" toScope="page">
+
+ <input type="submit" name="propertyName[0]" value="Submit">
+
+ </bean:define>
</logic:equal>
<logic:equal name="runTest" value="testSubmitPropertyIndexedMapProperty">
- <bean:define id="TEST_RESULTS" toScope="page">
- <logic:iterate id="indivItem" name="lst" property="map">
- <html:submit property="propertyName" indexed="true"/>
- </logic:iterate>
- </bean:define>
- <bean:define id="EXPECTED_RESULTS" toScope="page">
-
- <input type="submit" name="propertyName[0]" value="Submit">
-
- </bean:define>
+ <bean:define id="TEST_RESULTS" toScope="page">
+ <logic:iterate id="indivItem" name="lst" property="map">
+ <html:submit property="propertyName" indexed="true"/>
+ </logic:iterate>
+ </bean:define>
+ <bean:define id="EXPECTED_RESULTS" toScope="page">
+
+ <input type="submit" name="propertyName[0]" value="Submit">
+
+ </bean:define>
</logic:equal>
<logic:equal name="runTest" value="testSubmitPropertyIndexedEnumeration">
- <bean:define id="TEST_RESULTS" toScope="page">
- <logic:iterate id="indivItem" name="lst">
- <html:submit property="propertyName" indexed="true"/>
- </logic:iterate>
- </bean:define>
- <bean:define id="EXPECTED_RESULTS" toScope="page">
-
- <input type="submit" name="propertyName[0]" value="Submit">
-
- <input type="submit" name="propertyName[1]" value="Submit">
-
- </bean:define>
-</logic:equal>
-
-<logic:equal name="runTest" value="testSubmitPropertyIndexedEnumerationProperty">
- <bean:define id="TEST_RESULTS" toScope="page">
- <logic:iterate id="indivItem" name="lst" property="enumeration">
- <html:submit property="propertyName" indexed="true"/>
- </logic:iterate>
- </bean:define>
- <bean:define id="EXPECTED_RESULTS" toScope="page">
-
- <input type="submit" name="propertyName[0]" value="Submit">
-
- <input type="submit" name="propertyName[1]" value="Submit">
-
- </bean:define>
+ <bean:define id="TEST_RESULTS" toScope="page">
+ <logic:iterate id="indivItem" name="lst">
+ <html:submit property="propertyName" indexed="true"/>
+ </logic:iterate>
+ </bean:define>
+ <bean:define id="EXPECTED_RESULTS" toScope="page">
+
+ <input type="submit" name="propertyName[0]" value="Submit">
+
+ <input type="submit" name="propertyName[1]" value="Submit">
+
+ </bean:define>
+</logic:equal>
+
+<logic:equal name="runTest"
+ value="testSubmitPropertyIndexedEnumerationProperty">
+ <bean:define id="TEST_RESULTS" toScope="page">
+ <logic:iterate id="indivItem" name="lst" property="enumeration">
+ <html:submit property="propertyName" indexed="true"/>
+ </logic:iterate>
+ </bean:define>
+ <bean:define id="EXPECTED_RESULTS" toScope="page">
+
+ <input type="submit" name="propertyName[0]" value="Submit">
+
+ <input type="submit" name="propertyName[1]" value="Submit">
+
+ </bean:define>
</logic:equal>
+<%
+ String expected = "";
+ String compareTo = "";
-<%
-String expected = "";
-String compareTo = "";
-
-if (pageContext.getAttribute("EXPECTED_RESULTS") == null){
- throw new javax.servlet.jsp.JspException("No tests on this page were called. Please verify that you've setup the tests correctly.");
-}else{
- expected=pageContext.getAttribute("EXPECTED_RESULTS").toString();
-}
-if (pageContext.getAttribute("TEST_RESULTS") != null){
- compareTo=pageContext.getAttribute("TEST_RESULTS").toString();
-}
+ if (pageContext.getAttribute("EXPECTED_RESULTS") == null) {
+ throw new javax.servlet.jsp.JspException(
+ "No tests on this page were called. Please verify that you've setup the tests correctly.");
+ } else {
+ expected = pageContext.getAttribute("EXPECTED_RESULTS").toString();
+ }
+ if (pageContext.getAttribute("TEST_RESULTS") != null) {
+ compareTo = pageContext.getAttribute("TEST_RESULTS").toString();
+ }
-Assert.assertEquals(expected, compareTo);
+ Assert.assertEquals(expected, compareTo);
%>
Modified: struts/taglib/trunk/src/webapp/org/apache/struts/taglib/html/TestTextTag1.jsp
URL: http://svn.apache.org/viewcvs/struts/taglib/trunk/src/webapp/org/apache/struts/taglib/html/TestTextTag1.jsp?rev=376852&r1=376851&r2=376852&view=diff
==============================================================================
--- struts/taglib/trunk/src/webapp/org/apache/struts/taglib/html/TestTextTag1.jsp (original)
+++ struts/taglib/trunk/src/webapp/org/apache/struts/taglib/html/TestTextTag1.jsp Fri Feb 10 13:08:44 2006
@@ -1,240 +1,260 @@
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
-<%@page import="junit.framework.Assert"%>
+<%@ page import="junit.framework.Assert" %>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>
<logic:equal name="runTest" value="testTextProperty">
- <bean:define id="TEST_RESULTS" toScope="page">
- <html:text property="string"/>
- </bean:define>
- <bean:define id="EXPECTED_RESULTS" toScope="page">
- <input type="text" name="string" value="Test Value">
- </bean:define>
+ <bean:define id="TEST_RESULTS" toScope="page">
+ <html:text property="string"/>
+ </bean:define>
+ <bean:define id="EXPECTED_RESULTS" toScope="page">
+ <input type="text" name="string" value="Test Value">
+ </bean:define>
</logic:equal>
<logic:equal name="runTest" value="testTextPropertyAccesskey">
- <bean:define id="TEST_RESULTS" toScope="page">
- <html:text property="string" accesskey="a"/>
- </bean:define>
- <bean:define id="EXPECTED_RESULTS" toScope="page">
- <input type="text" name="string" accesskey="a" value="Test Value">
- </bean:define>
+ <bean:define id="TEST_RESULTS" toScope="page">
+ <html:text property="string" accesskey="a"/>
+ </bean:define>
+ <bean:define id="EXPECTED_RESULTS" toScope="page">
+ <input type="text" name="string" accesskey="a" value="Test Value">
+ </bean:define>
</logic:equal>
<logic:equal name="runTest" value="testTextPropertyAlt">
- <bean:define id="TEST_RESULTS" toScope="page">
- <html:text property="string" alt="Testing alt attribute"/>
- </bean:define>
- <bean:define id="EXPECTED_RESULTS" toScope="page">
- <input type="text" name="string" value="Test Value" alt="Testing alt attribute">
- </bean:define>
+ <bean:define id="TEST_RESULTS" toScope="page">
+ <html:text property="string" alt="Testing alt attribute"/>
+ </bean:define>
+ <bean:define id="EXPECTED_RESULTS" toScope="page">
+ <input type="text" name="string" value="Test Value"
+ alt="Testing alt attribute">
+ </bean:define>
</logic:equal>
<logic:equal name="runTest" value="testTextPropertyAltKey1">
- <bean:define id="TEST_RESULTS" toScope="page">
- <html:text property="string" altKey="default.bundle.message"/>
- </bean:define>
- <bean:define id="EXPECTED_RESULTS" toScope="page">
- <input type="text" name="string" value="Test Value" alt="Testing Message">
- </bean:define>
+ <bean:define id="TEST_RESULTS" toScope="page">
+ <html:text property="string" altKey="default.bundle.message"/>
+ </bean:define>
+ <bean:define id="EXPECTED_RESULTS" toScope="page">
+ <input type="text" name="string" value="Test Value"
+ alt="Testing Message">
+ </bean:define>
</logic:equal>
<logic:equal name="runTest" value="testTextPropertyAltKey2">
- <bean:define id="TEST_RESULTS" toScope="page">
- <html:text property="string" altKey="no.such.key"/>
- </bean:define>
- <bean:define id="EXPECTED_RESULTS" toScope="page">
- <input type="text" name="string" value="Test Value">
- </bean:define>
+ <bean:define id="TEST_RESULTS" toScope="page">
+ <html:text property="string" altKey="no.such.key"/>
+ </bean:define>
+ <bean:define id="EXPECTED_RESULTS" toScope="page">
+ <input type="text" name="string" value="Test Value">
+ </bean:define>
</logic:equal>
<logic:equal name="runTest" value="testTextPropertyAltKey3">
- <bean:define id="TEST_RESULTS" toScope="page">
- <html:text property="string" altKey="alternate.bundle.message" bundle="alternate"/>
- </bean:define>
- <bean:define id="EXPECTED_RESULTS" toScope="page">
- <input type="text" name="string" value="Test Value" alt="Testing Message">
- </bean:define>
+ <bean:define id="TEST_RESULTS" toScope="page">
+ <html:text property="string" altKey="alternate.bundle.message"
+ bundle="alternate"/>
+ </bean:define>
+ <bean:define id="EXPECTED_RESULTS" toScope="page">
+ <input type="text" name="string" value="Test Value"
+ alt="Testing Message">
+ </bean:define>
</logic:equal>
<logic:equal name="runTest" value="testTextPropertyAltKey1_fr">
- <bean:define id="TEST_RESULTS" toScope="page">
- <html:text property="string" altKey="default.bundle.message"/>
- </bean:define>
- <bean:define id="EXPECTED_RESULTS" toScope="page">
- <input type="text" name="string" value="Test Value" alt="Message D'Essai">
- </bean:define>
+ <bean:define id="TEST_RESULTS" toScope="page">
+ <html:text property="string" altKey="default.bundle.message"/>
+ </bean:define>
+ <bean:define id="EXPECTED_RESULTS" toScope="page">
+ <input type="text" name="string" value="Test Value"
+ alt="Message D'Essai">
+ </bean:define>
</logic:equal>
<logic:equal name="runTest" value="testTextPropertyAltKey2_fr">
- <bean:define id="TEST_RESULTS" toScope="page">
- <html:text property="string" altKey="no.such.key"/>
- </bean:define>
- <bean:define id="EXPECTED_RESULTS" toScope="page">
- <input type="text" name="string" value="Test Value">
- </bean:define>
+ <bean:define id="TEST_RESULTS" toScope="page">
+ <html:text property="string" altKey="no.such.key"/>
+ </bean:define>
+ <bean:define id="EXPECTED_RESULTS" toScope="page">
+ <input type="text" name="string" value="Test Value">
+ </bean:define>
</logic:equal>
<logic:equal name="runTest" value="testTextPropertyDisabled">
- <bean:define id="TEST_RESULTS" toScope="page">
- <html:text property="string" disabled="true"/>
- </bean:define>
- <bean:define id="EXPECTED_RESULTS" toScope="page">
- <input type="text" name="string" value="Test Value" disabled="disabled">
- </bean:define>
+ <bean:define id="TEST_RESULTS" toScope="page">
+ <html:text property="string" disabled="true"/>
+ </bean:define>
+ <bean:define id="EXPECTED_RESULTS" toScope="page">
+ <input type="text" name="string" value="Test Value"
+ disabled="disabled">
+ </bean:define>
</logic:equal>
<logic:equal name="runTest" value="testTextPropertyMaxlength">
- <bean:define id="TEST_RESULTS" toScope="page">
- <html:text property="string" maxlength="10"/>
- </bean:define>
- <bean:define id="EXPECTED_RESULTS" toScope="page">
- <input type="text" name="string" maxlength="10" value="Test Value">
- </bean:define>
+ <bean:define id="TEST_RESULTS" toScope="page">
+ <html:text property="string" maxlength="10"/>
+ </bean:define>
+ <bean:define id="EXPECTED_RESULTS" toScope="page">
+ <input type="text" name="string" maxlength="10" value="Test Value">
+ </bean:define>
</logic:equal>
<logic:equal name="runTest" value="testTextPropertyOnblur">
- <bean:define id="TEST_RESULTS" toScope="page">
- <html:text property="string" onblur="Put script here"/>
- </bean:define>
- <bean:define id="EXPECTED_RESULTS" toScope="page">
- <input type="text" name="string" value="Test Value" onblur="Put script here">
- </bean:define>
+ <bean:define id="TEST_RESULTS" toScope="page">
+ <html:text property="string" onblur="Put script here"/>
+ </bean:define>
+ <bean:define id="EXPECTED_RESULTS" toScope="page">
+ <input type="text" name="string" value="Test Value"
+ onblur="Put script here">
+ </bean:define>
</logic:equal>
<logic:equal name="runTest" value="testTextPropertyOnchange">
- <bean:define id="TEST_RESULTS" toScope="page">
- <html:text property="string" onchange="Put script here"/>
- </bean:define>
- <bean:define id="EXPECTED_RESULTS" toScope="page">
- <input type="text" name="string" value="Test Value" onchange="Put script here">
- </bean:define>
+ <bean:define id="TEST_RESULTS" toScope="page">
+ <html:text property="string" onchange="Put script here"/>
+ </bean:define>
+ <bean:define id="EXPECTED_RESULTS" toScope="page">
+ <input type="text" name="string" value="Test Value"
+ onchange="Put script here">
+ </bean:define>
</logic:equal>
<logic:equal name="runTest" value="testTextPropertyOnclick">
- <bean:define id="TEST_RESULTS" toScope="page">
- <html:text property="string" onclick="Put script here"/>
- </bean:define>
- <bean:define id="EXPECTED_RESULTS" toScope="page">
- <input type="text" name="string" value="Test Value" onclick="Put script here">
- </bean:define>
+ <bean:define id="TEST_RESULTS" toScope="page">
+ <html:text property="string" onclick="Put script here"/>
+ </bean:define>
+ <bean:define id="EXPECTED_RESULTS" toScope="page">
+ <input type="text" name="string" value="Test Value"
+ onclick="Put script here">
+ </bean:define>
</logic:equal>
<logic:equal name="runTest" value="testTextPropertyOndblclick">
- <bean:define id="TEST_RESULTS" toScope="page">
- <html:text property="string" ondblclick="Put script here"/>
- </bean:define>
- <bean:define id="EXPECTED_RESULTS" toScope="page">
- <input type="text" name="string" value="Test Value" ondblclick="Put script here">
- </bean:define>
+ <bean:define id="TEST_RESULTS" toScope="page">
+ <html:text property="string" ondblclick="Put script here"/>
+ </bean:define>
+ <bean:define id="EXPECTED_RESULTS" toScope="page">
+ <input type="text" name="string" value="Test Value"
+ ondblclick="Put script here">
+ </bean:define>
</logic:equal>
<logic:equal name="runTest" value="testTextPropertyOnfocus">
- <bean:define id="TEST_RESULTS" toScope="page">
- <html:text property="string" onfocus="Put script here"/>
- </bean:define>
- <bean:define id="EXPECTED_RESULTS" toScope="page">
- <input type="text" name="string" value="Test Value" onfocus="Put script here">
- </bean:define>
+ <bean:define id="TEST_RESULTS" toScope="page">
+ <html:text property="string" onfocus="Put script here"/>
+ </bean:define>
+ <bean:define id="EXPECTED_RESULTS" toScope="page">
+ <input type="text" name="string" value="Test Value"
+ onfocus="Put script here">
+ </bean:define>
</logic:equal>
<logic:equal name="runTest" value="testTextPropertyOnkeydown">
- <bean:define id="TEST_RESULTS" toScope="page">
- <html:text property="string" onkeydown="Put script here"/>
- </bean:define>
- <bean:define id="EXPECTED_RESULTS" toScope="page">
- <input type="text" name="string" value="Test Value" onkeydown="Put script here">
- </bean:define>
+ <bean:define id="TEST_RESULTS" toScope="page">
+ <html:text property="string" onkeydown="Put script here"/>
+ </bean:define>
+ <bean:define id="EXPECTED_RESULTS" toScope="page">
+ <input type="text" name="string" value="Test Value"
+ onkeydown="Put script here">
+ </bean:define>
</logic:equal>
<logic:equal name="runTest" value="testTextPropertyOnkeypress">
- <bean:define id="TEST_RESULTS" toScope="page">
- <html:text property="string" onkeypress="Put script here"/>
- </bean:define>
- <bean:define id="EXPECTED_RESULTS" toScope="page">
- <input type="text" name="string" value="Test Value" onkeypress="Put script here">
- </bean:define>
+ <bean:define id="TEST_RESULTS" toScope="page">
+ <html:text property="string" onkeypress="Put script here"/>
+ </bean:define>
+ <bean:define id="EXPECTED_RESULTS" toScope="page">
+ <input type="text" name="string" value="Test Value"
+ onkeypress="Put script here">
+ </bean:define>
</logic:equal>
<logic:equal name="runTest" value="testTextPropertyOnkeyup">
- <bean:define id="TEST_RESULTS" toScope="page">
- <html:text property="string" onkeyup="Put script here"/>
- </bean:define>
- <bean:define id="EXPECTED_RESULTS" toScope="page">
- <input type="text" name="string" value="Test Value" onkeyup="Put script here">
- </bean:define>
+ <bean:define id="TEST_RESULTS" toScope="page">
+ <html:text property="string" onkeyup="Put script here"/>
+ </bean:define>
+ <bean:define id="EXPECTED_RESULTS" toScope="page">
+ <input type="text" name="string" value="Test Value"
+ onkeyup="Put script here">
+ </bean:define>
</logic:equal>
<logic:equal name="runTest" value="testTextPropertyOnmousedown">
- <bean:define id="TEST_RESULTS" toScope="page">
- <html:text property="string" onmousedown="Put script here"/>
- </bean:define>
- <bean:define id="EXPECTED_RESULTS" toScope="page">
- <input type="text" name="string" value="Test Value" onmousedown="Put script here">
- </bean:define>
+ <bean:define id="TEST_RESULTS" toScope="page">
+ <html:text property="string" onmousedown="Put script here"/>
+ </bean:define>
+ <bean:define id="EXPECTED_RESULTS" toScope="page">
+ <input type="text" name="string" value="Test Value"
+ onmousedown="Put script here">
+ </bean:define>
</logic:equal>
<logic:equal name="runTest" value="testTextPropertyOnmousemove">
- <bean:define id="TEST_RESULTS" toScope="page">
- <html:text property="string" onmousemove="Put script here"/>
- </bean:define>
- <bean:define id="EXPECTED_RESULTS" toScope="page">
- <input type="text" name="string" value="Test Value" onmousemove="Put script here">
- </bean:define>
+ <bean:define id="TEST_RESULTS" toScope="page">
+ <html:text property="string" onmousemove="Put script here"/>
+ </bean:define>
+ <bean:define id="EXPECTED_RESULTS" toScope="page">
+ <input type="text" name="string" value="Test Value"
+ onmousemove="Put script here">
+ </bean:define>
</logic:equal>
<logic:equal name="runTest" value="testTextPropertyOnmouseout">
- <bean:define id="TEST_RESULTS" toScope="page">
- <html:text property="string" onmouseout="Put script here"/>
- </bean:define>
- <bean:define id="EXPECTED_RESULTS" toScope="page">
- <input type="text" name="string" value="Test Value" onmouseout="Put script here">
- </bean:define>
+ <bean:define id="TEST_RESULTS" toScope="page">
+ <html:text property="string" onmouseout="Put script here"/>
+ </bean:define>
+ <bean:define id="EXPECTED_RESULTS" toScope="page">
+ <input type="text" name="string" value="Test Value"
+ onmouseout="Put script here">
+ </bean:define>
</logic:equal>
<logic:equal name="runTest" value="testTextPropertyOnmouseover">
- <bean:define id="TEST_RESULTS" toScope="page">
- <html:text property="string" onmouseover="Put script here"/>
- </bean:define>
- <bean:define id="EXPECTED_RESULTS" toScope="page">
- <input type="text" name="string" value="Test Value" onmouseover="Put script here">
- </bean:define>
+ <bean:define id="TEST_RESULTS" toScope="page">
+ <html:text property="string" onmouseover="Put script here"/>
+ </bean:define>
+ <bean:define id="EXPECTED_RESULTS" toScope="page">
+ <input type="text" name="string" value="Test Value"
+ onmouseover="Put script here">
+ </bean:define>
</logic:equal>
<logic:equal name="runTest" value="testTextPropertyOnmouseup">
- <bean:define id="TEST_RESULTS" toScope="page">
- <html:text property="string" onmouseup="Put script here"/>
- </bean:define>
- <bean:define id="EXPECTED_RESULTS" toScope="page">
- <input type="text" name="string" value="Test Value" onmouseup="Put script here">
- </bean:define>
+ <bean:define id="TEST_RESULTS" toScope="page">
+ <html:text property="string" onmouseup="Put script here"/>
+ </bean:define>
+ <bean:define id="EXPECTED_RESULTS" toScope="page">
+ <input type="text" name="string" value="Test Value"
+ onmouseup="Put script here">
+ </bean:define>
</logic:equal>
-<%
-String expected = "";
-String compareTo = "";
-
-if (pageContext.getAttribute("EXPECTED_RESULTS") == null){
- throw new javax.servlet.jsp.JspException("No tests on this page were called. Please verify that you've setup the tests correctly.");
-}else{
- expected=pageContext.getAttribute("EXPECTED_RESULTS").toString();
-}
-if (pageContext.getAttribute("TEST_RESULTS") != null){
- compareTo=pageContext.getAttribute("TEST_RESULTS").toString();
-}
+<%
+ String expected = "";
+ String compareTo = "";
+
+ if (pageContext.getAttribute("EXPECTED_RESULTS") == null) {
+ throw new javax.servlet.jsp.JspException(
+ "No tests on this page were called. Please verify that you've setup the tests correctly.");
+ } else {
+ expected = pageContext.getAttribute("EXPECTED_RESULTS").toString();
+ }
+ if (pageContext.getAttribute("TEST_RESULTS") != null) {
+ compareTo = pageContext.getAttribute("TEST_RESULTS").toString();
+ }
-Assert.assertEquals(expected, compareTo);
+ Assert.assertEquals(expected, compareTo);
%>
Modified: struts/taglib/trunk/src/webapp/org/apache/struts/taglib/html/TestTextTag2.jsp
URL: http://svn.apache.org/viewcvs/struts/taglib/trunk/src/webapp/org/apache/struts/taglib/html/TestTextTag2.jsp?rev=376852&r1=376851&r2=376852&view=diff
==============================================================================
--- struts/taglib/trunk/src/webapp/org/apache/struts/taglib/html/TestTextTag2.jsp (original)
+++ struts/taglib/trunk/src/webapp/org/apache/struts/taglib/html/TestTextTag2.jsp Fri Feb 10 13:08:44 2006
@@ -1,8 +1,8 @@
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
-<%@page import="junit.framework.Assert"%>
-<%@page import="org.apache.struts.Globals"%>
-<%@page import="org.apache.struts.action.ActionMessage"%>
-<%@page import="org.apache.struts.action.ActionMessages"%>
+<%@ page import="junit.framework.Assert" %>
+<%@ page import="org.apache.struts.Globals" %>
+<%@ page import="org.apache.struts.action.ActionMessage" %>
+<%@ page import="org.apache.struts.action.ActionMessages" %>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
@@ -10,227 +10,252 @@
<logic:equal name="runTest" value="testTextPropertyReadonly">
- <bean:define id="TEST_RESULTS" toScope="page">
- <html:text property="string" readonly="true"/>
- </bean:define>
- <bean:define id="EXPECTED_RESULTS" toScope="page">
- <input type="text" name="string" value="Test Value" readonly="readonly">
- </bean:define>
+ <bean:define id="TEST_RESULTS" toScope="page">
+ <html:text property="string" readonly="true"/>
+ </bean:define>
+ <bean:define id="EXPECTED_RESULTS" toScope="page">
+ <input type="text" name="string" value="Test Value"
+ readonly="readonly">
+ </bean:define>
</logic:equal>
<logic:equal name="runTest" value="testTextPropertySize">
- <bean:define id="TEST_RESULTS" toScope="page">
- <html:text property="string" size="10"/>
- </bean:define>
- <bean:define id="EXPECTED_RESULTS" toScope="page">
- <input type="text" name="string" size="10" value="Test Value">
- </bean:define>
+ <bean:define id="TEST_RESULTS" toScope="page">
+ <html:text property="string" size="10"/>
+ </bean:define>
+ <bean:define id="EXPECTED_RESULTS" toScope="page">
+ <input type="text" name="string" size="10" value="Test Value">
+ </bean:define>
</logic:equal>
<logic:equal name="runTest" value="testTextPropertyStyle">
- <bean:define id="TEST_RESULTS" toScope="page">
- <html:text property="string" style="Put something here" errorStyle="some error style"/>
- </bean:define>
- <bean:define id="EXPECTED_RESULTS" toScope="page">
- <input type="text" name="string" value="Test Value" style="Put something here">
- </bean:define>
+ <bean:define id="TEST_RESULTS" toScope="page">
+ <html:text property="string" style="Put something here"
+ errorStyle="some error style"/>
+ </bean:define>
+ <bean:define id="EXPECTED_RESULTS" toScope="page">
+ <input type="text" name="string" value="Test Value"
+ style="Put something here">
+ </bean:define>
</logic:equal>
<logic:equal name="runTest" value="testTextPropertyErrorStyle">
-<%
- ActionMessages errors = new ActionMessages();
- errors.add("string",
- new ActionMessage("default.testing.errors.tag"));
- request.setAttribute("ALT_ERROR_KEY", errors);
-%>
- <bean:define id="TEST_RESULTS" toScope="page">
- <html:text property="string" style="Put something here" errorStyle="some error style" errorKey="ALT_ERROR_KEY"/>
- </bean:define>
- <bean:define id="EXPECTED_RESULTS" toScope="page">
- <input type="text" name="string" value="Test Value" style="some error style">
- </bean:define>
+ <%
+ ActionMessages errors = new ActionMessages();
+ errors.add("string",
+ new ActionMessage("default.testing.errors.tag"));
+ request.setAttribute("ALT_ERROR_KEY", errors);
+ %>
+ <bean:define id="TEST_RESULTS" toScope="page">
+ <html:text property="string" style="Put something here"
+ errorStyle="some error style" errorKey="ALT_ERROR_KEY"/>
+ </bean:define>
+ <bean:define id="EXPECTED_RESULTS" toScope="page">
+ <input type="text" name="string" value="Test Value"
+ style="some error style">
+ </bean:define>
</logic:equal>
<logic:equal name="runTest" value="testTextPropertyStyleClass">
- <bean:define id="TEST_RESULTS" toScope="page">
- <html:text property="string" styleClass="Put something here" errorStyleClass="some error style class"/>
- </bean:define>
- <bean:define id="EXPECTED_RESULTS" toScope="page">
- <input type="text" name="string" value="Test Value" class="Put something here">
- </bean:define>
+ <bean:define id="TEST_RESULTS" toScope="page">
+ <html:text property="string" styleClass="Put something here"
+ errorStyleClass="some error style class"/>
+ </bean:define>
+ <bean:define id="EXPECTED_RESULTS" toScope="page">
+ <input type="text" name="string" value="Test Value"
+ class="Put something here">
+ </bean:define>
</logic:equal>
<logic:equal name="runTest" value="testTextPropertyErrorStyleClass">
-<%
- ActionMessages errors = new ActionMessages();
- errors.add("string",
- new ActionMessage("default.testing.errors.tag"));
- request.setAttribute(Globals.ERROR_KEY, errors);
-%>
- <bean:define id="TEST_RESULTS" toScope="page">
- <html:text property="string" styleClass="Put something here" errorStyleClass="some error style class"/>
- </bean:define>
- <bean:define id="EXPECTED_RESULTS" toScope="page">
- <input type="text" name="string" value="Test Value" class="some error style class">
- </bean:define>
+ <%
+ ActionMessages errors = new ActionMessages();
+ errors.add("string",
+ new ActionMessage("default.testing.errors.tag"));
+ request.setAttribute(Globals.ERROR_KEY, errors);
+ %>
+ <bean:define id="TEST_RESULTS" toScope="page">
+ <html:text property="string" styleClass="Put something here"
+ errorStyleClass="some error style class"/>
+ </bean:define>
+ <bean:define id="EXPECTED_RESULTS" toScope="page">
+ <input type="text" name="string" value="Test Value"
+ class="some error style class">
+ </bean:define>
</logic:equal>
<logic:equal name="runTest" value="testTextPropertyStyleId">
- <bean:define id="TEST_RESULTS" toScope="page">
- <html:text property="string" styleId="Put something here" errorStyleId="some error style id"/>
- </bean:define>
- <bean:define id="EXPECTED_RESULTS" toScope="page">
- <input type="text" name="string" value="Test Value" id="Put something here">
- </bean:define>
+ <bean:define id="TEST_RESULTS" toScope="page">
+ <html:text property="string" styleId="Put something here"
+ errorStyleId="some error style id"/>
+ </bean:define>
+ <bean:define id="EXPECTED_RESULTS" toScope="page">
+ <input type="text" name="string" value="Test Value"
+ id="Put something here">
+ </bean:define>
</logic:equal>
<logic:equal name="runTest" value="testTextPropertyErrorStyleId">
-<%
- ActionMessages errors = new ActionMessages();
- errors.add("string",
- new ActionMessage("default.testing.errors.tag"));
- request.setAttribute(Globals.ERROR_KEY, errors);
-%>
- <bean:define id="TEST_RESULTS" toScope="page">
- <html:text property="string" styleId="Put something here" errorStyleId="some error style id"/>
- </bean:define>
- <bean:define id="EXPECTED_RESULTS" toScope="page">
- <input type="text" name="string" value="Test Value" id="some error style id">
- </bean:define>
+ <%
+ ActionMessages errors = new ActionMessages();
+ errors.add("string",
+ new ActionMessage("default.testing.errors.tag"));
+ request.setAttribute(Globals.ERROR_KEY, errors);
+ %>
+ <bean:define id="TEST_RESULTS" toScope="page">
+ <html:text property="string" styleId="Put something here"
+ errorStyleId="some error style id"/>
+ </bean:define>
+ <bean:define id="EXPECTED_RESULTS" toScope="page">
+ <input type="text" name="string" value="Test Value"
+ id="some error style id">
+ </bean:define>
</logic:equal>
<logic:equal name="runTest" value="testTextPropertyTitle">
- <bean:define id="TEST_RESULTS" toScope="page">
- <html:text property="string" title="Put something here"/>
- </bean:define>
- <bean:define id="EXPECTED_RESULTS" toScope="page">
- <input type="text" name="string" value="Test Value" title="Put something here">
- </bean:define>
+ <bean:define id="TEST_RESULTS" toScope="page">
+ <html:text property="string" title="Put something here"/>
+ </bean:define>
+ <bean:define id="EXPECTED_RESULTS" toScope="page">
+ <input type="text" name="string" value="Test Value"
+ title="Put something here">
+ </bean:define>
</logic:equal>
<logic:equal name="runTest" value="testTextPropertyTitleKey">
- <bean:define id="TEST_RESULTS" toScope="page">
- <html:text property="string" titleKey="default.bundle.message"/>
- </bean:define>
- <bean:define id="EXPECTED_RESULTS" toScope="page">
- <input type="text" name="string" value="Test Value" title="Testing Message">
- </bean:define>
+ <bean:define id="TEST_RESULTS" toScope="page">
+ <html:text property="string" titleKey="default.bundle.message"/>
+ </bean:define>
+ <bean:define id="EXPECTED_RESULTS" toScope="page">
+ <input type="text" name="string" value="Test Value"
+ title="Testing Message">
+ </bean:define>
</logic:equal>
<logic:equal name="runTest" value="testTextPropertyTitleKey_fr">
- <bean:define id="TEST_RESULTS" toScope="page">
- <html:text property="string" titleKey="default.bundle.message"/>
- </bean:define>
- <bean:define id="EXPECTED_RESULTS" toScope="page">
- <input type="text" name="string" value="Test Value" title="Message D'Essai">
- </bean:define>
+ <bean:define id="TEST_RESULTS" toScope="page">
+ <html:text property="string" titleKey="default.bundle.message"/>
+ </bean:define>
+ <bean:define id="EXPECTED_RESULTS" toScope="page">
+ <input type="text" name="string" value="Test Value"
+ title="Message D'Essai">
+ </bean:define>
</logic:equal>
<logic:equal name="runTest" value="testTextPropertyValue">
- <bean:define id="TEST_RESULTS" toScope="page">
- <html:text property="string" value ="Put something here"/>
- </bean:define>
- <bean:define id="EXPECTED_RESULTS" toScope="page">
- <input type="text" name="string" value="Put something here">
- </bean:define>
+ <bean:define id="TEST_RESULTS" toScope="page">
+ <html:text property="string" value="Put something here"/>
+ </bean:define>
+ <bean:define id="EXPECTED_RESULTS" toScope="page">
+ <input type="text" name="string" value="Put something here">
+ </bean:define>
</logic:equal>
<logic:equal name="runTest" value="testTextPropertyIndexedArray">
- <bean:define id="TEST_RESULTS" toScope="page">
- <logic:iterate id="indivItem" name="lst">
- <html:text property="string" indexed="true"/>
- </logic:iterate>
- </bean:define>
- <bean:define id="EXPECTED_RESULTS" toScope="page">
-
- <input type="text" name="org.apache.struts.taglib.html.BEAN[0].string" value="Test Value">
-
- </bean:define>
+ <bean:define id="TEST_RESULTS" toScope="page">
+ <logic:iterate id="indivItem" name="lst">
+ <html:text property="string" indexed="true"/>
+ </logic:iterate>
+ </bean:define>
+ <bean:define id="EXPECTED_RESULTS" toScope="page">
+
+ <input type="text" name="org.apache.struts.taglib.html.BEAN[0].string"
+ value="Test Value">
+
+ </bean:define>
</logic:equal>
<logic:equal name="runTest" value="testTextPropertyIndexedArrayProperty">
- <bean:define id="TEST_RESULTS" toScope="page">
- <logic:iterate id="indivItem" name="lst" property="list">
- <html:text property="string" indexed="true"/>
- </logic:iterate>
- </bean:define>
- <bean:define id="EXPECTED_RESULTS" toScope="page">
-
- <input type="text" name="org.apache.struts.taglib.html.BEAN[0].string" value="Test Value">
-
- </bean:define>
+ <bean:define id="TEST_RESULTS" toScope="page">
+ <logic:iterate id="indivItem" name="lst" property="list">
+ <html:text property="string" indexed="true"/>
+ </logic:iterate>
+ </bean:define>
+ <bean:define id="EXPECTED_RESULTS" toScope="page">
+
+ <input type="text" name="org.apache.struts.taglib.html.BEAN[0].string"
+ value="Test Value">
+
+ </bean:define>
</logic:equal>
<logic:equal name="runTest" value="testTextPropertyIndexedMap">
- <bean:define id="TEST_RESULTS" toScope="page">
- <logic:iterate id="indivItem" name="lst">
- <html:text property="string" indexed="true"/>
- </logic:iterate>
- </bean:define>
- <bean:define id="EXPECTED_RESULTS" toScope="page">
-
- <input type="text" name="org.apache.struts.taglib.html.BEAN[0].string" value="Test Value">
-
- </bean:define>
+ <bean:define id="TEST_RESULTS" toScope="page">
+ <logic:iterate id="indivItem" name="lst">
+ <html:text property="string" indexed="true"/>
+ </logic:iterate>
+ </bean:define>
+ <bean:define id="EXPECTED_RESULTS" toScope="page">
+
+ <input type="text" name="org.apache.struts.taglib.html.BEAN[0].string"
+ value="Test Value">
+
+ </bean:define>
</logic:equal>
<logic:equal name="runTest" value="testTextPropertyIndexedMapProperty">
- <bean:define id="TEST_RESULTS" toScope="page">
- <logic:iterate id="indivItem" name="lst" property="map">
- <html:text property="string" indexed="true"/>
- </logic:iterate>
- </bean:define>
- <bean:define id="EXPECTED_RESULTS" toScope="page">
-
- <input type="text" name="org.apache.struts.taglib.html.BEAN[0].string" value="Test Value">
-
- </bean:define>
+ <bean:define id="TEST_RESULTS" toScope="page">
+ <logic:iterate id="indivItem" name="lst" property="map">
+ <html:text property="string" indexed="true"/>
+ </logic:iterate>
+ </bean:define>
+ <bean:define id="EXPECTED_RESULTS" toScope="page">
+
+ <input type="text" name="org.apache.struts.taglib.html.BEAN[0].string"
+ value="Test Value">
+
+ </bean:define>
</logic:equal>
<logic:equal name="runTest" value="testTextPropertyIndexedEnumeration">
- <bean:define id="TEST_RESULTS" toScope="page">
- <logic:iterate id="indivItem" name="lst">
- <html:text property="string" indexed="true"/>
- </logic:iterate>
- </bean:define>
- <bean:define id="EXPECTED_RESULTS" toScope="page">
-
- <input type="text" name="org.apache.struts.taglib.html.BEAN[0].string" value="Test Value">
-
- <input type="text" name="org.apache.struts.taglib.html.BEAN[1].string" value="Test Value">
-
- </bean:define>
-</logic:equal>
-
-<logic:equal name="runTest" value="testTextPropertyIndexedEnumerationProperty">
- <bean:define id="TEST_RESULTS" toScope="page">
- <logic:iterate id="indivItem" name="lst" property="enumeration">
- <html:text property="string" indexed="true"/>
- </logic:iterate>
- </bean:define>
- <bean:define id="EXPECTED_RESULTS" toScope="page">
-
- <input type="text" name="org.apache.struts.taglib.html.BEAN[0].string" value="Test Value">
-
- <input type="text" name="org.apache.struts.taglib.html.BEAN[1].string" value="Test Value">
-
- </bean:define>
+ <bean:define id="TEST_RESULTS" toScope="page">
+ <logic:iterate id="indivItem" name="lst">
+ <html:text property="string" indexed="true"/>
+ </logic:iterate>
+ </bean:define>
+ <bean:define id="EXPECTED_RESULTS" toScope="page">
+
+ <input type="text" name="org.apache.struts.taglib.html.BEAN[0].string"
+ value="Test Value">
+
+ <input type="text" name="org.apache.struts.taglib.html.BEAN[1].string"
+ value="Test Value">
+
+ </bean:define>
+</logic:equal>
+
+<logic:equal name="runTest"
+ value="testTextPropertyIndexedEnumerationProperty">
+ <bean:define id="TEST_RESULTS" toScope="page">
+ <logic:iterate id="indivItem" name="lst" property="enumeration">
+ <html:text property="string" indexed="true"/>
+ </logic:iterate>
+ </bean:define>
+ <bean:define id="EXPECTED_RESULTS" toScope="page">
+
+ <input type="text" name="org.apache.struts.taglib.html.BEAN[0].string"
+ value="Test Value">
+
+ <input type="text" name="org.apache.struts.taglib.html.BEAN[1].string"
+ value="Test Value">
+
+ </bean:define>
</logic:equal>
+<%
+ String expected = "";
+ String compareTo = "";
-<%
-String expected = "";
-String compareTo = "";
-
-if (pageContext.getAttribute("EXPECTED_RESULTS") == null){
- throw new javax.servlet.jsp.JspException("No tests on this page were called. Please verify that you've setup the tests correctly.");
-}else{
- expected=pageContext.getAttribute("EXPECTED_RESULTS").toString();
-}
-if (pageContext.getAttribute("TEST_RESULTS") != null){
- compareTo=pageContext.getAttribute("TEST_RESULTS").toString();
-}
+ if (pageContext.getAttribute("EXPECTED_RESULTS") == null) {
+ throw new javax.servlet.jsp.JspException(
+ "No tests on this page were called. Please verify that you've setup the tests correctly.");
+ } else {
+ expected = pageContext.getAttribute("EXPECTED_RESULTS").toString();
+ }
+ if (pageContext.getAttribute("TEST_RESULTS") != null) {
+ compareTo = pageContext.getAttribute("TEST_RESULTS").toString();
+ }
-Assert.assertEquals(expected, compareTo);
+ Assert.assertEquals(expected, compareTo);
%>
Modified: struts/taglib/trunk/src/webapp/org/apache/struts/taglib/html/TestTextareaTag1.jsp
URL: http://svn.apache.org/viewcvs/struts/taglib/trunk/src/webapp/org/apache/struts/taglib/html/TestTextareaTag1.jsp?rev=376852&r1=376851&r2=376852&view=diff
==============================================================================
--- struts/taglib/trunk/src/webapp/org/apache/struts/taglib/html/TestTextareaTag1.jsp (original)
+++ struts/taglib/trunk/src/webapp/org/apache/struts/taglib/html/TestTextareaTag1.jsp Fri Feb 10 13:08:44 2006
@@ -1,240 +1,255 @@
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
-<%@page import="junit.framework.Assert"%>
+<%@ page import="junit.framework.Assert" %>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>
<logic:equal name="runTest" value="testTextareaProperty">
- <bean:define id="TEST_RESULTS" toScope="page">
- <html:textarea property="string"/>
- </bean:define>
- <bean:define id="EXPECTED_RESULTS" toScope="page">
- <textarea name="string">Test Value</textarea>
- </bean:define>
+ <bean:define id="TEST_RESULTS" toScope="page">
+ <html:textarea property="string"/>
+ </bean:define>
+ <bean:define id="EXPECTED_RESULTS" toScope="page">
+ <textarea name="string">Test Value</textarea>
+ </bean:define>
</logic:equal>
<logic:equal name="runTest" value="testTextareaPropertyAccesskey">
- <bean:define id="TEST_RESULTS" toScope="page">
- <html:textarea property="string" accesskey="a"/>
- </bean:define>
- <bean:define id="EXPECTED_RESULTS" toScope="page">
- <textarea name="string" accesskey="a">Test Value</textarea>
- </bean:define>
+ <bean:define id="TEST_RESULTS" toScope="page">
+ <html:textarea property="string" accesskey="a"/>
+ </bean:define>
+ <bean:define id="EXPECTED_RESULTS" toScope="page">
+ <textarea name="string" accesskey="a">Test Value</textarea>
+ </bean:define>
</logic:equal>
<logic:equal name="runTest" value="testTextareaPropertyAlt">
- <bean:define id="TEST_RESULTS" toScope="page">
- <html:textarea property="string" alt="Testing alt attribute"/>
- </bean:define>
- <bean:define id="EXPECTED_RESULTS" toScope="page">
- <textarea name="string" alt="Testing alt attribute">Test Value</textarea>
- </bean:define>
+ <bean:define id="TEST_RESULTS" toScope="page">
+ <html:textarea property="string" alt="Testing alt attribute"/>
+ </bean:define>
+ <bean:define id="EXPECTED_RESULTS" toScope="page">
+ <textarea name="string" alt="Testing alt attribute">Test
+ Value</textarea>
+ </bean:define>
</logic:equal>
<logic:equal name="runTest" value="testTextareaPropertyAltKey1">
- <bean:define id="TEST_RESULTS" toScope="page">
- <html:textarea property="string" altKey="default.bundle.message"/>
- </bean:define>
- <bean:define id="EXPECTED_RESULTS" toScope="page">
- <textarea name="string" alt="Testing Message">Test Value</textarea>
- </bean:define>
+ <bean:define id="TEST_RESULTS" toScope="page">
+ <html:textarea property="string" altKey="default.bundle.message"/>
+ </bean:define>
+ <bean:define id="EXPECTED_RESULTS" toScope="page">
+ <textarea name="string" alt="Testing Message">Test Value</textarea>
+ </bean:define>
</logic:equal>
<logic:equal name="runTest" value="testTextareaPropertyAltKey2">
- <bean:define id="TEST_RESULTS" toScope="page">
- <html:textarea property="string" altKey="no.such.key"/>
- </bean:define>
- <bean:define id="EXPECTED_RESULTS" toScope="page">
- <textarea name="string">Test Value</textarea>
- </bean:define>
+ <bean:define id="TEST_RESULTS" toScope="page">
+ <html:textarea property="string" altKey="no.such.key"/>
+ </bean:define>
+ <bean:define id="EXPECTED_RESULTS" toScope="page">
+ <textarea name="string">Test Value</textarea>
+ </bean:define>
</logic:equal>
<logic:equal name="runTest" value="testTextareaPropertyAltKey3">
- <bean:define id="TEST_RESULTS" toScope="page">
- <html:textarea property="string" altKey="alternate.bundle.message" bundle="alternate"/>
- </bean:define>
- <bean:define id="EXPECTED_RESULTS" toScope="page">
- <textarea name="string" alt="Testing Message">Test Value</textarea>
- </bean:define>
+ <bean:define id="TEST_RESULTS" toScope="page">
+ <html:textarea property="string" altKey="alternate.bundle.message"
+ bundle="alternate"/>
+ </bean:define>
+ <bean:define id="EXPECTED_RESULTS" toScope="page">
+ <textarea name="string" alt="Testing Message">Test Value</textarea>
+ </bean:define>
</logic:equal>
<logic:equal name="runTest" value="testTextareaPropertyAltKey1_fr">
- <bean:define id="TEST_RESULTS" toScope="page">
- <html:textarea property="string" altKey="default.bundle.message"/>
- </bean:define>
- <bean:define id="EXPECTED_RESULTS" toScope="page">
- <textarea name="string" alt="Message D'Essai">Test Value</textarea>
- </bean:define>
+ <bean:define id="TEST_RESULTS" toScope="page">
+ <html:textarea property="string" altKey="default.bundle.message"/>
+ </bean:define>
+ <bean:define id="EXPECTED_RESULTS" toScope="page">
+ <textarea name="string" alt="Message D'Essai">Test Value</textarea>
+ </bean:define>
</logic:equal>
<logic:equal name="runTest" value="testTextareaPropertyAltKey2_fr">
- <bean:define id="TEST_RESULTS" toScope="page">
- <html:textarea property="string" altKey="no.such.key"/>
- </bean:define>
- <bean:define id="EXPECTED_RESULTS" toScope="page">
- <textarea name="string">Test Value</textarea>
- </bean:define>
+ <bean:define id="TEST_RESULTS" toScope="page">
+ <html:textarea property="string" altKey="no.such.key"/>
+ </bean:define>
+ <bean:define id="EXPECTED_RESULTS" toScope="page">
+ <textarea name="string">Test Value</textarea>
+ </bean:define>
</logic:equal>
<logic:equal name="runTest" value="testTextareaPropertyCols">
- <bean:define id="TEST_RESULTS" toScope="page">
- <html:textarea property="string" cols="10"/>
- </bean:define>
- <bean:define id="EXPECTED_RESULTS" toScope="page">
- <textarea name="string" cols="10">Test Value</textarea>
- </bean:define>
+ <bean:define id="TEST_RESULTS" toScope="page">
+ <html:textarea property="string" cols="10"/>
+ </bean:define>
+ <bean:define id="EXPECTED_RESULTS" toScope="page">
+ <textarea name="string" cols="10">Test Value</textarea>
+ </bean:define>
</logic:equal>
<logic:equal name="runTest" value="testTextareaPropertyDisabled">
- <bean:define id="TEST_RESULTS" toScope="page">
- <html:textarea property="string" disabled="true"/>
- </bean:define>
- <bean:define id="EXPECTED_RESULTS" toScope="page">
- <textarea name="string" disabled="disabled">Test Value</textarea>
- </bean:define>
+ <bean:define id="TEST_RESULTS" toScope="page">
+ <html:textarea property="string" disabled="true"/>
+ </bean:define>
+ <bean:define id="EXPECTED_RESULTS" toScope="page">
+ <textarea name="string" disabled="disabled">Test Value</textarea>
+ </bean:define>
</logic:equal>
<logic:equal name="runTest" value="testTextareaPropertyOnblur">
- <bean:define id="TEST_RESULTS" toScope="page">
- <html:textarea property="string" onblur="Put script here"/>
- </bean:define>
- <bean:define id="EXPECTED_RESULTS" toScope="page">
- <textarea name="string" onblur="Put script here">Test Value</textarea>
- </bean:define>
+ <bean:define id="TEST_RESULTS" toScope="page">
+ <html:textarea property="string" onblur="Put script here"/>
+ </bean:define>
+ <bean:define id="EXPECTED_RESULTS" toScope="page">
+ <textarea name="string" onblur="Put script here">Test Value</textarea>
+ </bean:define>
</logic:equal>
<logic:equal name="runTest" value="testTextareaPropertyOnchange">
- <bean:define id="TEST_RESULTS" toScope="page">
- <html:textarea property="string" onchange="Put script here"/>
- </bean:define>
- <bean:define id="EXPECTED_RESULTS" toScope="page">
- <textarea name="string" onchange="Put script here">Test Value</textarea>
- </bean:define>
+ <bean:define id="TEST_RESULTS" toScope="page">
+ <html:textarea property="string" onchange="Put script here"/>
+ </bean:define>
+ <bean:define id="EXPECTED_RESULTS" toScope="page">
+ <textarea name="string" onchange="Put script here">Test
+ Value</textarea>
+ </bean:define>
</logic:equal>
<logic:equal name="runTest" value="testTextareaPropertyOnclick">
- <bean:define id="TEST_RESULTS" toScope="page">
- <html:textarea property="string" onclick="Put script here"/>
- </bean:define>
- <bean:define id="EXPECTED_RESULTS" toScope="page">
- <textarea name="string" onclick="Put script here">Test Value</textarea>
- </bean:define>
+ <bean:define id="TEST_RESULTS" toScope="page">
+ <html:textarea property="string" onclick="Put script here"/>
+ </bean:define>
+ <bean:define id="EXPECTED_RESULTS" toScope="page">
+ <textarea name="string" onclick="Put script here">Test
+ Value</textarea>
+ </bean:define>
</logic:equal>
<logic:equal name="runTest" value="testTextareaPropertyOndblclick">
- <bean:define id="TEST_RESULTS" toScope="page">
- <html:textarea property="string" ondblclick="Put script here"/>
- </bean:define>
- <bean:define id="EXPECTED_RESULTS" toScope="page">
- <textarea name="string" ondblclick="Put script here">Test Value</textarea>
- </bean:define>
+ <bean:define id="TEST_RESULTS" toScope="page">
+ <html:textarea property="string" ondblclick="Put script here"/>
+ </bean:define>
+ <bean:define id="EXPECTED_RESULTS" toScope="page">
+ <textarea name="string" ondblclick="Put script here">Test
+ Value</textarea>
+ </bean:define>
</logic:equal>
<logic:equal name="runTest" value="testTextareaPropertyOnfocus">
- <bean:define id="TEST_RESULTS" toScope="page">
- <html:textarea property="string" onfocus="Put script here"/>
- </bean:define>
- <bean:define id="EXPECTED_RESULTS" toScope="page">
- <textarea name="string" onfocus="Put script here">Test Value</textarea>
- </bean:define>
+ <bean:define id="TEST_RESULTS" toScope="page">
+ <html:textarea property="string" onfocus="Put script here"/>
+ </bean:define>
+ <bean:define id="EXPECTED_RESULTS" toScope="page">
+ <textarea name="string" onfocus="Put script here">Test
+ Value</textarea>
+ </bean:define>
</logic:equal>
<logic:equal name="runTest" value="testTextareaPropertyOnkeydown">
- <bean:define id="TEST_RESULTS" toScope="page">
- <html:textarea property="string" onkeydown="Put script here"/>
- </bean:define>
- <bean:define id="EXPECTED_RESULTS" toScope="page">
- <textarea name="string" onkeydown="Put script here">Test Value</textarea>
- </bean:define>
+ <bean:define id="TEST_RESULTS" toScope="page">
+ <html:textarea property="string" onkeydown="Put script here"/>
+ </bean:define>
+ <bean:define id="EXPECTED_RESULTS" toScope="page">
+ <textarea name="string" onkeydown="Put script here">Test
+ Value</textarea>
+ </bean:define>
</logic:equal>
<logic:equal name="runTest" value="testTextareaPropertyOnkeypress">
- <bean:define id="TEST_RESULTS" toScope="page">
- <html:textarea property="string" onkeypress="Put script here"/>
- </bean:define>
- <bean:define id="EXPECTED_RESULTS" toScope="page">
- <textarea name="string" onkeypress="Put script here">Test Value</textarea>
- </bean:define>
+ <bean:define id="TEST_RESULTS" toScope="page">
+ <html:textarea property="string" onkeypress="Put script here"/>
+ </bean:define>
+ <bean:define id="EXPECTED_RESULTS" toScope="page">
+ <textarea name="string" onkeypress="Put script here">Test
+ Value</textarea>
+ </bean:define>
</logic:equal>
<logic:equal name="runTest" value="testTextareaPropertyOnkeyup">
- <bean:define id="TEST_RESULTS" toScope="page">
- <html:textarea property="string" onkeyup="Put script here"/>
- </bean:define>
- <bean:define id="EXPECTED_RESULTS" toScope="page">
- <textarea name="string" onkeyup="Put script here">Test Value</textarea>
- </bean:define>
+ <bean:define id="TEST_RESULTS" toScope="page">
+ <html:textarea property="string" onkeyup="Put script here"/>
+ </bean:define>
+ <bean:define id="EXPECTED_RESULTS" toScope="page">
+ <textarea name="string" onkeyup="Put script here">Test
+ Value</textarea>
+ </bean:define>
</logic:equal>
<logic:equal name="runTest" value="testTextareaPropertyOnmousedown">
- <bean:define id="TEST_RESULTS" toScope="page">
- <html:textarea property="string" onmousedown="Put script here"/>
- </bean:define>
- <bean:define id="EXPECTED_RESULTS" toScope="page">
- <textarea name="string" onmousedown="Put script here">Test Value</textarea>
- </bean:define>
+ <bean:define id="TEST_RESULTS" toScope="page">
+ <html:textarea property="string" onmousedown="Put script here"/>
+ </bean:define>
+ <bean:define id="EXPECTED_RESULTS" toScope="page">
+ <textarea name="string" onmousedown="Put script here">Test
+ Value</textarea>
+ </bean:define>
</logic:equal>
<logic:equal name="runTest" value="testTextareaPropertyOnmousemove">
- <bean:define id="TEST_RESULTS" toScope="page">
- <html:textarea property="string" onmousemove="Put script here"/>
- </bean:define>
- <bean:define id="EXPECTED_RESULTS" toScope="page">
- <textarea name="string" onmousemove="Put script here">Test Value</textarea>
- </bean:define>
+ <bean:define id="TEST_RESULTS" toScope="page">
+ <html:textarea property="string" onmousemove="Put script here"/>
+ </bean:define>
+ <bean:define id="EXPECTED_RESULTS" toScope="page">
+ <textarea name="string" onmousemove="Put script here">Test
+ Value</textarea>
+ </bean:define>
</logic:equal>
<logic:equal name="runTest" value="testTextareaPropertyOnmouseout">
- <bean:define id="TEST_RESULTS" toScope="page">
- <html:textarea property="string" onmouseout="Put script here"/>
- </bean:define>
- <bean:define id="EXPECTED_RESULTS" toScope="page">
- <textarea name="string" onmouseout="Put script here">Test Value</textarea>
- </bean:define>
+ <bean:define id="TEST_RESULTS" toScope="page">
+ <html:textarea property="string" onmouseout="Put script here"/>
+ </bean:define>
+ <bean:define id="EXPECTED_RESULTS" toScope="page">
+ <textarea name="string" onmouseout="Put script here">Test
+ Value</textarea>
+ </bean:define>
</logic:equal>
<logic:equal name="runTest" value="testTextareaPropertyOnmouseover">
- <bean:define id="TEST_RESULTS" toScope="page">
- <html:textarea property="string" onmouseover="Put script here"/>
- </bean:define>
- <bean:define id="EXPECTED_RESULTS" toScope="page">
- <textarea name="string" onmouseover="Put script here">Test Value</textarea>
- </bean:define>
+ <bean:define id="TEST_RESULTS" toScope="page">
+ <html:textarea property="string" onmouseover="Put script here"/>
+ </bean:define>
+ <bean:define id="EXPECTED_RESULTS" toScope="page">
+ <textarea name="string" onmouseover="Put script here">Test
+ Value</textarea>
+ </bean:define>
</logic:equal>
<logic:equal name="runTest" value="testTextareaPropertyOnmouseup">
- <bean:define id="TEST_RESULTS" toScope="page">
- <html:textarea property="string" onmouseup="Put script here"/>
- </bean:define>
- <bean:define id="EXPECTED_RESULTS" toScope="page">
- <textarea name="string" onmouseup="Put script here">Test Value</textarea>
- </bean:define>
+ <bean:define id="TEST_RESULTS" toScope="page">
+ <html:textarea property="string" onmouseup="Put script here"/>
+ </bean:define>
+ <bean:define id="EXPECTED_RESULTS" toScope="page">
+ <textarea name="string" onmouseup="Put script here">Test
+ Value</textarea>
+ </bean:define>
</logic:equal>
-<%
-String expected = "";
-String compareTo = "";
-
-if (pageContext.getAttribute("EXPECTED_RESULTS") == null){
- throw new javax.servlet.jsp.JspException("No tests on this page were called. Please verify that you've setup the tests correctly.");
-}else{
- expected=pageContext.getAttribute("EXPECTED_RESULTS").toString();
-}
-if (pageContext.getAttribute("TEST_RESULTS") != null){
- compareTo=pageContext.getAttribute("TEST_RESULTS").toString();
-}
+<%
+ String expected = "";
+ String compareTo = "";
+
+ if (pageContext.getAttribute("EXPECTED_RESULTS") == null) {
+ throw new javax.servlet.jsp.JspException(
+ "No tests on this page were called. Please verify that you've setup the tests correctly.");
+ } else {
+ expected = pageContext.getAttribute("EXPECTED_RESULTS").toString();
+ }
+ if (pageContext.getAttribute("TEST_RESULTS") != null) {
+ compareTo = pageContext.getAttribute("TEST_RESULTS").toString();
+ }
-Assert.assertEquals(expected, compareTo);
+ Assert.assertEquals(expected, compareTo);
%>
Modified: struts/taglib/trunk/src/webapp/org/apache/struts/taglib/html/TestTextareaTag2.jsp
URL: http://svn.apache.org/viewcvs/struts/taglib/trunk/src/webapp/org/apache/struts/taglib/html/TestTextareaTag2.jsp?rev=376852&r1=376851&r2=376852&view=diff
==============================================================================
--- struts/taglib/trunk/src/webapp/org/apache/struts/taglib/html/TestTextareaTag2.jsp (original)
+++ struts/taglib/trunk/src/webapp/org/apache/struts/taglib/html/TestTextareaTag2.jsp Fri Feb 10 13:08:44 2006
@@ -1,8 +1,8 @@
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
-<%@page import="junit.framework.Assert"%>
-<%@page import="org.apache.struts.Globals"%>
-<%@page import="org.apache.struts.action.ActionMessage"%>
-<%@page import="org.apache.struts.action.ActionMessages"%>
+<%@ page import="junit.framework.Assert" %>
+<%@ page import="org.apache.struts.Globals" %>
+<%@ page import="org.apache.struts.action.ActionMessage" %>
+<%@ page import="org.apache.struts.action.ActionMessages" %>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
@@ -10,227 +10,247 @@
<logic:equal name="runTest" value="testTextareaPropertyReadonly">
- <bean:define id="TEST_RESULTS" toScope="page">
- <html:textarea property="string" readonly="true"/>
- </bean:define>
- <bean:define id="EXPECTED_RESULTS" toScope="page">
- <textarea name="string" readonly="readonly">Test Value</textarea>
- </bean:define>
+ <bean:define id="TEST_RESULTS" toScope="page">
+ <html:textarea property="string" readonly="true"/>
+ </bean:define>
+ <bean:define id="EXPECTED_RESULTS" toScope="page">
+ <textarea name="string" readonly="readonly">Test Value</textarea>
+ </bean:define>
</logic:equal>
<logic:equal name="runTest" value="testTextareaPropertyRows">
- <bean:define id="TEST_RESULTS" toScope="page">
- <html:textarea property="string" rows="10"/>
- </bean:define>
- <bean:define id="EXPECTED_RESULTS" toScope="page">
- <textarea name="string" rows="10">Test Value</textarea>
- </bean:define>
+ <bean:define id="TEST_RESULTS" toScope="page">
+ <html:textarea property="string" rows="10"/>
+ </bean:define>
+ <bean:define id="EXPECTED_RESULTS" toScope="page">
+ <textarea name="string" rows="10">Test Value</textarea>
+ </bean:define>
</logic:equal>
<logic:equal name="runTest" value="testTextareaPropertyStyle">
- <bean:define id="TEST_RESULTS" toScope="page">
- <html:textarea property="string" style="Put something here" errorStyle="some error style"/>
- </bean:define>
- <bean:define id="EXPECTED_RESULTS" toScope="page">
- <textarea name="string" style="Put something here">Test Value</textarea>
- </bean:define>
+ <bean:define id="TEST_RESULTS" toScope="page">
+ <html:textarea property="string" style="Put something here"
+ errorStyle="some error style"/>
+ </bean:define>
+ <bean:define id="EXPECTED_RESULTS" toScope="page">
+ <textarea name="string" style="Put something here">Test
+ Value</textarea>
+ </bean:define>
</logic:equal>
<logic:equal name="runTest" value="testTextareaPropertyErrorStyle">
-<%
- ActionMessages errors = new ActionMessages();
- errors.add("string",
- new ActionMessage("default.testing.errors.tag"));
- request.setAttribute("ALT_ERROR_KEY", errors);
-%>
- <bean:define id="TEST_RESULTS" toScope="page">
- <html:textarea property="string" style="Put something here" errorStyle="some error style" errorKey="ALT_ERROR_KEY"/>
- </bean:define>
- <bean:define id="EXPECTED_RESULTS" toScope="page">
- <textarea name="string" style="some error style">Test Value</textarea>
- </bean:define>
+ <%
+ ActionMessages errors = new ActionMessages();
+ errors.add("string",
+ new ActionMessage("default.testing.errors.tag"));
+ request.setAttribute("ALT_ERROR_KEY", errors);
+ %>
+ <bean:define id="TEST_RESULTS" toScope="page">
+ <html:textarea property="string" style="Put something here"
+ errorStyle="some error style"
+ errorKey="ALT_ERROR_KEY"/>
+ </bean:define>
+ <bean:define id="EXPECTED_RESULTS" toScope="page">
+ <textarea name="string" style="some error style">Test Value</textarea>
+ </bean:define>
</logic:equal>
<logic:equal name="runTest" value="testTextareaPropertyStyleClass">
- <bean:define id="TEST_RESULTS" toScope="page">
- <html:textarea property="string" styleClass="Put something here" errorStyleClass="some error style class"/>
- </bean:define>
- <bean:define id="EXPECTED_RESULTS" toScope="page">
- <textarea name="string" class="Put something here">Test Value</textarea>
- </bean:define>
+ <bean:define id="TEST_RESULTS" toScope="page">
+ <html:textarea property="string" styleClass="Put something here"
+ errorStyleClass="some error style class"/>
+ </bean:define>
+ <bean:define id="EXPECTED_RESULTS" toScope="page">
+ <textarea name="string" class="Put something here">Test
+ Value</textarea>
+ </bean:define>
</logic:equal>
<logic:equal name="runTest" value="testTextareaPropertyErrorStyleClass">
-<%
- ActionMessages errors = new ActionMessages();
- errors.add("string",
- new ActionMessage("default.testing.errors.tag"));
- request.setAttribute(Globals.ERROR_KEY, errors);
-%>
- <bean:define id="TEST_RESULTS" toScope="page">
- <html:textarea property="string" styleClass="Put something here" errorStyleClass="some error style class"/>
- </bean:define>
- <bean:define id="EXPECTED_RESULTS" toScope="page">
- <textarea name="string" class="some error style class">Test Value</textarea>
- </bean:define>
+ <%
+ ActionMessages errors = new ActionMessages();
+ errors.add("string",
+ new ActionMessage("default.testing.errors.tag"));
+ request.setAttribute(Globals.ERROR_KEY, errors);
+ %>
+ <bean:define id="TEST_RESULTS" toScope="page">
+ <html:textarea property="string" styleClass="Put something here"
+ errorStyleClass="some error style class"/>
+ </bean:define>
+ <bean:define id="EXPECTED_RESULTS" toScope="page">
+ <textarea name="string" class="some error style class">Test
+ Value</textarea>
+ </bean:define>
</logic:equal>
<logic:equal name="runTest" value="testTextareaPropertyStyleId">
- <bean:define id="TEST_RESULTS" toScope="page">
- <html:textarea property="string" styleId="Put something here" errorStyleId="some error style id"/>
- </bean:define>
- <bean:define id="EXPECTED_RESULTS" toScope="page">
- <textarea name="string" id="Put something here">Test Value</textarea>
- </bean:define>
+ <bean:define id="TEST_RESULTS" toScope="page">
+ <html:textarea property="string" styleId="Put something here"
+ errorStyleId="some error style id"/>
+ </bean:define>
+ <bean:define id="EXPECTED_RESULTS" toScope="page">
+ <textarea name="string" id="Put something here">Test Value</textarea>
+ </bean:define>
</logic:equal>
<logic:equal name="runTest" value="testTextareaPropertyErrorStyleId">
-<%
- ActionMessages errors = new ActionMessages();
- errors.add("string",
- new ActionMessage("default.testing.errors.tag"));
- request.setAttribute(Globals.ERROR_KEY, errors);
-%>
- <bean:define id="TEST_RESULTS" toScope="page">
- <html:textarea property="string" styleId="Put something here" errorStyleId="some error style id"/>
- </bean:define>
- <bean:define id="EXPECTED_RESULTS" toScope="page">
- <textarea name="string" id="some error style id">Test Value</textarea>
- </bean:define>
+ <%
+ ActionMessages errors = new ActionMessages();
+ errors.add("string",
+ new ActionMessage("default.testing.errors.tag"));
+ request.setAttribute(Globals.ERROR_KEY, errors);
+ %>
+ <bean:define id="TEST_RESULTS" toScope="page">
+ <html:textarea property="string" styleId="Put something here"
+ errorStyleId="some error style id"/>
+ </bean:define>
+ <bean:define id="EXPECTED_RESULTS" toScope="page">
+ <textarea name="string" id="some error style id">Test Value</textarea>
+ </bean:define>
</logic:equal>
<logic:equal name="runTest" value="testTextareaPropertyTitle">
- <bean:define id="TEST_RESULTS" toScope="page">
- <html:textarea property="string" title="Put something here"/>
- </bean:define>
- <bean:define id="EXPECTED_RESULTS" toScope="page">
- <textarea name="string" title="Put something here">Test Value</textarea>
- </bean:define>
+ <bean:define id="TEST_RESULTS" toScope="page">
+ <html:textarea property="string" title="Put something here"/>
+ </bean:define>
+ <bean:define id="EXPECTED_RESULTS" toScope="page">
+ <textarea name="string" title="Put something here">Test
+ Value</textarea>
+ </bean:define>
</logic:equal>
<logic:equal name="runTest" value="testTextareaPropertyTitleKey">
- <bean:define id="TEST_RESULTS" toScope="page">
- <html:textarea property="string" titleKey="default.bundle.message"/>
- </bean:define>
- <bean:define id="EXPECTED_RESULTS" toScope="page">
- <textarea name="string" title="Testing Message">Test Value</textarea>
- </bean:define>
+ <bean:define id="TEST_RESULTS" toScope="page">
+ <html:textarea property="string" titleKey="default.bundle.message"/>
+ </bean:define>
+ <bean:define id="EXPECTED_RESULTS" toScope="page">
+ <textarea name="string" title="Testing Message">Test Value</textarea>
+ </bean:define>
</logic:equal>
<logic:equal name="runTest" value="testTextareaPropertyTitleKey_fr">
- <bean:define id="TEST_RESULTS" toScope="page">
- <html:textarea property="string" titleKey="default.bundle.message"/>
- </bean:define>
- <bean:define id="EXPECTED_RESULTS" toScope="page">
- <textarea name="string" title="Message D'Essai">Test Value</textarea>
- </bean:define>
+ <bean:define id="TEST_RESULTS" toScope="page">
+ <html:textarea property="string" titleKey="default.bundle.message"/>
+ </bean:define>
+ <bean:define id="EXPECTED_RESULTS" toScope="page">
+ <textarea name="string" title="Message D'Essai">Test Value</textarea>
+ </bean:define>
</logic:equal>
<logic:equal name="runTest" value="testTextareaPropertyValue">
- <bean:define id="TEST_RESULTS" toScope="page">
- <html:textarea property="string" value ="Put something here"/>
- </bean:define>
- <bean:define id="EXPECTED_RESULTS" toScope="page">
- <textarea name="string">Put something here</textarea>
- </bean:define>
+ <bean:define id="TEST_RESULTS" toScope="page">
+ <html:textarea property="string" value="Put something here"/>
+ </bean:define>
+ <bean:define id="EXPECTED_RESULTS" toScope="page">
+ <textarea name="string">Put something here</textarea>
+ </bean:define>
</logic:equal>
<logic:equal name="runTest" value="testTextareaPropertyIndexedArray">
- <bean:define id="TEST_RESULTS" toScope="page">
- <logic:iterate id="indivItem" name="lst">
- <html:textarea property="string" indexed="true"/>
- </logic:iterate>
- </bean:define>
- <bean:define id="EXPECTED_RESULTS" toScope="page">
-
- <textarea name="org.apache.struts.taglib.html.BEAN[0].string">Test Value</textarea>
-
- </bean:define>
+ <bean:define id="TEST_RESULTS" toScope="page">
+ <logic:iterate id="indivItem" name="lst">
+ <html:textarea property="string" indexed="true"/>
+ </logic:iterate>
+ </bean:define>
+ <bean:define id="EXPECTED_RESULTS" toScope="page">
+
+ <textarea name="org.apache.struts.taglib.html.BEAN[0].string">Test
+ Value</textarea>
+
+ </bean:define>
</logic:equal>
<logic:equal name="runTest" value="testTextareaPropertyIndexedArrayProperty">
- <bean:define id="TEST_RESULTS" toScope="page">
- <logic:iterate id="indivItem" name="lst" property="list">
- <html:textarea property="string" indexed="true"/>
- </logic:iterate>
- </bean:define>
- <bean:define id="EXPECTED_RESULTS" toScope="page">
-
- <textarea name="org.apache.struts.taglib.html.BEAN[0].string">Test Value</textarea>
-
- </bean:define>
+ <bean:define id="TEST_RESULTS" toScope="page">
+ <logic:iterate id="indivItem" name="lst" property="list">
+ <html:textarea property="string" indexed="true"/>
+ </logic:iterate>
+ </bean:define>
+ <bean:define id="EXPECTED_RESULTS" toScope="page">
+
+ <textarea name="org.apache.struts.taglib.html.BEAN[0].string">Test
+ Value</textarea>
+
+ </bean:define>
</logic:equal>
<logic:equal name="runTest" value="testTextareaPropertyIndexedMap">
- <bean:define id="TEST_RESULTS" toScope="page">
- <logic:iterate id="indivItem" name="lst">
- <html:textarea property="string" indexed="true"/>
- </logic:iterate>
- </bean:define>
- <bean:define id="EXPECTED_RESULTS" toScope="page">
-
- <textarea name="org.apache.struts.taglib.html.BEAN[0].string">Test Value</textarea>
-
- </bean:define>
+ <bean:define id="TEST_RESULTS" toScope="page">
+ <logic:iterate id="indivItem" name="lst">
+ <html:textarea property="string" indexed="true"/>
+ </logic:iterate>
+ </bean:define>
+ <bean:define id="EXPECTED_RESULTS" toScope="page">
+
+ <textarea name="org.apache.struts.taglib.html.BEAN[0].string">Test
+ Value</textarea>
+
+ </bean:define>
</logic:equal>
<logic:equal name="runTest" value="testTextareaPropertyIndexedMapProperty">
- <bean:define id="TEST_RESULTS" toScope="page">
- <logic:iterate id="indivItem" name="lst" property="map">
- <html:textarea property="string" indexed="true"/>
- </logic:iterate>
- </bean:define>
- <bean:define id="EXPECTED_RESULTS" toScope="page">
-
- <textarea name="org.apache.struts.taglib.html.BEAN[0].string">Test Value</textarea>
-
- </bean:define>
+ <bean:define id="TEST_RESULTS" toScope="page">
+ <logic:iterate id="indivItem" name="lst" property="map">
+ <html:textarea property="string" indexed="true"/>
+ </logic:iterate>
+ </bean:define>
+ <bean:define id="EXPECTED_RESULTS" toScope="page">
+
+ <textarea name="org.apache.struts.taglib.html.BEAN[0].string">Test
+ Value</textarea>
+
+ </bean:define>
</logic:equal>
<logic:equal name="runTest" value="testTextareaPropertyIndexedEnumeration">
- <bean:define id="TEST_RESULTS" toScope="page">
- <logic:iterate id="indivItem" name="lst">
- <html:textarea property="string" indexed="true"/>
- </logic:iterate>
- </bean:define>
- <bean:define id="EXPECTED_RESULTS" toScope="page">
-
- <textarea name="org.apache.struts.taglib.html.BEAN[0].string">Test Value</textarea>
-
- <textarea name="org.apache.struts.taglib.html.BEAN[1].string">Test Value</textarea>
-
- </bean:define>
-</logic:equal>
-
-<logic:equal name="runTest" value="testTextareaPropertyIndexedEnumerationProperty">
- <bean:define id="TEST_RESULTS" toScope="page">
- <logic:iterate id="indivItem" name="lst" property="enumeration">
- <html:textarea property="string" indexed="true"/>
- </logic:iterate>
- </bean:define>
- <bean:define id="EXPECTED_RESULTS" toScope="page">
-
- <textarea name="org.apache.struts.taglib.html.BEAN[0].string">Test Value</textarea>
-
- <textarea name="org.apache.struts.taglib.html.BEAN[1].string">Test Value</textarea>
-
- </bean:define>
+ <bean:define id="TEST_RESULTS" toScope="page">
+ <logic:iterate id="indivItem" name="lst">
+ <html:textarea property="string" indexed="true"/>
+ </logic:iterate>
+ </bean:define>
+ <bean:define id="EXPECTED_RESULTS" toScope="page">
+
+ <textarea name="org.apache.struts.taglib.html.BEAN[0].string">Test
+ Value</textarea>
+
+ <textarea name="org.apache.struts.taglib.html.BEAN[1].string">Test
+ Value</textarea>
+
+ </bean:define>
+</logic:equal>
+
+<logic:equal name="runTest"
+ value="testTextareaPropertyIndexedEnumerationProperty">
+ <bean:define id="TEST_RESULTS" toScope="page">
+ <logic:iterate id="indivItem" name="lst" property="enumeration">
+ <html:textarea property="string" indexed="true"/>
+ </logic:iterate>
+ </bean:define>
+ <bean:define id="EXPECTED_RESULTS" toScope="page">
+
+ <textarea name="org.apache.struts.taglib.html.BEAN[0].string">Test
+ Value</textarea>
+
+ <textarea name="org.apache.struts.taglib.html.BEAN[1].string">Test
+ Value</textarea>
+
+ </bean:define>
</logic:equal>
+<%
+ String expected = "";
+ String compareTo = "";
-<%
-String expected = "";
-String compareTo = "";
-
-if (pageContext.getAttribute("EXPECTED_RESULTS") == null){
- throw new javax.servlet.jsp.JspException("No tests on this page were called. Please verify that you've setup the tests correctly.");
-}else{
- expected=pageContext.getAttribute("EXPECTED_RESULTS").toString();
-}
-if (pageContext.getAttribute("TEST_RESULTS") != null){
- compareTo=pageContext.getAttribute("TEST_RESULTS").toString();
-}
+ if (pageContext.getAttribute("EXPECTED_RESULTS") == null) {
+ throw new javax.servlet.jsp.JspException(
+ "No tests on this page were called. Please verify that you've setup the tests correctly.");
+ } else {
+ expected = pageContext.getAttribute("EXPECTED_RESULTS").toString();
+ }
+ if (pageContext.getAttribute("TEST_RESULTS") != null) {
+ compareTo = pageContext.getAttribute("TEST_RESULTS").toString();
+ }
-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