Author: dolander
Date: Sun Aug 8 11:27:52 2004
New Revision: 36089
Added:
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/coretags/content/
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/coretags/content/nullbinding/
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/coretags/content/nullbinding/Controller.jpf
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/coretags/content/nullbinding/index.jsp
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/coretags/content/values/
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/coretags/content/values/Controller.jpf
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/coretags/content/values/index.jsp
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/coretags/error/
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/coretags/error/nullbinding/
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/coretags/error/nullbinding/Controller.jpf
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/coretags/error/nullbinding/index.jsp
incubator/beehive/trunk/netui/test/webapps/drt/testRecorder/tests/CtContentNullBinding.xml
incubator/beehive/trunk/netui/test/webapps/drt/testRecorder/tests/CtContentValues.xml
incubator/beehive/trunk/netui/test/webapps/drt/testRecorder/tests/CtErrorNullBinding.xml
Modified:
incubator/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/html/Content.java
incubator/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/html/Error.java
incubator/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/html/ErrorBaseTag.java
incubator/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/html/Errors.java
incubator/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/html/Exceptions.java
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/coretags/index.jsp
incubator/beehive/trunk/netui/test/webapps/drt/testRecorder/config/testRecorder-tests.xml
Log:
Clean up of the Content, Exceptions, Error and Errors tags
Added BVT verifying their behavior when binding to null values
Added BVT verifying the Content value being produced.
Modified:
incubator/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/html/Content.java
==============================================================================
---
incubator/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/html/Content.java
(original)
+++
incubator/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/html/Content.java
Sun Aug 8 11:27:52 2004
@@ -19,6 +19,7 @@
package org.apache.beehive.netui.tags.html;
import org.apache.beehive.netui.tags.AbstractClassicTag;
+import org.apache.beehive.netui.tags.AbstractSimpleTag;
import org.apache.beehive.netui.util.Bundle;
import org.apache.beehive.netui.util.logging.Logger;
@@ -66,12 +67,11 @@
* <pre>
* <netui:content value="{actionForm.lastName}" /></pre>
*
- * @netui:tag name="content" description="Used to display text or the result
of an expression to the page."
+ * @netui:tag name="content" body-content="empty" description="Used to display
text or the result of an expression to the page."
* @netui.tldx:tag requiredchild="#nothing"
renderer="workshop.netui.jspdesigner.tldx.ContentRenderer"
bodycontentpref="empty"
*/
-public class Content extends AbstractClassicTag
+public class Content extends AbstractSimpleTag
{
- // @TODO: DO, I propose that we kill this for EL expressions and c:out in
JSTL
private static final Logger logger = Logger.getInstance(Content.class);
private static final String DEFAULT_NULL_TEXT = "";
@@ -102,7 +102,7 @@
public void setDefaultValue(String defaultValue)
throws JspException
{
- _defaultValue = defaultValue;
+ _defaultValue = setRequiredValueAttribute(defaultValue,"defaultValue");
}
/**
@@ -127,9 +127,16 @@
* Render the content.
* @throws JspException if a JSP exception has occurred
*/
- public int doEndTag()
+ public void doTag()
throws JspException
{
+ // report any errors...
+ if (hasErrors()) {
+ reportErrors();
+ return;
+ }
+
+ // calculate the output value...
String text;
if (_value != null) {
text = _value.toString();
@@ -145,17 +152,5 @@
}
write(text);
- localRelease();
- return EVAL_PAGE;
- }
-
- /**
- * Release any acquired resources.
- */
- protected void localRelease()
- {
- super.localRelease();
- _defaultValue = null;
- _value = null;
}
}
Modified:
incubator/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/html/Error.java
==============================================================================
---
incubator/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/html/Error.java
(original)
+++
incubator/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/html/Error.java
Sun Aug 8 11:27:52 2004
@@ -89,13 +89,13 @@
*
* @jsptagref.attributesyntaxvalue <i>string_or_expression_value</i>
*
- * @netui:attribute required="false" rtexprvalue="true"
+ * @netui:attribute required="true" rtexprvalue="true"
* @netui.tldx:attribute
*/
public void setValue(String value)
throws JspException
{
- _value = value;
+ _value = setRequiredValueAttribute(value,"value");
}
/**
@@ -143,8 +143,7 @@
RequestUtils.present(pageContext, qualifiedBundle,
locale, "error.suffix");
}
catch (JspException e) {
- String s = Bundle.getString("Tags_ErrorsException",
- new Object[]{e.getMessage()});
+ String s = Bundle.getString("Tags_ErrorsException",new
Object[]{e.getMessage()});
registerTagError(s, null);
reportErrors();
return;
Modified:
incubator/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/html/ErrorBaseTag.java
==============================================================================
---
incubator/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/html/ErrorBaseTag.java
(original)
+++
incubator/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/html/ErrorBaseTag.java
Sun Aug 8 11:27:52 2004
@@ -59,8 +59,9 @@
* @netui:attribute required="false" rtexprvalue="true"
*/
public final void setBundle(String bundle)
+ throws JspException
{
- _bundle = bundle;
+ _bundle = setRequiredValueAttribute(bundle,"bundle");
}
/**
@@ -70,7 +71,7 @@
*/
public final void setLocale(String locale)
{
- _locale = locale;
+ _locale = setNonEmptyValueAttribute(locale);
}
/**
Modified:
incubator/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/html/Errors.java
==============================================================================
---
incubator/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/html/Errors.java
(original)
+++
incubator/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/html/Errors.java
Sun Aug 8 11:27:52 2004
@@ -106,6 +106,8 @@
}
if ((errors == null) || errors.isEmpty()) {
+ if (hasErrors())
+ reportErrors();
return;
}
@@ -176,7 +178,10 @@
results.append("\r\n");
}
+ if (hasErrors())
+ reportErrors();
+
// Print the results to our output writer
- ResponseUtils.write(pageContext, results.toString());
+ write(results.toString());
}
}
Modified:
incubator/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/html/Exceptions.java
==============================================================================
---
incubator/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/html/Exceptions.java
(original)
+++
incubator/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/html/Exceptions.java
Sun Aug 8 11:27:52 2004
@@ -18,9 +18,8 @@
*/
package org.apache.beehive.netui.tags.html;
-//internal imports
-
import org.apache.beehive.netui.pageflow.internal.InternalUtils;
+import org.apache.beehive.netui.tags.AbstractSimpleTag;
import org.apache.beehive.netui.util.HtmlExceptionFormatter;
import org.apache.struts.Globals;
import org.apache.struts.util.ResponseUtils;
@@ -28,7 +27,6 @@
import javax.servlet.ServletRequest;
import javax.servlet.jsp.JspException;
import javax.servlet.jsp.PageContext;
-import javax.servlet.jsp.tagext.TagSupport;
/**
* Renders formatted exception data, as found in the Request with the key:
@@ -43,16 +41,24 @@
* but not the stacktraces.
* <pre><netui:exceptions showMessage="true" showStackTrace="false" /></pre>
*
- * @netui:tag name="exceptions" description="Displays formatted exception
messages."
- * @netui.tldx:tag requiredchild="#nothing"
renderer="workshop.netui.jspdesigner.tldx.ExceptionsRenderer"
bodycontentpref="empty" whitespace="indent"
+ * @netui:tag name="exceptions" body-content="empty" description="Displays
formatted exception messages."
+ * @netui.tldx:tag
renderer="workshop.netui.jspdesigner.tldx.ExceptionsRenderer"
bodycontentpref="empty" whitespace="indent"
*/
-public class Exceptions extends TagSupport
+public class Exceptions extends AbstractSimpleTag
{
private boolean _showMessage = true;
private boolean _showStackTrace = false;
private boolean _showDevModeStackTrace = false;
/**
+ * Return the name of the Tag.
+ */
+ public String getTagName()
+ {
+ return "Exceptions";
+ }
+
+ /**
* Set whether or not the exception message is being shown.
* @param showMessage - true or false depending on the setting desired
* @jsptagref.attributedescription
@@ -100,12 +106,14 @@
* Render the exception text based on the display attributes.
* @throws JspException if a JSP exception has occurred
*/
- public int doStartTag() throws JspException
+ public void doTag()
+ throws JspException
{
// First look for the exception in the pageflow/struts request
attribute. If it's not there,
// look for it in the request attribute the container provides for
web.xml-configured error
// pages.
StringBuilder results = new StringBuilder(128);
+ PageContext pageContext = getPageContext();
Throwable e = (Throwable)
pageContext.getAttribute(Globals.EXCEPTION_KEY, PageContext.REQUEST_SCOPE);
if (e == null) {
@@ -140,17 +148,5 @@
}
ResponseUtils.write(pageContext, results.toString());
}
- localRelease();
- return SKIP_BODY;
- }
-
- /**
- * Release any acquired resources.
- */
- protected void localRelease()
- {
- _showMessage = true;
- _showStackTrace = false;
- _showDevModeStackTrace = false;
}
}
Added:
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/coretags/content/nullbinding/Controller.jpf
==============================================================================
--- (empty file)
+++
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/coretags/content/nullbinding/Controller.jpf
Sun Aug 8 11:27:52 2004
@@ -0,0 +1,53 @@
+package coretags.content.nullbinding;
+
+import org.apache.beehive.netui.pageflow.PageFlowController;
+import org.apache.beehive.netui.pageflow.Forward;
+import org.apache.beehive.netui.pageflow.annotations.Jpf;
+
+/**
+ * This is the default controller for a blank web application.
+ */
[EMAIL PROTECTED]
[EMAIL PROTECTED](
+ value = {
+ "<!-- This data is auto-generated. Hand-editing this section is not
recommended. -->",
+ "<view-properties>",
+ "<pageflow-object
id='pageflow:/coretags/base/nullbinding/Controller.jpf'/>",
+ "<pageflow-object id='action:begin.do'>",
+ " <property value='80' name='x'/>",
+ " <property value='100' name='y'/>",
+ "</pageflow-object>",
+ "<pageflow-object id='page:index.jsp'>",
+ " <property value='220' name='x'/>",
+ " <property value='100' name='y'/>",
+ "</pageflow-object>",
+ "<pageflow-object id='forward:[EMAIL PROTECTED]:begin.do@'>",
+ " <property value='116,140,140,164' name='elbowsX'/>",
+ " <property value='92,92,92,92' name='elbowsY'/>",
+ " <property value='East_1' name='fromPort'/>",
+ " <property value='West_1' name='toPort'/>",
+ " <property value='index' name='label'/>",
+ "</pageflow-object>",
+ "</view-properties>"
+ }
+)
+public class Controller extends PageFlowController
+{
+ private String _nullValue = null;
+
+ public String getNullValue() {
+ return _nullValue;
+ }
+
+ @Jpf.Action(
+ forwards={
+ @Jpf.Forward(name="index", path="index.jsp")
+ }
+ )
+ protected Forward begin()
+ {
+ return new Forward("index");
+ }
+
+
+}
Added:
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/coretags/content/nullbinding/index.jsp
==============================================================================
--- (empty file)
+++
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/coretags/content/nullbinding/index.jsp
Sun Aug 8 11:27:52 2004
@@ -0,0 +1,24 @@
+<%@ page language="java" contentType="text/html;charset=UTF-8"%>
+<%@ taglib uri="http://beehive.apache.org/netui/tags-html-1.0" prefix="netui"%>
+<%@ taglib uri="http://beehive.apache.org/netui/tags-databinding-1.0"
prefix="netui-data"%>
+<%@ taglib uri="http://beehive.apache.org/netui/tags-template-1.0"
prefix="netui-template"%>
+
+
+<netui:html>
+ <head>
+ <netui:base />
+ </head>
+ <netui:body>
+ <h4>Null Binding to the Content tag</h4>
+ <p style="color:green">This is a simple test of null binding to the
attributes of the content tag.
+ <br>
+ This is a single page test.
+ </p>
+ <ul>
+ <li><netui:content value="content" defaultValue="${pageFlow.nullValue}" />
-- default value</li>
+ <li><netui:content value="${pageFlow.nullValue}" /> -- value</li>
+ </ul>
+ </netui:body>
+</netui:html>
+
+
\ No newline at end of file
Added:
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/coretags/content/values/Controller.jpf
==============================================================================
--- (empty file)
+++
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/coretags/content/values/Controller.jpf
Sun Aug 8 11:27:52 2004
@@ -0,0 +1,63 @@
+package coretags.content.values;
+
+import org.apache.beehive.netui.pageflow.PageFlowController;
+import org.apache.beehive.netui.pageflow.Forward;
+import org.apache.beehive.netui.pageflow.annotations.Jpf;
+
+/**
+ * This is the default controller for a blank web application.
+ */
[EMAIL PROTECTED]
+public class Controller extends PageFlowController
+{
+ private String _nullValue = null;
+
+ public String getNullValue() {
+ return _nullValue;
+ }
+
+ public String getContent() {
+ return "content";
+ }
+
+ public String getDefaultValue() {
+ return "default value";
+ }
+
+ @Jpf.Action(
+ forwards={
+ @Jpf.Forward(name="index", path="index.jsp")
+ }
+ )
+ protected Forward begin()
+ {
+ return new Forward("index");
+ }
+
+
+}
[EMAIL PROTECTED](value = {
+ "<!-- This data is auto-generated. Hand-editing this section is not
recommended. -->",
+ "<view-properties>",
+ "<pageflow-object id='page:index.jsp'>",
+ " <property value='220' name='x'/>",
+ " <property value='100' name='y'/>",
+ "</pageflow-object>",
+ "<pageflow-object id='action:begin.do'>",
+ " <property value='80' name='x'/>",
+ " <property value='100' name='y'/>",
+ "</pageflow-object>",
+ "<pageflow-object id='forward:[EMAIL PROTECTED]:begin.do@'>",
+ " <property value='116,140,140,164' name='elbowsX'/>",
+ " <property value='92,92,92,92' name='elbowsY'/>",
+ " <property value='East_1' name='fromPort'/>",
+ " <property value='West_1' name='toPort'/>",
+ " <property value='index' name='label'/>",
+ "</pageflow-object>",
+ "</view-properties>"
+}
+ )
+interface VIEW_PROPERTIES
+{
+}
+
Added:
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/coretags/content/values/index.jsp
==============================================================================
--- (empty file)
+++
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/coretags/content/values/index.jsp
Sun Aug 8 11:27:52 2004
@@ -0,0 +1,27 @@
+<%@ page language="java" contentType="text/html;charset=UTF-8"%>
+<%@ taglib uri="http://beehive.apache.org/netui/tags-html-1.0" prefix="netui"%>
+<%@ taglib uri="http://beehive.apache.org/netui/tags-databinding-1.0"
prefix="netui-data"%>
+<%@ taglib uri="http://beehive.apache.org/netui/tags-template-1.0"
prefix="netui-template"%>
+
+
+<netui:html>
+ <head>
+ <netui:base />
+ </head>
+ <netui:body>
+ <h4>Content Tag Values</h4>
+ <p style="color:green">This fully tests the content tags presentation of
values and use of the
+ default value.
+ <br>
+ This is a single page test.
+ </p>
+ <ul>
+ <li><netui:content value="${pageFlow.content}" /> -- Value Binding to
Content</li>
+ <li><netui:content value="${pageFlow.nullValue}"
defaultValue="${pageFlow.defaultValue}" /> -- Null Value, Value From
Default</li>
+ <li><netui:content value="${pageFlow.content}"
defaultValue="${pageFlow.defaultValue}" /> -- Content and Default</li>
+ <li><netui:content value="${pageFlow.nullValue}" /> -- Null Value, no
default</li>
+ </ul>
+ </netui:body>
+</netui:html>
+
+
\ No newline at end of file
Added:
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/coretags/error/nullbinding/Controller.jpf
==============================================================================
--- (empty file)
+++
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/coretags/error/nullbinding/Controller.jpf
Sun Aug 8 11:27:52 2004
@@ -0,0 +1,53 @@
+package coretags.error.nullbinding;
+
+import org.apache.beehive.netui.pageflow.PageFlowController;
+import org.apache.beehive.netui.pageflow.Forward;
+import org.apache.beehive.netui.pageflow.annotations.Jpf;
+
+/**
+ * This is the default controller for a blank web application.
+ */
[EMAIL PROTECTED]
[EMAIL PROTECTED](
+ value = {
+ "<!-- This data is auto-generated. Hand-editing this section is not
recommended. -->",
+ "<view-properties>",
+ "<pageflow-object
id='pageflow:/coretags/base/nullbinding/Controller.jpf'/>",
+ "<pageflow-object id='action:begin.do'>",
+ " <property value='80' name='x'/>",
+ " <property value='100' name='y'/>",
+ "</pageflow-object>",
+ "<pageflow-object id='page:index.jsp'>",
+ " <property value='220' name='x'/>",
+ " <property value='100' name='y'/>",
+ "</pageflow-object>",
+ "<pageflow-object id='forward:[EMAIL PROTECTED]:begin.do@'>",
+ " <property value='116,140,140,164' name='elbowsX'/>",
+ " <property value='92,92,92,92' name='elbowsY'/>",
+ " <property value='East_1' name='fromPort'/>",
+ " <property value='West_1' name='toPort'/>",
+ " <property value='index' name='label'/>",
+ "</pageflow-object>",
+ "</view-properties>"
+ }
+)
+public class Controller extends PageFlowController
+{
+ private String _nullValue = null;
+
+ public String getNullValue() {
+ return _nullValue;
+ }
+
+ @Jpf.Action(
+ forwards={
+ @Jpf.Forward(name="index", path="index.jsp")
+ }
+ )
+ protected Forward begin()
+ {
+ return new Forward("index");
+ }
+
+
+}
Added:
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/coretags/error/nullbinding/index.jsp
==============================================================================
--- (empty file)
+++
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/coretags/error/nullbinding/index.jsp
Sun Aug 8 11:27:52 2004
@@ -0,0 +1,28 @@
+<%@ page language="java" contentType="text/html;charset=UTF-8"%>
+<%@ taglib uri="http://beehive.apache.org/netui/tags-html-1.0" prefix="netui"%>
+<%@ taglib uri="http://beehive.apache.org/netui/tags-databinding-1.0"
prefix="netui-data"%>
+<%@ taglib uri="http://beehive.apache.org/netui/tags-template-1.0"
prefix="netui-template"%>
+
+
+<netui:html>
+ <head>
+ <netui:base />
+ </head>
+ <netui:body>
+ <h4>Null Binding to the Error and Errors tag</h4>
+ <p style="color:green">This test will test both the Error and Errors tag
for null binding to their attributes.
+ The first set of tests are the error tags.
+ <br>
+ This is a single page test.
+ </p>
+ <ul>
+ <li><netui:error value="val" bundle="${pageFlow.nullValue}" /> -- error -
bundle</li>
+ <li><netui:error value="${pageFlow.nullValue}" /> -- error - value</li>
+ <li><netui:error value="val" locale="${pageFlow.nullValue}" /> -- error -
locale</li>
+ <li><netui:errors bundle="${pageFlow.nullValue}" /> -- errors - bundle</li>
+ <li><netui:errors locale="${pageFlow.nullValue}" /> -- errors - locale</li>
+ </ul>
+ </netui:body>
+</netui:html>
+
+
\ No newline at end of file
Modified:
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/coretags/index.jsp
==============================================================================
--- incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/coretags/index.jsp
(original)
+++ incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/coretags/index.jsp
Sun Aug 8 11:27:52 2004
@@ -14,7 +14,10 @@
<li><a href="binding/report/Controller.jpf">BindingUpdateErrors error
reporting</a> — Normal error reporting from the BindingUpdateErrors
tag</li>
<li><a href="button/nullbinding/Controller.jpf">Button Null Binding</a>
— Button null binding tests</li>
<li><a href="checkbox/nullbinding/Controller.jpf">Checkbox Null
Binding</a> — Checkbox null binding tests</li>
+ <li><a href="content/nullbinding/Controller.jpf">Content Null Binding</a>
— Content null binding tests</li>
+ <li><a href="content/values/Controller.jpf">Content Value</a> —
Verification of setting the displayed content of a Content Tag</li>
<li><a href="core/attrset/Controller.jpf">Core Attribute Setting</a>
— Multiple tags which may be reused set same attributes</li>
+ <li><a href="error/nullbinding/Controller.jpf">Error and Errors Null
Binding</a> — Error and Errors null binding tests</li>
<li><a href="fileupload/nullbinding/Controller.jpf">FileUpload Null
Binding</a> — FileUpload null binding tests</li>
<li><a href="form/bean/Controller.jpf">Form Bean</a> — Test of the
Form name, type and scope attributes</li>
<li><a href="form/beanerror/Controller.jpf">Form Bean Error</a> —
Test of Errors in the Form name, type and scope attributes</li>
Modified:
incubator/beehive/trunk/netui/test/webapps/drt/testRecorder/config/testRecorder-tests.xml
==============================================================================
---
incubator/beehive/trunk/netui/test/webapps/drt/testRecorder/config/testRecorder-tests.xml
(original)
+++
incubator/beehive/trunk/netui/test/webapps/drt/testRecorder/config/testRecorder-tests.xml
Sun Aug 8 11:27:52 2004
@@ -1744,6 +1744,31 @@
</features>
</test>
<test>
+ <name>CtContentNullBinding</name>
+ <description>Binding to null in the Content tag
attributes</description>
+ <webapp>coreWeb</webapp>
+ <categories>
+ <category>bvt</category>
+ <category>tags</category>
+ </categories>
+ <features>
+ <feature>Content</feature>
+ <feature>Binding</feature>
+ </features>
+ </test>
+ <test>
+ <name>CtContentValues</name>
+ <description>Verification of value and defaultValue in the Content
tag</description>
+ <webapp>coreWeb</webapp>
+ <categories>
+ <category>bvt</category>
+ <category>tags</category>
+ </categories>
+ <features>
+ <feature>Content</feature>
+ </features>
+ </test>
+ <test>
<name>CtCoreAttrset</name>
<description>Test of the JSP container pooling tags</description>
<webapp>coreWeb</webapp>
@@ -1754,6 +1779,20 @@
<features>
<feature>JSP Container</feature>
<feature>Tag Pooling</feature>
+ </features>
+ </test>
+ <test>
+ <name>CtErrorNullBinding</name>
+ <description>Binding to null in the Error and Errors tag
attributes</description>
+ <webapp>coreWeb</webapp>
+ <categories>
+ <category>bvt</category>
+ <category>tags</category>
+ </categories>
+ <features>
+ <feature>Error</feature>
+ <feature>Errors</feature>
+ <feature>Binding</feature>
</features>
</test>
<test>
Added:
incubator/beehive/trunk/netui/test/webapps/drt/testRecorder/tests/CtContentNullBinding.xml
==============================================================================
--- (empty file)
+++
incubator/beehive/trunk/netui/test/webapps/drt/testRecorder/tests/CtContentNullBinding.xml
Sun Aug 8 11:27:52 2004
@@ -0,0 +1,87 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ses:recorderSession
xmlns:ses="http://beehive.apache.org/netui/tools/testrecorder/2004/session">
+ <ses:sessionName>CtContentNullBinding</ses:sessionName>
+ <ses:tester>Daryl</ses:tester>
+ <ses:startDate>08 Aug 2004, 12:04:50.975 PM MDT</ses:startDate>
+ <ses:description>Null binding to the Content attribugtes</ses:description>
+ <ses:tests>
+ <ses:test>
+ <ses:testNumber>1</ses:testNumber>
+ <ses:request>
+ <ses:protocol>HTTP</ses:protocol>
+ <ses:protocolVersion>1.1</ses:protocolVersion>
+ <ses:host>localhost</ses:host>
+ <ses:port>8080</ses:port>
+
<ses:uri>/coreWeb/coretags/content/nullbinding/Controller.jpf</ses:uri>
+ <ses:method>GET</ses:method>
+ <ses:parameters/>
+ <ses:cookies>
+ <ses:cookie>
+ <ses:name>JSESSIONID</ses:name>
+ <ses:value>3D55DBFC9F3471FCF1A34FBCD1B3F8A7</ses:value>
+ </ses:cookie>
+ </ses:cookies>
+ <ses:headers>
+ <ses:header>
+ <ses:name>accept</ses:name>
+ <ses:value>image/gif, image/x-xbitmap, image/jpeg,
image/pjpeg, application/vnd.ms-excel, application/vnd.ms-powerpoint,
application/msword, application/x-shockwave-flash, */*</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>accept-encoding</ses:name>
+ <ses:value>gzip, deflate</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>accept-language</ses:name>
+ <ses:value>en-us</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>connection</ses:name>
+ <ses:value>Keep-Alive</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>cookie</ses:name>
+
<ses:value>JSESSIONID=3D55DBFC9F3471FCF1A34FBCD1B3F8A7</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>host</ses:name>
+ <ses:value>localhost:8080</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>user-agent</ses:name>
+ <ses:value>Mozilla/4.0 (compatible; MSIE 6.0; Windows NT
5.1; .NET CLR 2.0.40607)</ses:value>
+ </ses:header>
+ </ses:headers>
+ </ses:request>
+ <ses:response>
+ <ses:statusCode>200</ses:statusCode>
+ <ses:reason/>
+ <ses:responseBody><![CDATA[<!DOCTYPE HTML PUBLIC "//W3C//DTD HTML
4.01 Transitional//EN"
+ "http://www.w3.org/TR/html4/loose.dtd">
+<html lang="en">
+<head>
+ <base
href="http://localhost:8080/coreWeb/coretags/content/nullbinding/index.jsp">
+ </head>
+ <body>
+ <h4>Null Binding to the Content tag</h4>
+ <p style="color:green">This is a simple test of null binding to the
attributes of the content tag.
+ <br>
+ This is a single page test.
+ </p>
+ <ul>
+ <li><span style="color:red;background-color:white">
+ [<b>Tag Error:1</b>, Found in tag <b>Content</b>]</span> -- default value</li>
+ <li> -- value</li>
+ </ul>
+ <div> <hr /><table border="1" cellspacing="0"
style="color:red;background-color:white">
+ <tr><th colspan="6">Page Errors</th></tr>
+ <tr><th>Error Number</th><th>Tag Type</th><th colspan="4">Error</th></tr>
+<tr><th>1</th><th>Content</th><th>Message</th><td>Attribute 'defaultValue' is
required to have a value. The value "" is illegal. This is often cause by
binding to an object with a null value.</td></tr>
+</table></div>
+</body>
+</html>]]></ses:responseBody>
+ </ses:response>
+ </ses:test>
+ </ses:tests>
+ <ses:endDate>08 Aug 2004, 12:04:57.915 PM MDT</ses:endDate>
+ <ses:testCount>1</ses:testCount>
+</ses:recorderSession>
Added:
incubator/beehive/trunk/netui/test/webapps/drt/testRecorder/tests/CtContentValues.xml
==============================================================================
--- (empty file)
+++
incubator/beehive/trunk/netui/test/webapps/drt/testRecorder/tests/CtContentValues.xml
Sun Aug 8 11:27:52 2004
@@ -0,0 +1,84 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ses:recorderSession
xmlns:ses="http://beehive.apache.org/netui/tools/testrecorder/2004/session">
+ <ses:sessionName>CtContentValues</ses:sessionName>
+ <ses:tester>Daryl</ses:tester>
+ <ses:startDate>08 Aug 2004, 12:06:57.405 PM MDT</ses:startDate>
+ <ses:description>Verification of the value default value relationship in
the Content tag</ses:description>
+ <ses:tests>
+ <ses:test>
+ <ses:testNumber>1</ses:testNumber>
+ <ses:request>
+ <ses:protocol>HTTP</ses:protocol>
+ <ses:protocolVersion>1.1</ses:protocolVersion>
+ <ses:host>localhost</ses:host>
+ <ses:port>8080</ses:port>
+ <ses:uri>/coreWeb/coretags/content/values/Controller.jpf</ses:uri>
+ <ses:method>GET</ses:method>
+ <ses:parameters/>
+ <ses:cookies>
+ <ses:cookie>
+ <ses:name>JSESSIONID</ses:name>
+ <ses:value>BC2EBF76645916FCD82351945C3F2372</ses:value>
+ </ses:cookie>
+ </ses:cookies>
+ <ses:headers>
+ <ses:header>
+ <ses:name>accept</ses:name>
+ <ses:value>image/gif, image/x-xbitmap, image/jpeg,
image/pjpeg, application/vnd.ms-excel, application/vnd.ms-powerpoint,
application/msword, application/x-shockwave-flash, */*</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>accept-encoding</ses:name>
+ <ses:value>gzip, deflate</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>accept-language</ses:name>
+ <ses:value>en-us</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>connection</ses:name>
+ <ses:value>Keep-Alive</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>cookie</ses:name>
+
<ses:value>JSESSIONID=BC2EBF76645916FCD82351945C3F2372</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>host</ses:name>
+ <ses:value>localhost:8080</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>user-agent</ses:name>
+ <ses:value>Mozilla/4.0 (compatible; MSIE 6.0; Windows NT
5.1; .NET CLR 2.0.40607)</ses:value>
+ </ses:header>
+ </ses:headers>
+ </ses:request>
+ <ses:response>
+ <ses:statusCode>200</ses:statusCode>
+ <ses:reason/>
+ <ses:responseBody><![CDATA[<!DOCTYPE HTML PUBLIC "//W3C//DTD HTML
4.01 Transitional//EN"
+ "http://www.w3.org/TR/html4/loose.dtd">
+<html lang="en">
+<head>
+ <base
href="http://localhost:8080/coreWeb/coretags/content/values/index.jsp">
+ </head>
+ <body>
+ <h4>Content Tag Values</h4>
+ <p style="color:green">This fully tests the content tags presentation of
values and use of the
+ default value.
+ <br>
+ This is a single page test.
+ </p>
+ <ul>
+ <li>content -- Value Binding to Content</li>
+ <li>default value -- Null Value, Value From Default</li>
+ <li>content -- Content and Default</li>
+ <li> -- Null Value, no default</li>
+ </ul>
+ </body>
+</html>]]></ses:responseBody>
+ </ses:response>
+ </ses:test>
+ </ses:tests>
+ <ses:endDate>08 Aug 2004, 12:07:04.374 PM MDT</ses:endDate>
+ <ses:testCount>1</ses:testCount>
+</ses:recorderSession>
Added:
incubator/beehive/trunk/netui/test/webapps/drt/testRecorder/tests/CtErrorNullBinding.xml
==============================================================================
--- (empty file)
+++
incubator/beehive/trunk/netui/test/webapps/drt/testRecorder/tests/CtErrorNullBinding.xml
Sun Aug 8 11:27:52 2004
@@ -0,0 +1,95 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ses:recorderSession
xmlns:ses="http://beehive.apache.org/netui/tools/testrecorder/2004/session">
+ <ses:sessionName>CtErrorNullBinding</ses:sessionName>
+ <ses:tester>Daryl</ses:tester>
+ <ses:startDate>08 Aug 2004, 12:07:45.513 PM MDT</ses:startDate>
+ <ses:description>Null binding to the attributes of Error and
Errors</ses:description>
+ <ses:tests>
+ <ses:test>
+ <ses:testNumber>1</ses:testNumber>
+ <ses:request>
+ <ses:protocol>HTTP</ses:protocol>
+ <ses:protocolVersion>1.1</ses:protocolVersion>
+ <ses:host>localhost</ses:host>
+ <ses:port>8080</ses:port>
+
<ses:uri>/coreWeb/coretags/error/nullbinding/Controller.jpf</ses:uri>
+ <ses:method>GET</ses:method>
+ <ses:parameters/>
+ <ses:cookies>
+ <ses:cookie>
+ <ses:name>JSESSIONID</ses:name>
+ <ses:value>F4A2BCED03C3ED5EE8AA6BA782C031AE</ses:value>
+ </ses:cookie>
+ </ses:cookies>
+ <ses:headers>
+ <ses:header>
+ <ses:name>accept</ses:name>
+ <ses:value>image/gif, image/x-xbitmap, image/jpeg,
image/pjpeg, application/vnd.ms-excel, application/vnd.ms-powerpoint,
application/msword, application/x-shockwave-flash, */*</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>accept-encoding</ses:name>
+ <ses:value>gzip, deflate</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>accept-language</ses:name>
+ <ses:value>en-us</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>connection</ses:name>
+ <ses:value>Keep-Alive</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>cookie</ses:name>
+
<ses:value>JSESSIONID=F4A2BCED03C3ED5EE8AA6BA782C031AE</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>host</ses:name>
+ <ses:value>localhost:8080</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>user-agent</ses:name>
+ <ses:value>Mozilla/4.0 (compatible; MSIE 6.0; Windows NT
5.1; .NET CLR 2.0.40607)</ses:value>
+ </ses:header>
+ </ses:headers>
+ </ses:request>
+ <ses:response>
+ <ses:statusCode>200</ses:statusCode>
+ <ses:reason/>
+ <ses:responseBody><![CDATA[<!DOCTYPE HTML PUBLIC "//W3C//DTD HTML
4.01 Transitional//EN"
+ "http://www.w3.org/TR/html4/loose.dtd">
+<html lang="en">
+<head>
+ <base
href="http://localhost:8080/coreWeb/coretags/error/nullbinding/index.jsp">
+ </head>
+ <body>
+ <h4>Null Binding to the Error and Errors tag</h4>
+ <p style="color:green">This test will test both the Error and Errors tag
for null binding to their attributes.
+ The first set of tests are the error tags.
+ <br>
+ This is a single page test.
+ </p>
+ <ul>
+ <li><span style="color:red;background-color:white">
+ [<b>Tag Error:1</b>, Found in tag <b>Error</b>]</span> -- error - bundle</li>
+ <li><span style="color:red;background-color:white">
+ [<b>Tag Error:2</b>, Found in tag <b>Error</b>]</span> -- error - value</li>
+ <li> -- error - locale</li>
+ <li><span style="color:red;background-color:white">
+ [<b>Tag Error:3</b>, Found in tag <b>Errors</b>]</span> -- errors -
bundle</li>
+ <li> -- errors - locale</li>
+ </ul>
+ <div> <hr /><table border="1" cellspacing="0"
style="color:red;background-color:white">
+ <tr><th colspan="6">Page Errors</th></tr>
+ <tr><th>Error Number</th><th>Tag Type</th><th colspan="4">Error</th></tr>
+<tr><th>1</th><th>Error</th><th>Message</th><td>Attribute 'bundle' is required
to have a value. The value "" is illegal. This is often cause by binding to
an object with a null value.</td></tr>
+<tr><th>2</th><th>Error</th><th>Message</th><td>Attribute 'value' is required
to have a value. The value "" is illegal. This is often cause by binding to
an object with a null value.</td></tr>
+<tr><th>3</th><th>Errors</th><th>Message</th><td>Attribute 'bundle' is
required to have a value. The value "" is illegal. This is often cause by
binding to an object with a null value.</td></tr>
+</table></div>
+</body>
+</html>]]></ses:responseBody>
+ </ses:response>
+ </ses:test>
+ </ses:tests>
+ <ses:endDate>08 Aug 2004, 12:07:52.312 PM MDT</ses:endDate>
+ <ses:testCount>1</ses:testCount>
+</ses:recorderSession>