Author: dolander
Date: Fri Feb 4 11:18:44 2005
New Revision: 151392
URL: http://svn.apache.org/viewcvs?view=rev&rev=151392
Log:
Fix Jira bug 242, The CheckBoxGroup and RadioButtonGroup didn't
allow repeating over a hashmap. This has been fixed, in addition
they didn't allow JSTL inside the repeater, which has also been
fixed.
Adding two BVTs that verify these features.
Added:
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/coretags/cbg/
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/coretags/cbg/hash/
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/coretags/cbg/hash/Controller.jpf
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/coretags/cbg/hash/Results.jsp
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/coretags/cbg/hash/index.jsp
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/coretags/rbg/
incubator/beehive/trunk/netui/test/webapps/drt/testRecorder/tests/CtCbgHash.xml
incubator/beehive/trunk/netui/test/webapps/drt/testRecorder/tests/CtRbgHash.xml
Modified:
incubator/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/html/CheckBoxGroup.java
incubator/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/html/CheckBoxOption.java
incubator/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/html/RadioButtonGroup.java
incubator/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/html/RadioButtonOption.java
incubator/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/html/Select.java
incubator/beehive/trunk/netui/test/webapps/drt/testRecorder/config/testRecorder-tests.xml
Modified:
incubator/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/html/CheckBoxGroup.java
URL:
http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/html/CheckBoxGroup.java?view=diff&r1=151391&r2=151392
==============================================================================
---
incubator/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/html/CheckBoxGroup.java
(original)
+++
incubator/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/html/CheckBoxGroup.java
Fri Feb 4 11:18:44 2005
@@ -25,7 +25,6 @@
import org.apache.beehive.netui.tags.rendering.*;
import org.apache.beehive.netui.util.Bundle;
import org.apache.beehive.netui.util.iterator.IteratorFactory;
-import org.apache.beehive.netui.util.iterator.IteratorFactoryException;
import org.apache.beehive.netui.util.logging.Logger;
import org.apache.beehive.netui.util.tags.GroupOption;
@@ -249,7 +248,6 @@
* @return a <code>List</code> that represents the default value.
*/
private Object evaluateDefaultValue()
- throws JspException
{
Object val = _defaultValue;
@@ -261,23 +259,15 @@
}
Iterator optionsIterator = null;
- try {
- optionsIterator = IteratorFactory.makeIterator(val);
+ optionsIterator = IteratorFactory.createIterator(val);
- // log an error, default value is optional so only warn
- if (optionsIterator == null && _defaultValue != null) {
- logger.warn(Bundle.getString("Tags_IteratorError",
- new Object[]{getTagName(), "defaultValue",
_defaultValue}));
- }
- if (optionsIterator == null)
- optionsIterator = IteratorFactory.EMPTY_ITERATOR;
- }
- catch (IteratorFactoryException ife) {
- String s = Bundle.getString("Tags_Iteration_Error",
- new Object[]{ife.getTypeName()});
- registerTagError(s, null);
- return null;
+ // log an error, default value is optional so only warn
+ if (optionsIterator == null && _defaultValue != null) {
+ logger.warn(Bundle.getString("Tags_IteratorError",
+ new Object[]{getTagName(), "defaultValue",
_defaultValue}));
}
+ if (optionsIterator == null)
+ optionsIterator = IteratorFactory.EMPTY_ITERATOR;
defaults = new ArrayList();
while (optionsIterator.hasNext()) {
@@ -364,6 +354,9 @@
_dynamicAttrs instanceof Iterator);
if (_repeater) {
+ if (_dynamicAttrs instanceof Map) {
+ _dynamicAttrs = ((Map) _dynamicAttrs).entrySet().iterator();
+ }
if (!(_dynamicAttrs instanceof Iterator)) {
String s = Bundle.getString("Tags_OptionsDSIteratorError");
registerTagError(s, null);
@@ -564,24 +557,16 @@
// This method will build the match list, should this be a hashmap?
private void buildMatch(Object val)
- throws JspException
{
if (val instanceof String[]) {
_match = (String[]) val;
}
else {
Iterator matchIterator = null;
- try {
- // this should return null, but we should handle it it does
- matchIterator = IteratorFactory.makeIterator(val);
- if (matchIterator == null)
- matchIterator = IteratorFactory.EMPTY_ITERATOR;
- }
- catch (IteratorFactoryException ife) {
- String s = Bundle.getString("Tags_Iteration_Error",
- new Object[]{ife.getTypeName()});
- registerTagError(s, null);
- }
+ // this should return null, but we should handle it it does
+ matchIterator = IteratorFactory.createIterator(val);
+ if (matchIterator == null)
+ matchIterator = IteratorFactory.EMPTY_ITERATOR;
List matchList = new ArrayList();
while (matchIterator.hasNext()) {
Modified:
incubator/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/html/CheckBoxOption.java
URL:
http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/html/CheckBoxOption.java?view=diff&r1=151391&r2=151392
==============================================================================
---
incubator/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/html/CheckBoxOption.java
(original)
+++
incubator/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/html/CheckBoxOption.java
Fri Feb 4 11:18:44 2005
@@ -163,8 +163,8 @@
public int doStartTag() throws JspException
{
// verify that the parent is a CheckBoxGroup
- Tag parentTag = getParent();
- if (!(parentTag instanceof CheckBoxGroup)) {
+ Tag parentTag = findAncestorWithClass(this,CheckBoxGroup.class);
+ if (parentTag == null) {
String s = Bundle.getString("Tags_CheckBoxOptionNoCheckBoxGroup");
registerTagError(s, null);
return SKIP_BODY;
@@ -208,7 +208,7 @@
// we verified that the parent was a CheckboxGroup in the doBeginTag()
ServletRequest req = pageContext.getRequest();
- CheckBoxGroup parent = (CheckBoxGroup) getParent();
+ CheckBoxGroup parent = (CheckBoxGroup)
findAncestorWithClass(this,CheckBoxGroup.class);
ConstantRendering cr =
TagRenderingBase.Factory.getConstantRendering(req);
boolean repeat = parent.isRepeater();
Modified:
incubator/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/html/RadioButtonGroup.java
URL:
http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/html/RadioButtonGroup.java?view=diff&r1=151391&r2=151392
==============================================================================
---
incubator/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/html/RadioButtonGroup.java
(original)
+++
incubator/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/html/RadioButtonGroup.java
Fri Feb 4 11:18:44 2005
@@ -155,7 +155,7 @@
private String _match; // The actual values we will
match against, calculated in doStartTag().
private String _defaultRadio; //
- private Object _dyanmicAttrs; // The optionsDataSource object
+ private Object _dynamicAttrs; // The optionsDataSource object
private StringBuilder _saveBody; // The body text
private WriteRenderAppender _writer;
@@ -223,7 +223,6 @@
* @return the value returned from <code>super.evaluteDefaultValue</code>
or the empty string.
*/
private String evaluateDefaultValue()
- throws JspException
{
Object val = _defaultValue;
@@ -278,19 +277,23 @@
}
// if this is a repeater then we shouid prime the pump...
- _dyanmicAttrs = evaluateOptionsDataSource();
- assert (_dyanmicAttrs != null);
- assert (_dyanmicAttrs instanceof Map ||
- _dyanmicAttrs instanceof Iterator);
+ _dynamicAttrs = evaluateOptionsDataSource();
+ assert (_dynamicAttrs != null);
+ assert (_dynamicAttrs instanceof Map ||
+ _dynamicAttrs instanceof Iterator);
if (_repeater) {
- if (!(_dyanmicAttrs instanceof Iterator)) {
+ if (_dynamicAttrs instanceof Map) {
+ _dynamicAttrs = ((Map) _dynamicAttrs).entrySet().iterator();
+
+ }
+ if (!(_dynamicAttrs instanceof Iterator)) {
String s = Bundle.getString("Tags_OptionsDSIteratorError");
registerTagError(s, null);
return SKIP_BODY;
}
- while (((Iterator) _dyanmicAttrs).hasNext()) {
- _repCurItem = ((Iterator) _dyanmicAttrs).next();
+ while (((Iterator) _dynamicAttrs).hasNext()) {
+ _repCurItem = ((Iterator) _dynamicAttrs).next();
if (_repCurItem != null)
break;
}
@@ -328,8 +331,8 @@
if (isVertical())
_cr.end_TD_TR(writer);
- while (((Iterator) _dyanmicAttrs).hasNext()) {
- _repCurItem = ((Iterator) _dyanmicAttrs).next();
+ while (((Iterator) _dynamicAttrs).hasNext()) {
+ _repCurItem = ((Iterator) _dynamicAttrs).next();
if (_repCurItem != null) {
_repIdx++;
if (isVertical())
@@ -380,8 +383,8 @@
}
// Render a tag representing the end of our current form
- if (_dyanmicAttrs instanceof Map) {
- Map dynamicRadiosMap = (Map) _dyanmicAttrs;
+ if (_dynamicAttrs instanceof Map) {
+ Map dynamicRadiosMap = (Map) _dynamicAttrs;
Iterator keyIterator = dynamicRadiosMap.keySet().iterator();
int idx = 0;
while (keyIterator.hasNext()) {
@@ -405,9 +408,9 @@
}
}
else {
- assert(_dyanmicAttrs instanceof Iterator);
+ assert(_dynamicAttrs instanceof Iterator);
- Iterator it = (Iterator) _dyanmicAttrs;
+ Iterator it = (Iterator) _dynamicAttrs;
int idx = 0;
while (it.hasNext()) {
Object o = it.next();
Modified:
incubator/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/html/RadioButtonOption.java
URL:
http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/html/RadioButtonOption.java?view=diff&r1=151391&r2=151392
==============================================================================
---
incubator/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/html/RadioButtonOption.java
(original)
+++
incubator/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/html/RadioButtonOption.java
Fri Feb 4 11:18:44 2005
@@ -152,9 +152,8 @@
public int doStartTag() throws JspException
{
- Tag parentTag = getParent();
-
- if (!(parentTag instanceof RadioButtonGroup)) {
+ Tag parentTag = findAncestorWithClass(this,RadioButtonGroup.class);
+ if (parentTag == null) {
String s =
Bundle.getString("Tags_RadioButtonOptionNoRadioButtonGroup");
registerTagError(s, null);
return SKIP_BODY;
@@ -200,8 +199,8 @@
ConstantRendering cr =
TagRenderingBase.Factory.getConstantRendering(req);
// this was verified in doBeginTag
- assert(getParent() instanceof RadioButtonGroup);
- RadioButtonGroup parent = (RadioButtonGroup) getParent();
+ RadioButtonGroup parent = (RadioButtonGroup)
findAncestorWithClass(this,RadioButtonGroup.class);
+ assert(parent != null);
boolean repeat = parent.isRepeater();
// Generate an HTML <input type='radio'> element
Modified:
incubator/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/html/Select.java
URL:
http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/html/Select.java?view=diff&r1=151391&r2=151392
==============================================================================
---
incubator/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/html/Select.java
(original)
+++
incubator/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/html/Select.java
Fri Feb 4 11:18:44 2005
@@ -368,22 +368,15 @@
}
else {
Iterator optionsIterator = null;
- try {
- optionsIterator = IteratorFactory.makeIterator(val);
+ optionsIterator = IteratorFactory.createIterator(val);
- // default value is optional so only warn
- if (optionsIterator == null && _defaultValue != null)
- logger.warn(Bundle.getString("Tags_IteratorError",
- new Object[]{getTagName(), "defaultValue",
_defaultValue}));
+ // default value is optional so only warn
+ if (optionsIterator == null && _defaultValue != null)
+ logger.warn(Bundle.getString("Tags_IteratorError",
+ new Object[]{getTagName(), "defaultValue",
_defaultValue}));
- if (optionsIterator == null)
- optionsIterator = IteratorFactory.EMPTY_ITERATOR;
- }
- catch (IteratorFactoryException ife) {
- String s = Bundle.getString("Tags_Iteration_Error", new
Object[]{ife.getTypeName()});
- registerTagError(s, ife);
- return null;
- }
+ if (optionsIterator == null)
+ optionsIterator = IteratorFactory.EMPTY_ITERATOR;
defaults = new ArrayList();
while (optionsIterator.hasNext()) {
Added:
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/coretags/cbg/hash/Controller.jpf
URL:
http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/coretags/cbg/hash/Controller.jpf?view=auto&rev=151392
==============================================================================
---
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/coretags/cbg/hash/Controller.jpf
(added)
+++
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/coretags/cbg/hash/Controller.jpf
Fri Feb 4 11:18:44 2005
@@ -0,0 +1,86 @@
+/*
+ * Copyright 2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * $Header:$
+ */
+package coretags.cbg.hash;
+
+import org.apache.beehive.netui.pageflow.PageFlowController;
+import org.apache.beehive.netui.pageflow.Forward;
+import org.apache.beehive.netui.pageflow.annotations.Jpf;
+import java.util.TreeMap;
+
[EMAIL PROTECTED](
+ )
+public class Controller extends PageFlowController
+{
+ private TreeMap opts;
+ private String[] resultsOne;
+
+ public TreeMap getOpts()
+ {
+ return opts;
+ }
+
+ public String[] getResultsOne()
+ {
+ return resultsOne;
+ }
+
+ public void setResultsOne(String[] resultsOne)
+ {
+ this.resultsOne = resultsOne;
+ }
+
+ protected void onCreate()
+ {
+ opts = new TreeMap();
+ opts.put("val1","Value One");
+ opts.put("val2","Value Two");
+ opts.put("val3","Value Three");
+ opts.put("junk","Junk Value");
+ opts.put("val4","Value Four");
+ }
+
+ /**
+ * @jpf:action
+ * @jpf:forward name="index" path="index.jsp"
+ */
+ @Jpf.Action(
+ forwards = {
+ @Jpf.Forward(
+ name = "index",
+ path = "index.jsp")
+ })
+ protected Forward begin()
+ {
+ return new Forward("index");
+ }
+
+ /**
+ * @jpf:action
+ * @jpf:forward name="index" path="Results.jsp"
+ */
+ @Jpf.Action(
+ forwards = {
+ @Jpf.Forward(
+ name = "index",
+ path = "Results.jsp")
+ })
+ protected Forward post()
+ {
+ return new Forward("index");
+ }
+}
Added:
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/coretags/cbg/hash/Results.jsp
URL:
http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/coretags/cbg/hash/Results.jsp?view=auto&rev=151392
==============================================================================
---
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/coretags/cbg/hash/Results.jsp
(added)
+++
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/coretags/cbg/hash/Results.jsp
Fri Feb 4 11:18:44 2005
@@ -0,0 +1,18 @@
+<[EMAIL PROTECTED] contentType="text/html;charset=UTF-8" language="java"%>
+<%@ page language="java" contentType="text/html;charset=UTF-8"%>
+<%@ taglib uri="beehive-netui-tags-databinding.tld" prefix="netui-data"%>
+<%@ taglib uri="beehive-netui-tags-html.tld" prefix="netui"%>
+<%@ taglib uri="beehive-netui-tags-template.tld" prefix="netui-template"%>
+<html>
+ <head>
+ </head>
+ <body>
+ <h4>Results One</h4>
+ <netui:anchor action="begin">Home</netui:anchor>
+ <ul>
+ <netui-data:repeater dataSource="pageFlow.resultsOne">
+ <li><netui:span value="${container.item}"/></li>
+ </netui-data:repeater>
+ </ul>
+ </body>
+</html>
\ No newline at end of file
Added:
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/coretags/cbg/hash/index.jsp
URL:
http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/coretags/cbg/hash/index.jsp?view=auto&rev=151392
==============================================================================
---
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/coretags/cbg/hash/index.jsp
(added)
+++
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/coretags/cbg/hash/index.jsp
Fri Feb 4 11:18:44 2005
@@ -0,0 +1,41 @@
+<%@ page language="java" contentType="text/html;charset=UTF-8"%>
+<%@ taglib uri="beehive-netui-tags-databinding.tld" prefix="netui-data"%>
+<%@ taglib uri="beehive-netui-tags-html.tld" prefix="netui"%>
+<%@ taglib uri="beehive-netui-tags-template.tld" prefix="netui-template"%>
+<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
+
+<netui:html>
+ <head>
+ <title>HashMap CheckBoxGroup</title>
+ <style type="text/css">
+ .normalAttr {color: #cc0099;font-family:Verdana;
font-size:8pt;margin:0,0,0,0;}
+ .normal {color: #cc9999;font-family:Verdana;
font-size:8pt;margin:0,0,0,0;}
+ .normal2 {color: #00cc99;font-family:Verdana;
font-size:8pt;margin:0,0,0,0;}
+ .normal3 {color: #99cc99;font-family:Verdana;
font-size:8pt;margin:0,0,0,0;}
+ </style>
+ </head>
+ <body>
+ <h4>HashMap CheckBoxGroup</h4>
+ <p style="color:green">This is a test of the CheckBoxGroup repeating
+ against a HashMap. We use JSTL to filter out the key "junk" key. This
+ test verifies repeating CheckBoxGroups working against a HashMap and
+ using JSTL inside the body of the repeater.</p>
+ <netui:form action="post">
+ <table width="200pt">
+ <caption class="normalAttr">CheckBox Group</caption>
+ <netui:checkBoxGroup dataSource="pageFlow.resultsOne"
+ optionsDataSource="${pageFlow.opts}" repeater="true">
+ <c:if test="${container.item.key != 'junk'}">
+ <tr align="center"><td align="right" width="25%">
+ <netui:checkBoxOption value="${container.item.key}"
/></td>
+ <td align="left"><netui:span
value="${container.item.value}" />
+ </td></tr>
+ </c:if>
+ </netui:checkBoxGroup>
+ </table>
+ <netui:button value="submit"/>
+ </netui:form>
+ </body>
+</netui:html>
+
+
\ No newline at end of file
Modified:
incubator/beehive/trunk/netui/test/webapps/drt/testRecorder/config/testRecorder-tests.xml
URL:
http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/test/webapps/drt/testRecorder/config/testRecorder-tests.xml?view=diff&r1=151391&r2=151392
==============================================================================
---
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
Fri Feb 4 11:18:44 2005
@@ -2046,6 +2046,18 @@
</features>
</test>
<test>
+ <name>CtCbgHash</name>
+ <description>Repeating CheckBoxGroup working on a
HashMap</description>
+ <webapp>coreWeb</webapp>
+ <categories>
+ <category>bvt</category>
+ <category>tags</category>
+ </categories>
+ <features>
+ <feature>CheckBoxGroup</feature>
+ </features>
+ </test>
+ <test>
<name>CtCheckboxNullBinding</name>
<description>Binding to null in the Checkbox tags
attributes</description>
<webapp>coreWeb</webapp>
@@ -2334,6 +2346,18 @@
<feature>Label</feature>
<feature>tagId</feature>
<feature>for</feature>
+ </features>
+ </test>
+ <test>
+ <name>CtRbgHash</name>
+ <description>Repeating RadioButtonGroup working on a
HashMap</description>
+ <webapp>coreWeb</webapp>
+ <categories>
+ <category>bvt</category>
+ <category>tags</category>
+ </categories>
+ <features>
+ <feature>RadioButtonGroup</feature>
</features>
</test>
<test>
Added:
incubator/beehive/trunk/netui/test/webapps/drt/testRecorder/tests/CtCbgHash.xml
URL:
http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/test/webapps/drt/testRecorder/tests/CtCbgHash.xml?view=auto&rev=151392
==============================================================================
---
incubator/beehive/trunk/netui/test/webapps/drt/testRecorder/tests/CtCbgHash.xml
(added)
+++
incubator/beehive/trunk/netui/test/webapps/drt/testRecorder/tests/CtCbgHash.xml
Fri Feb 4 11:18:44 2005
@@ -0,0 +1,226 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ses:recorderSession
xmlns:ses="http://beehive.apache.org/netui/tools/testrecorder/2004/session">
+ <ses:sessionName>CtCbgHash</ses:sessionName>
+ <ses:tester>Daryl</ses:tester>
+ <ses:startDate>04 Feb 2005, 11:45:24.059 AM MST</ses:startDate>
+ <ses:description>Verification of a repeating CheckBoxGroup using a
hashMap.</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/cbg/hash/Controller.jpf</ses:uri>
+ <ses:method>GET</ses:method>
+ <ses:parameters/>
+ <ses:cookies>
+ <ses:cookie>
+ <ses:name>JSESSIONID</ses:name>
+ <ses:value>AB365DA1977B5F6E972F6AAB74B09624</ses:value>
+ </ses:cookie>
+ </ses:cookies>
+ <ses:headers>
+ <ses:header>
+ <ses:name>accept</ses:name>
+
<ses:value>text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>accept-charset</ses:name>
+ <ses:value>ISO-8859-1,utf-8;q=0.7,*;q=0.7</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,en;q=0.5</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=AB365DA1977B5F6E972F6AAB74B09624</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>host</ses:name>
+ <ses:value>localhost:8080</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>keep-alive</ses:name>
+ <ses:value>300</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>user-agent</ses:name>
+ <ses:value>Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US;
rv:1.7.5) Gecko/20041107 Firefox/1.0</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>
+ <title>HashMap CheckBoxGroup</title>
+ <style type="text/css">
+ .normalAttr {color: #cc0099;font-family:Verdana;
font-size:8pt;margin:0,0,0,0;}
+ .normal {color: #cc9999;font-family:Verdana;
font-size:8pt;margin:0,0,0,0;}
+ .normal2 {color: #00cc99;font-family:Verdana;
font-size:8pt;margin:0,0,0,0;}
+ .normal3 {color: #99cc99;font-family:Verdana;
font-size:8pt;margin:0,0,0,0;}
+ </style>
+ </head>
+ <body>
+ <h4>HashMap CheckBoxGroup</h4>
+ <p style="color:green">This is a test of the CheckBoxGroup repeating
+ against a HashMap. We use JSTL to filter out the key "junk" key. This
+ test verifies repeating CheckBoxGroups working against a HashMap and
+ using JSTL inside the body of the repeater.</p>
+ <form id="Netui_Form_0" action="/coreWeb/coretags/cbg/hash/post.do"
method="post">
+ <table width="200pt">
+ <caption class="normalAttr">CheckBox Group</caption>
+
+
+
+
+ <tr align="center"><td align="right" width="25%">
+ <input type="checkbox"
name="wlw-checkbox_group_key:{pageFlow.resultsOne}" value="val1"></td>
+ <td align="left"><span>Value One</span>
+ </td></tr>
+
+
+
+ <tr align="center"><td align="right" width="25%">
+ <input type="checkbox"
name="wlw-checkbox_group_key:{pageFlow.resultsOne}" value="val2"></td>
+ <td align="left"><span>Value Two</span>
+ </td></tr>
+
+
+
+ <tr align="center"><td align="right" width="25%">
+ <input type="checkbox"
name="wlw-checkbox_group_key:{pageFlow.resultsOne}" value="val3"></td>
+ <td align="left"><span>Value Three</span>
+ </td></tr>
+
+
+
+ <tr align="center"><td align="right" width="25%">
+ <input type="checkbox"
name="wlw-checkbox_group_key:{pageFlow.resultsOne}" value="val4"></td>
+ <td align="left"><span>Value Four</span>
+ </td></tr>
+
+
+ </table>
+ <input type="submit" value="submit">
+ </form>
+ </body>
+
+</html>]]></ses:responseBody>
+ </ses:response>
+ </ses:test>
+ <ses:test>
+ <ses:testNumber>2</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/cbg/hash/post.do</ses:uri>
+ <ses:method>POST</ses:method>
+ <ses:parameters>
+ <ses:parameter>
+
<ses:name>wlw-checkbox_group_key:{pageFlow.resultsOne}</ses:name>
+ <ses:value>val2</ses:value>
+ </ses:parameter>
+ <ses:parameter>
+
<ses:name>wlw-checkbox_group_key:{pageFlow.resultsOne}</ses:name>
+ <ses:value>val3</ses:value>
+ </ses:parameter>
+ </ses:parameters>
+ <ses:cookies>
+ <ses:cookie>
+ <ses:name>JSESSIONID</ses:name>
+ <ses:value>AB365DA1977B5F6E972F6AAB74B09624</ses:value>
+ </ses:cookie>
+ </ses:cookies>
+ <ses:headers>
+ <ses:header>
+ <ses:name>accept</ses:name>
+
<ses:value>text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>accept-charset</ses:name>
+ <ses:value>ISO-8859-1,utf-8;q=0.7,*;q=0.7</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,en;q=0.5</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>connection</ses:name>
+ <ses:value>keep-alive</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>content-length</ses:name>
+ <ses:value>111</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>content-type</ses:name>
+ <ses:value>application/x-www-form-urlencoded</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>cookie</ses:name>
+
<ses:value>JSESSIONID=AB365DA1977B5F6E972F6AAB74B09624</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>host</ses:name>
+ <ses:value>localhost:8080</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>keep-alive</ses:name>
+ <ses:value>300</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>referer</ses:name>
+
<ses:value>http://localhost:8080/coreWeb/coretags/cbg/hash/Controller.jpf</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>user-agent</ses:name>
+ <ses:value>Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US;
rv:1.7.5) Gecko/20041107 Firefox/1.0</ses:value>
+ </ses:header>
+ </ses:headers>
+ </ses:request>
+ <ses:response>
+ <ses:statusCode>200</ses:statusCode>
+ <ses:reason/>
+ <ses:responseBody><![CDATA[<html>
+ <head>
+ </head>
+ <body>
+ <h4>Results One</h4>
+ <a href="/coreWeb/coretags/cbg/hash/begin.do">Home</a>
+ <ul>
+
+ <li><span>val2</span></li>
+
+ <li><span>val3</span></li>
+
+ </ul>
+ </body>
+</html>]]></ses:responseBody>
+ </ses:response>
+ </ses:test>
+ </ses:tests>
+ <ses:endDate>04 Feb 2005, 11:45:41.944 AM MST</ses:endDate>
+ <ses:testCount>2</ses:testCount>
+</ses:recorderSession>
\ No newline at end of file
Added:
incubator/beehive/trunk/netui/test/webapps/drt/testRecorder/tests/CtRbgHash.xml
URL:
http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/test/webapps/drt/testRecorder/tests/CtRbgHash.xml?view=auto&rev=151392
==============================================================================
---
incubator/beehive/trunk/netui/test/webapps/drt/testRecorder/tests/CtRbgHash.xml
(added)
+++
incubator/beehive/trunk/netui/test/webapps/drt/testRecorder/tests/CtRbgHash.xml
Fri Feb 4 11:18:44 2005
@@ -0,0 +1,216 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ses:recorderSession
xmlns:ses="http://beehive.apache.org/netui/tools/testrecorder/2004/session">
+ <ses:sessionName>CtRbgHash</ses:sessionName>
+ <ses:tester>Daryl</ses:tester>
+ <ses:startDate>04 Feb 2005, 11:54:15.182 AM MST</ses:startDate>
+ <ses:description>Verification that a repeating RadioButtonGroup and iterate
over a hashMap.</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/rbg/hash/Controller.jpf</ses:uri>
+ <ses:method>GET</ses:method>
+ <ses:parameters/>
+ <ses:cookies>
+ <ses:cookie>
+ <ses:name>JSESSIONID</ses:name>
+ <ses:value>0B2A957CEDA0B76C652E3A40DC6194FC</ses:value>
+ </ses:cookie>
+ </ses:cookies>
+ <ses:headers>
+ <ses:header>
+ <ses:name>accept</ses:name>
+
<ses:value>text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>accept-charset</ses:name>
+ <ses:value>ISO-8859-1,utf-8;q=0.7,*;q=0.7</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,en;q=0.5</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=0B2A957CEDA0B76C652E3A40DC6194FC</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>host</ses:name>
+ <ses:value>localhost:8080</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>keep-alive</ses:name>
+ <ses:value>300</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>user-agent</ses:name>
+ <ses:value>Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US;
rv:1.7.5) Gecko/20041107 Firefox/1.0</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>
+ <title>HashMap RadioButtonGroup</title>
+ <style type="text/css">
+ .normalAttr {color: #cc0099;font-family:Verdana;
font-size:8pt;margin:0,0,0,0;}
+ .normal {color: #cc9999;font-family:Verdana;
font-size:8pt;margin:0,0,0,0;}
+ .normal2 {color: #00cc99;font-family:Verdana;
font-size:8pt;margin:0,0,0,0;}
+ .normal3 {color: #99cc99;font-family:Verdana;
font-size:8pt;margin:0,0,0,0;}
+ </style>
+ </head>
+ <body>
+ <h4>HashMap RadioButtonGroup</h4>
+ <p style="color:green">This is a test of the RadioButtonGroup repeating
+ against a HashMap. We use JSTL to filter out the key "junk" key. This
+ test verifies repeating RadioButtonGroups working against a HashMap and
+ using JSTL inside the body of the repeater.</p>
+ <form id="Netui_Form_0" action="/coreWeb/coretags/rbg/hash/post.do"
method="post">
+ <table width="200pt">
+ <caption class="normalAttr">RadioButton Group</caption>
+
+
+
+
+ <tr align="center"><td align="right" width="25%">
+ <input type="radio"
name="wlw-radio_button_group_key:{pageFlow.resultsOne}" value="val1"></td>
+ <td align="left"><span>Value One</span>
+ </td></tr>
+
+
+
+ <tr align="center"><td align="right" width="25%">
+ <input type="radio"
name="wlw-radio_button_group_key:{pageFlow.resultsOne}" value="val2"></td>
+ <td align="left"><span>Value Two</span>
+ </td></tr>
+
+
+
+ <tr align="center"><td align="right" width="25%">
+ <input type="radio"
name="wlw-radio_button_group_key:{pageFlow.resultsOne}" value="val3"></td>
+ <td align="left"><span>Value Three</span>
+ </td></tr>
+
+
+
+ <tr align="center"><td align="right" width="25%">
+ <input type="radio"
name="wlw-radio_button_group_key:{pageFlow.resultsOne}" value="val4"></td>
+ <td align="left"><span>Value Four</span>
+ </td></tr>
+
+
+ </table>
+ <input type="submit" value="submit">
+ </form>
+ </body>
+
+</html>]]></ses:responseBody>
+ </ses:response>
+ </ses:test>
+ <ses:test>
+ <ses:testNumber>2</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/rbg/hash/post.do</ses:uri>
+ <ses:method>POST</ses:method>
+ <ses:parameters>
+ <ses:parameter>
+
<ses:name>wlw-radio_button_group_key:{pageFlow.resultsOne}</ses:name>
+ <ses:value>val2</ses:value>
+ </ses:parameter>
+ </ses:parameters>
+ <ses:cookies>
+ <ses:cookie>
+ <ses:name>JSESSIONID</ses:name>
+ <ses:value>0B2A957CEDA0B76C652E3A40DC6194FC</ses:value>
+ </ses:cookie>
+ </ses:cookies>
+ <ses:headers>
+ <ses:header>
+ <ses:name>accept</ses:name>
+
<ses:value>text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>accept-charset</ses:name>
+ <ses:value>ISO-8859-1,utf-8;q=0.7,*;q=0.7</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,en;q=0.5</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>connection</ses:name>
+ <ses:value>keep-alive</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>content-length</ses:name>
+ <ses:value>59</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>content-type</ses:name>
+ <ses:value>application/x-www-form-urlencoded</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>cookie</ses:name>
+
<ses:value>JSESSIONID=0B2A957CEDA0B76C652E3A40DC6194FC</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>host</ses:name>
+ <ses:value>localhost:8080</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>keep-alive</ses:name>
+ <ses:value>300</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>referer</ses:name>
+
<ses:value>http://localhost:8080/coreWeb/coretags/rbg/hash/Controller.jpf</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>user-agent</ses:name>
+ <ses:value>Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US;
rv:1.7.5) Gecko/20041107 Firefox/1.0</ses:value>
+ </ses:header>
+ </ses:headers>
+ </ses:request>
+ <ses:response>
+ <ses:statusCode>200</ses:statusCode>
+ <ses:reason/>
+ <ses:responseBody><![CDATA[<html>
+ <head>
+ </head>
+ <body>
+ <h4>Results One</h4>
+ <a href="/coreWeb/coretags/rbg/hash/begin.do">Home</a>
+ <span>val2</span>
+ </body>
+</html>]]></ses:responseBody>
+ </ses:response>
+ </ses:test>
+ </ses:tests>
+ <ses:endDate>04 Feb 2005, 11:54:26.368 AM MST</ses:endDate>
+ <ses:testCount>2</ses:testCount>
+</ses:recorderSession>
\ No newline at end of file