Author: dolander
Date: Wed Mar  9 10:55:14 2005
New Revision: 156668

URL: http://svn.apache.org/viewcvs?view=rev&rev=156668
Log:
Add BVT for Form.location and Form.focus


Added:
    incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/coretags/form/focus/
    
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/coretags/form/focus/Controller.jpf
    
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/coretags/form/focus/index.jsp
    
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/coretags/form/location/
    
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/coretags/form/location/Controller.jpf
    
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/coretags/form/location/index.jsp
    
incubator/beehive/trunk/netui/test/webapps/drt/testRecorder/tests/CtFormFocus.xml
    
incubator/beehive/trunk/netui/test/webapps/drt/testRecorder/tests/CtFormLocation.xml
Modified:
    
incubator/beehive/trunk/netui/test/webapps/drt/testRecorder/config/testRecorder-tests.xml

Added: 
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/coretags/form/focus/Controller.jpf
URL: 
http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/coretags/form/focus/Controller.jpf?view=auto&rev=156668
==============================================================================
--- 
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/coretags/form/focus/Controller.jpf
 (added)
+++ 
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/coretags/form/focus/Controller.jpf
 Wed Mar  9 10:55:14 2005
@@ -0,0 +1,79 @@
+/*
+ * 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.form.focus;
+
+import org.apache.beehive.netui.pageflow.FormData;
+
+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 _results;
+    public String getResults() {
+       return _results;
+    }
+
+    @Jpf.Action(
+        forwards={
+           @Jpf.Forward(name="index", path="index.jsp")
+        }
+    )
+    protected Forward begin()
+    {
+        return new Forward("index");
+    }
+        
+    @Jpf.Action(forwards = { 
+    @Jpf.Forward(name = "success", path = "index.jsp")
+       })
+    protected Forward post(FormBean bean)        {
+        Forward forward = new Forward("success");
+       _results = bean.getText1() + " " + bean.getText2() + " " +
+           bean.getText3();
+       return forward;
+    }
+
+    public static class FormBean extends FormData
+    {
+        private String _text1;
+        private String _text2;
+        private String _text3;
+
+        public String getText1()
+        { return _text1; }
+        public void setText1(String value)
+        { _text1 = value; }
+
+        public String getText2()
+        { return _text2; }
+        public void setText2(String value)
+        { _text2 = value; }
+
+        public String getText3()
+        { return _text3; }
+        public void setText3(String value)
+        { _text3 = value; }
+
+    }
+}

Added: 
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/coretags/form/focus/index.jsp
URL: 
http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/coretags/form/focus/index.jsp?view=auto&rev=156668
==============================================================================
--- 
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/coretags/form/focus/index.jsp
 (added)
+++ 
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/coretags/form/focus/index.jsp
 Wed Mar  9 10:55:14 2005
@@ -0,0 +1,26 @@
+<%@ page language="java" contentType="text/html;charset=UTF-8"%>
+<%@ taglib prefix="netui" uri="http://beehive.apache.org/netui/tags-html-1.0"%>
+<%@ taglib prefix="netui-data" 
uri="http://beehive.apache.org/netui/tags-databinding-1.0"%>
+<%@ taglib prefix="netui-template" 
uri="http://beehive.apache.org/netui/tags-template-1.0"%>
+<netui:html>
+    <head>
+        <netui:base/>
+    </head>
+    <body>
+        <h4>Post Form With an Anchor</h4>
+        <p style="color:green">This tests the focus.  The focus for the
+           form should be on the <b>Text 2</b> textbox when the page is
+           loaded.
+        </p>
+        <netui:form action="post" focus="text2">    
+           Text 1: <netui:textBox tagId="text1" dataSource="actionForm.text1" 
/><br>
+           Text 2: <netui:textBox tagId="text2" dataSource="actionForm.text2" 
/><br>
+           Text 3: <netui:textBox tagId="text3" dataSource="actionForm.text3" 
/><br>
+            <netui:button value="submit" />
+        </netui:form>
+        <hr>
+        Results: ${pageFlow.results}
+    </body>
+</netui:html>
+
+  

Added: 
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/coretags/form/location/Controller.jpf
URL: 
http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/coretags/form/location/Controller.jpf?view=auto&rev=156668
==============================================================================
--- 
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/coretags/form/location/Controller.jpf
 (added)
+++ 
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/coretags/form/location/Controller.jpf
 Wed Mar  9 10:55:14 2005
@@ -0,0 +1,61 @@
+/*
+ * 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.form.location;
+
+import org.apache.beehive.netui.pageflow.FormData;
+
+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
+{
+    @Jpf.Action(
+        forwards={
+           @Jpf.Forward(name="index", path="index.jsp")
+        }
+    )
+    protected Forward begin()
+    {
+        return new Forward("index");
+    }
+        
+    @Jpf.Action(forwards = { 
+    @Jpf.Forward(name = "success", path = "index.jsp")
+       })
+    protected Forward post(FormBean bean)        {
+        Forward forward = new Forward("success");
+        
+                return forward;
+    }
+
+    public static class FormBean extends FormData
+    {
+        private String _type = "Default Type Value";
+
+        public String getType()
+        { return _type; }
+
+        public void setType(String type)
+        { _type = type; }
+    }
+}

Added: 
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/coretags/form/location/index.jsp
URL: 
http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/coretags/form/location/index.jsp?view=auto&rev=156668
==============================================================================
--- 
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/coretags/form/location/index.jsp
 (added)
+++ 
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/coretags/form/location/index.jsp
 Wed Mar  9 10:55:14 2005
@@ -0,0 +1,37 @@
+<%@ page language="java" contentType="text/html;charset=UTF-8"%>
+<%@ taglib prefix="netui" uri="http://beehive.apache.org/netui/tags-html-1.0"%>
+<%@ taglib prefix="netui-data" 
uri="http://beehive.apache.org/netui/tags-databinding-1.0"%>
+<%@ taglib prefix="netui-template" 
uri="http://beehive.apache.org/netui/tags-template-1.0"%>
+<netui:html>
+    <head>
+        <netui:base/>
+    </head>
+    <body>
+        <netui:anchor tagId="Top"/>
+        <h4>Form Location</h4>
+        <p style="color:green">This test will verify that setting a location
+       on the form results in the proper navigation to a location within the
+       document.  In this case, submitting the form results in going to the
+       bottom of this page.
+       </p>
+        <netui:form action="post" location="label">    
+            <input type="hidden" name="foo" value="value">
+            <netui:button value="submit">
+               <netui:parameter name="submit" value="extra" />
+           </netui:button><br>
+            <netui:anchor formSubmit="true">Submit the form
+               <netui:parameter name="submit" value="link" />
+           </netui:anchor>
+        </netui:form>
+        <hr>
+       <div style="height: 500px;border: 1pt solid black">
+        </div>
+        <netui:anchor tagId="label"/>
+        <netui:anchor linkName="#Top">Go To Top</netui:anchor>
+       <p style="color:green">These are the results from the form post</p>
+        <p>Value: ${param.foo}</p>
+        <p>Value: ${param.submit}</p>
+    </body>
+</netui:html>
+
+  

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=156667&r2=156668
==============================================================================
--- 
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
 Wed Mar  9 10:55:14 2005
@@ -2262,6 +2262,20 @@
          </features>
       </test>
       <test>
+         <name>CtFormFocus</name>
+         <description>Test of the focus attribute on a Form.</description>
+         <webapp>coreWeb</webapp>
+         <categories>
+            <category>bvt</category>
+            <category>bvt.struts11</category>
+            <category>tags</category>
+         </categories>
+         <features>
+            <feature>Form</feature>
+            <feature>focus</feature>
+         </features>
+      </test>
+      <test>
          <name>CtFormJspost</name>
          <description>Post a Form with JavaScript</description>
          <webapp>coreWeb</webapp>
@@ -2273,6 +2287,20 @@
          <features>
             <feature>Form</feature>
             <feature>JavaScript</feature>
+         </features>
+      </test>
+      <test>
+         <name>CtFormLocation</name>
+         <description>Test of the location attribute on a Form.</description>
+         <webapp>coreWeb</webapp>
+         <categories>
+            <category>bvt</category>
+            <category>bvt.struts11</category>
+            <category>tags</category>
+         </categories>
+         <features>
+            <feature>Form</feature>
+            <feature>location</feature>
          </features>
       </test>
       <test>

Added: 
incubator/beehive/trunk/netui/test/webapps/drt/testRecorder/tests/CtFormFocus.xml
URL: 
http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/test/webapps/drt/testRecorder/tests/CtFormFocus.xml?view=auto&rev=156668
==============================================================================
--- 
incubator/beehive/trunk/netui/test/webapps/drt/testRecorder/tests/CtFormFocus.xml
 (added)
+++ 
incubator/beehive/trunk/netui/test/webapps/drt/testRecorder/tests/CtFormFocus.xml
 Wed Mar  9 10:55:14 2005
@@ -0,0 +1,181 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ses:recorderSession 
xmlns:ses="http://beehive.apache.org/netui/tools/testrecorder/2004/session";>
+   <ses:sessionName>CtFormFocus</ses:sessionName>
+   <ses:tester>Daryl</ses:tester>
+   <ses:startDate>09 Mar 2005, 10:55:04.891 AM MST</ses:startDate>
+   <ses:description>Test of the focus attribute on a Form.</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/form/focus/Controller.jpf</ses:uri>
+            <ses:method>GET</ses:method>
+            <ses:parameters/>
+            <ses:cookies>
+               <ses:cookie>
+                  <ses:name>JSESSIONID</ses:name>
+                  <ses:value>E58F0E84F0C67A0C1F8C5DE45DD34EF7</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=E58F0E84F0C67A0C1F8C5DE45DD34EF7</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>&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 
Transitional//EN"
+       "http://www.w3.org/TR/html4/loose.dtd";>
+&lt;html lang="en">
+
+    &lt;head>
+        &lt;base 
href="http://localhost:8080/coreWeb/coretags/form/focus/index.jsp";>
+    &lt;/head>
+    &lt;body>
+        &lt;h4>Post Form With an Anchor&lt;/h4>
+        &lt;p style="color:green">This tests the focus.  The focus for the
+           form should be on the &lt;b>Text 2&lt;/b> textbox when the page is
+           loaded.
+        &lt;/p>
+        &lt;form name="Netui_Form_0" id="Netui_Form_0" 
action="/coreWeb/coretags/form/focus/post.do" method="post">    
+           Text 1: &lt;input type="text" name="{actionForm.text1}" 
id="text1">&lt;br>
+           Text 2: &lt;input type="text" name="{actionForm.text2}" 
id="text2">&lt;br>
+           Text 3: &lt;input type="text" name="{actionForm.text3}" 
id="text3">&lt;br>
+            &lt;input type="submit" value="submit">
+        &lt;/form>
+&lt;script language="JavaScript" type="text/JavaScript">
+&lt;!--
+// set the focus on a field within the named form
+if (document.forms["Netui_Form_0"]["{actionForm.text2}"].type != "hidden")
+    document.forms["Netui_Form_0"]["{actionForm.text2}"].focus();
+-->
+&lt;/script>
+
+        &lt;hr>
+        Results: 
+    &lt;/body>
+&lt;script language="JavaScript" type="text/JavaScript">
+&lt;!--
+
+// **** Start the NetUI Framework Generated JavaScript ****
+
+// Build the netui_names table to map the tagId attributes
+// to the real id written into the HTML
+if (netui_names == null)
+   var netui_names = new Object();
+netui_names.text2="{actionForm.text2}"
+netui_names.text3="{actionForm.text3}"
+netui_names.text1="{actionForm.text1}"
+
+
+// Build the netui_names table to map the tagId attributes
+// to the real id written into the HTML
+if (netui_tagIdNameMap == null)
+   var netui_tagIdNameMap = new Object();
+netui_tagIdNameMap.text2="{actionForm.text2}"
+netui_tagIdNameMap.text3="{actionForm.text3}"
+netui_tagIdNameMap.text1="{actionForm.text1}"
+
+
+// method which will return a real id for a tagId,
+// the tag parameter will be used to find the idScope for
+// containers that may scope their ids
+function getNetuiTagName(id, tag)
+{
+   var idScope = getScopeId(tag);
+   if (idScope == "")
+      return netui_names[id];
+   else
+      return netui_names[idScope  + "__" + id];
+}
+
+// This method will walk the hierarchy from the pass element looking for a 
idScope.
+// The first idScope found will be returned or the empty string if a idScope 
is not found.
+function getScopeId(tag)
+{
+   if (tag == null || tag.getAttribute == null)
+      return "";
+   var attrVal = tag.getAttribute("netui:idScope");
+   if (attrVal != null)
+      return attrVal;
+   return getScopeId(tag.parentNode);
+}
+
+// lookup by tagId to "real id"
+function lookupIdByTagId(id, tag)
+{
+   var idScope = lookupIdScope(tag,".");
+   return (idScope == "") ? id : idScope + id;
+}
+
+// lookup by tagId to "real name"
+function lookupNameByTagId(id, tag)
+{
+   var idScope = lookupIdScope(tag,"_");
+   if (idScope == "")
+      return netui_tagIdNameMap[id];
+   else
+      return netui_tagIdNameMap[idScope  + "__" + id];
+}
+
+//Non-Legacy lookup method creating a fully qualified scope id
+function lookupIdScope(tag,sep)
+{
+   var val = "";
+   if (sep == null) sep = "";
+   while (tag != null &amp;&amp; tag.getAttribute != null) {
+      var attrVal = tag.getAttribute("netui:idScope");
+      if (attrVal != null)
+         val = attrVal + sep + val;
+      tag = tag.parentNode;
+   }
+   return val;
+}
+-->
+&lt;/script>
+&lt;/html></ses:responseBody>
+         </ses:response>
+      </ses:test>
+   </ses:tests>
+   <ses:endDate>09 Mar 2005, 10:55:18.581 AM MST</ses:endDate>
+   <ses:testCount>1</ses:testCount>
+</ses:recorderSession>
\ No newline at end of file

Added: 
incubator/beehive/trunk/netui/test/webapps/drt/testRecorder/tests/CtFormLocation.xml
URL: 
http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/test/webapps/drt/testRecorder/tests/CtFormLocation.xml?view=auto&rev=156668
==============================================================================
--- 
incubator/beehive/trunk/netui/test/webapps/drt/testRecorder/tests/CtFormLocation.xml
 (added)
+++ 
incubator/beehive/trunk/netui/test/webapps/drt/testRecorder/tests/CtFormLocation.xml
 Wed Mar  9 10:55:14 2005
@@ -0,0 +1,581 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ses:recorderSession 
xmlns:ses="http://beehive.apache.org/netui/tools/testrecorder/2004/session";>
+   <ses:sessionName>CtFormLocation</ses:sessionName>
+   <ses:tester>Daryl</ses:tester>
+   <ses:startDate>09 Mar 2005, 10:45:41.471 AM MST</ses:startDate>
+   <ses:description>Test of the location attribute on the 
Form</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/form/location/Controller.jpf</ses:uri>
+            <ses:method>GET</ses:method>
+            <ses:parameters/>
+            <ses:cookies>
+               <ses:cookie>
+                  <ses:name>JSESSIONID</ses:name>
+                  <ses:value>E58F0E84F0C67A0C1F8C5DE45DD34EF7</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=E58F0E84F0C67A0C1F8C5DE45DD34EF7</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>&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 
Transitional//EN"
+       "http://www.w3.org/TR/html4/loose.dtd";>
+&lt;html lang="en">
+
+    &lt;head>
+        &lt;base 
href="http://localhost:8080/coreWeb/coretags/form/location/index.jsp";>
+    &lt;/head>
+    &lt;body>
+        &lt;a id="Top" name="Top">&lt;/a>
+        &lt;h4>Form Location&lt;/h4>
+        &lt;p style="color:green">This test will verify that setting a location
+       on the form results in the proper navigation to a location within the
+       document.  In this case, submitting the form results in going to the
+       bottom of this page.
+       &lt;/p>
+        &lt;form name="Netui_Form_0" id="Netui_Form_0" 
action="/coreWeb/coretags/form/location/post.do#label" method="post">    
+            &lt;input type="hidden" name="foo" value="value">
+            &lt;input type="submit" value="submit">&lt;br>
+            &lt;a 
href="/coreWeb/coretags/form/location/post.do?submit=link#label" 
onclick="anchor_submit_form('Netui_Form_0','/coreWeb/coretags/form/location/post.do?submit=link#label');return
 false;">Submit the form&lt;/a>
+        &lt;/form>
+        &lt;hr>
+       &lt;div style="height: 500px;border: 1pt solid black">
+        &lt;/div>
+        &lt;a id="label" name="label">&lt;/a>
+        &lt;a href="#Top">Go To Top&lt;/a>
+       &lt;p style="color:green">These are the results from the form 
post&lt;/p>
+        &lt;p>Value: &lt;/p>
+        &lt;p>Value: &lt;/p>
+    &lt;/body>
+&lt;script language="JavaScript" type="text/JavaScript">
+&lt;!--
+
+// **** Start the NetUI Framework Generated JavaScript ****
+
+// submit the form from an Anchor or ImageAnchor
+// Search for the form by actionName,
+// Replace the action with the passed in action
+// Submit the form
+function anchor_submit_form(netuiName, newAction)
+{
+  for (var i=0; i&lt;document.forms.length; i++) {
+     if (document.forms[i].id == netuiName) {
+        document.forms[i].method = "POST";
+        document.forms[i].action = newAction;
+        document.forms[i].submit();
+     }
+   }
+}
+
+// lookup by tagId to "real id"
+function lookupIdByTagId(id, tag)
+{
+   var idScope = lookupIdScope(tag,".");
+   return (idScope == "") ? id : idScope + id;
+}
+
+//Non-Legacy lookup method creating a fully qualified scope id
+function lookupIdScope(tag,sep)
+{
+   var val = "";
+   if (sep == null) sep = "";
+   while (tag != null &amp;&amp; tag.getAttribute != null) {
+      var attrVal = tag.getAttribute("netui:idScope");
+      if (attrVal != null)
+         val = attrVal + sep + val;
+      tag = tag.parentNode;
+   }
+   return val;
+}
+-->
+&lt;/script>
+&lt;/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/form/location/post.do</ses:uri>
+            <ses:method>POST</ses:method>
+            <ses:parameters>
+               <ses:parameter>
+                  <ses:name>foo</ses:name>
+                  <ses:value>value</ses:value>
+               </ses:parameter>
+               <ses:parameter>
+                  <ses:name>submit</ses:name>
+                  <ses:value>link</ses:value>
+               </ses:parameter>
+            </ses:parameters>
+            <ses:cookies>
+               <ses:cookie>
+                  <ses:name>JSESSIONID</ses:name>
+                  <ses:value>E58F0E84F0C67A0C1F8C5DE45DD34EF7</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>9</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=E58F0E84F0C67A0C1F8C5DE45DD34EF7</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/form/location/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>&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 
Transitional//EN"
+       "http://www.w3.org/TR/html4/loose.dtd";>
+&lt;html lang="en">
+
+    &lt;head>
+        &lt;base 
href="http://localhost:8080/coreWeb/coretags/form/location/index.jsp";>
+    &lt;/head>
+    &lt;body>
+        &lt;a id="Top" name="Top">&lt;/a>
+        &lt;h4>Form Location&lt;/h4>
+        &lt;p style="color:green">This test will verify that setting a location
+       on the form results in the proper navigation to a location within the
+       document.  In this case, submitting the form results in going to the
+       bottom of this page.
+       &lt;/p>
+        &lt;form name="Netui_Form_0" id="Netui_Form_0" 
action="/coreWeb/coretags/form/location/post.do#label" method="post">    
+            &lt;input type="hidden" name="foo" value="value">
+            &lt;input type="submit" value="submit">&lt;br>
+            &lt;a 
href="/coreWeb/coretags/form/location/post.do?submit=link#label" 
onclick="anchor_submit_form('Netui_Form_0','/coreWeb/coretags/form/location/post.do?submit=link#label');return
 false;">Submit the form&lt;/a>
+        &lt;/form>
+        &lt;hr>
+       &lt;div style="height: 500px;border: 1pt solid black">
+        &lt;/div>
+        &lt;a id="label" name="label">&lt;/a>
+        &lt;a href="#Top">Go To Top&lt;/a>
+       &lt;p style="color:green">These are the results from the form 
post&lt;/p>
+        &lt;p>Value: value&lt;/p>
+        &lt;p>Value: link&lt;/p>
+    &lt;/body>
+&lt;script language="JavaScript" type="text/JavaScript">
+&lt;!--
+
+// **** Start the NetUI Framework Generated JavaScript ****
+
+// submit the form from an Anchor or ImageAnchor
+// Search for the form by actionName,
+// Replace the action with the passed in action
+// Submit the form
+function anchor_submit_form(netuiName, newAction)
+{
+  for (var i=0; i&lt;document.forms.length; i++) {
+     if (document.forms[i].id == netuiName) {
+        document.forms[i].method = "POST";
+        document.forms[i].action = newAction;
+        document.forms[i].submit();
+     }
+   }
+}
+
+// lookup by tagId to "real id"
+function lookupIdByTagId(id, tag)
+{
+   var idScope = lookupIdScope(tag,".");
+   return (idScope == "") ? id : idScope + id;
+}
+
+//Non-Legacy lookup method creating a fully qualified scope id
+function lookupIdScope(tag,sep)
+{
+   var val = "";
+   if (sep == null) sep = "";
+   while (tag != null &amp;&amp; tag.getAttribute != null) {
+      var attrVal = tag.getAttribute("netui:idScope");
+      if (attrVal != null)
+         val = attrVal + sep + val;
+      tag = tag.parentNode;
+   }
+   return val;
+}
+-->
+&lt;/script>
+&lt;/html></ses:responseBody>
+         </ses:response>
+      </ses:test>
+      <ses:test>
+         <ses:testNumber>3</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/form/location/index.jsp</ses:uri>
+            <ses:method>GET</ses:method>
+            <ses:parameters/>
+            <ses:cookies>
+               <ses:cookie>
+                  <ses:name>JSESSIONID</ses:name>
+                  <ses:value>E58F0E84F0C67A0C1F8C5DE45DD34EF7</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=E58F0E84F0C67A0C1F8C5DE45DD34EF7</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/form/location/post.do?submit=link</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>&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 
Transitional//EN"
+       "http://www.w3.org/TR/html4/loose.dtd";>
+&lt;html lang="en">
+
+    &lt;head>
+        &lt;base 
href="http://localhost:8080/coreWeb/coretags/form/location/index.jsp";>
+    &lt;/head>
+    &lt;body>
+        &lt;a id="Top" name="Top">&lt;/a>
+        &lt;h4>Form Location&lt;/h4>
+        &lt;p style="color:green">This test will verify that setting a location
+       on the form results in the proper navigation to a location within the
+       document.  In this case, submitting the form results in going to the
+       bottom of this page.
+       &lt;/p>
+        &lt;form name="Netui_Form_0" id="Netui_Form_0" 
action="/coreWeb/coretags/form/location/post.do#label" method="post">    
+            &lt;input type="hidden" name="foo" value="value">
+            &lt;input type="submit" value="submit">&lt;br>
+            &lt;a 
href="/coreWeb/coretags/form/location/post.do?submit=link#label" 
onclick="anchor_submit_form('Netui_Form_0','/coreWeb/coretags/form/location/post.do?submit=link#label');return
 false;">Submit the form&lt;/a>
+        &lt;/form>
+        &lt;hr>
+       &lt;div style="height: 500px;border: 1pt solid black">
+        &lt;/div>
+        &lt;a id="label" name="label">&lt;/a>
+        &lt;a href="#Top">Go To Top&lt;/a>
+       &lt;p style="color:green">These are the results from the form 
post&lt;/p>
+        &lt;p>Value: &lt;/p>
+        &lt;p>Value: &lt;/p>
+    &lt;/body>
+&lt;script language="JavaScript" type="text/JavaScript">
+&lt;!--
+
+// **** Start the NetUI Framework Generated JavaScript ****
+
+// submit the form from an Anchor or ImageAnchor
+// Search for the form by actionName,
+// Replace the action with the passed in action
+// Submit the form
+function anchor_submit_form(netuiName, newAction)
+{
+  for (var i=0; i&lt;document.forms.length; i++) {
+     if (document.forms[i].id == netuiName) {
+        document.forms[i].method = "POST";
+        document.forms[i].action = newAction;
+        document.forms[i].submit();
+     }
+   }
+}
+
+// lookup by tagId to "real id"
+function lookupIdByTagId(id, tag)
+{
+   var idScope = lookupIdScope(tag,".");
+   return (idScope == "") ? id : idScope + id;
+}
+
+//Non-Legacy lookup method creating a fully qualified scope id
+function lookupIdScope(tag,sep)
+{
+   var val = "";
+   if (sep == null) sep = "";
+   while (tag != null &amp;&amp; tag.getAttribute != null) {
+      var attrVal = tag.getAttribute("netui:idScope");
+      if (attrVal != null)
+         val = attrVal + sep + val;
+      tag = tag.parentNode;
+   }
+   return val;
+}
+-->
+&lt;/script>
+&lt;/html></ses:responseBody>
+         </ses:response>
+      </ses:test>
+      <ses:test>
+         <ses:testNumber>4</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/form/location/post.do</ses:uri>
+            <ses:method>POST</ses:method>
+            <ses:parameters>
+               <ses:parameter>
+                  <ses:name>foo</ses:name>
+                  <ses:value>value</ses:value>
+               </ses:parameter>
+            </ses:parameters>
+            <ses:cookies>
+               <ses:cookie>
+                  <ses:name>JSESSIONID</ses:name>
+                  <ses:value>E58F0E84F0C67A0C1F8C5DE45DD34EF7</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>9</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=E58F0E84F0C67A0C1F8C5DE45DD34EF7</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/form/location/index.jsp</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>&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 
Transitional//EN"
+       "http://www.w3.org/TR/html4/loose.dtd";>
+&lt;html lang="en">
+
+    &lt;head>
+        &lt;base 
href="http://localhost:8080/coreWeb/coretags/form/location/index.jsp";>
+    &lt;/head>
+    &lt;body>
+        &lt;a id="Top" name="Top">&lt;/a>
+        &lt;h4>Form Location&lt;/h4>
+        &lt;p style="color:green">This test will verify that setting a location
+       on the form results in the proper navigation to a location within the
+       document.  In this case, submitting the form results in going to the
+       bottom of this page.
+       &lt;/p>
+        &lt;form name="Netui_Form_0" id="Netui_Form_0" 
action="/coreWeb/coretags/form/location/post.do#label" method="post">    
+            &lt;input type="hidden" name="foo" value="value">
+            &lt;input type="submit" value="submit">&lt;br>
+            &lt;a 
href="/coreWeb/coretags/form/location/post.do?submit=link#label" 
onclick="anchor_submit_form('Netui_Form_0','/coreWeb/coretags/form/location/post.do?submit=link#label');return
 false;">Submit the form&lt;/a>
+        &lt;/form>
+        &lt;hr>
+       &lt;div style="height: 500px;border: 1pt solid black">
+        &lt;/div>
+        &lt;a id="label" name="label">&lt;/a>
+        &lt;a href="#Top">Go To Top&lt;/a>
+       &lt;p style="color:green">These are the results from the form 
post&lt;/p>
+        &lt;p>Value: value&lt;/p>
+        &lt;p>Value: &lt;/p>
+    &lt;/body>
+&lt;script language="JavaScript" type="text/JavaScript">
+&lt;!--
+
+// **** Start the NetUI Framework Generated JavaScript ****
+
+// submit the form from an Anchor or ImageAnchor
+// Search for the form by actionName,
+// Replace the action with the passed in action
+// Submit the form
+function anchor_submit_form(netuiName, newAction)
+{
+  for (var i=0; i&lt;document.forms.length; i++) {
+     if (document.forms[i].id == netuiName) {
+        document.forms[i].method = "POST";
+        document.forms[i].action = newAction;
+        document.forms[i].submit();
+     }
+   }
+}
+
+// lookup by tagId to "real id"
+function lookupIdByTagId(id, tag)
+{
+   var idScope = lookupIdScope(tag,".");
+   return (idScope == "") ? id : idScope + id;
+}
+
+//Non-Legacy lookup method creating a fully qualified scope id
+function lookupIdScope(tag,sep)
+{
+   var val = "";
+   if (sep == null) sep = "";
+   while (tag != null &amp;&amp; tag.getAttribute != null) {
+      var attrVal = tag.getAttribute("netui:idScope");
+      if (attrVal != null)
+         val = attrVal + sep + val;
+      tag = tag.parentNode;
+   }
+   return val;
+}
+-->
+&lt;/script>
+&lt;/html></ses:responseBody>
+         </ses:response>
+      </ses:test>
+   </ses:tests>
+   <ses:endDate>09 Mar 2005, 10:46:00.148 AM MST</ses:endDate>
+   <ses:testCount>4</ses:testCount>
+</ses:recorderSession>
\ No newline at end of file


Reply via email to