beehive/netui/test/webapps/drt/web/javascript/jsScriptScopeId/index.jsp

101 lines
5.0 KiB
Plaintext

<!--Generated by WebLogic Workshop-->
<%@ page language="java" contentType="text/html;charset=UTF-8"%>
<%@ taglib uri="http://beehive.apache.org/netui/tags-databinding-1.0" prefix="netui-data"%>
<%@ taglib uri="http://beehive.apache.org/netui/tags-html-1.0" prefix="netui"%>
<%@ taglib uri="http://beehive.apache.org/netui/tags-template-1.0" prefix="netui-template"%>
<html>
<head>
<title>
Web Application Page
</title>
</head>
<body>
<table border='1' cellspacing="0" cellpadding="5"><tr><td>
<netui:scriptContainer idScope="one" >
<netui:form action="submit" focus="firstName">
<h4>Form One</h4>
<table class="tablebody">
<netui:parameter name="scope" value="one"></netui:parameter>
<tr class="tablehead">
<td>LastName:</td>
<td>
<netui:textBox dataSource="actionForm.lastName" tagId="lastName"></netui:textBox>
</td>
</tr>
<tr class="tablehead">
<td>FirstName:</td>
<td>
<netui:textBox dataSource="actionForm.firstName" tagId="firstName"></netui:textBox>
</td>
</tr>
</table>
<br/>
<netui:anchor formSubmit="true" action="${pageFlow.action}">Submit pageFlow.action("Foo")
<netui:parameter name="anchorForm" value='Submit pageFlow.action("Foo")'></netui:parameter>
</netui:anchor>
&nbsp;
<netui:anchor formSubmit="true" action="baz">Submit Baz
<netui:parameter name="anchorForm" value='Submit Baz'></netui:parameter>
</netui:anchor>
&nbsp;
<netui:anchor formSubmit="true">Default Form Submit
<netui:parameter name="anchorForm" value='Default Form Submit'></netui:parameter>
</netui:anchor>
<br />
<netui:imageAnchor action="imageSubmit" src="./../../resources/images/bar-background.gif" formSubmit="true">
<netui:parameter name="anchorForm" value="Submit from ImageAnchor"></netui:parameter>
</netui:imageAnchor>
&nbsp;
<netui:imageButton src="../../images/godzilla.gif" rolloverImage="../../images/godzillaRollover.gif" />
</netui:form>
</netui:scriptContainer>
</td><td>
<netui:scriptContainer idScope="two" >
<netui:form action="submit">
<h4>Form Two</h4>
<netui:parameter name="scope" value="two"></netui:parameter>
<table class="tablebody">
<tr class="tablehead">
<td>LastName:</td>
<td>
<netui:textBox dataSource="actionForm.lastName" tagId="lastName"></netui:textBox>
</td>
</tr>
<tr class="tablehead">
<td>FirstName:</td>
<td>
<netui:textBox dataSource="actionForm.firstName" tagId="firstName"></netui:textBox>
</td>
</tr>
</table>
<br/>
<netui:anchor formSubmit="true" action="${pageFlow.action}">Submit pageFlow.action("Foo")
<netui:parameter name="anchorForm" value='Submit pageFlow.action("Foo")'></netui:parameter>
</netui:anchor>
&nbsp;
</netui:form>
</netui:scriptContainer>
</td></tr></table>
<hr />
<netui:imageAnchor action="begin" src="../../images/godzilla.gif" rolloverImage="../../images/godzillaRollover.gif" height="100" width="80">PostBack</netui:imageAnchor>
<script language="JavaScript" type="text/JavaScript">
document.writeln("<br/>Get Name<br/>");
var name = getNetuiTagName("firstName",document.forms[0]);
var myscope = getScopeId(document.forms[0]);
document.writeln("Name:" + name + " Scope:" + myscope + "<br/>");
name = getNetuiTagName("lastName",document.forms[0]);
var myscope = getScopeId(document.forms[0]);
document.writeln("Name:" + name + " Scope:" + myscope + "<br/>");
var name = getNetuiTagName("firstName",document.forms[1]);
var myscope = getScopeId(document.forms[1]);
document.writeln("Name:" + name + " Scope:" + myscope + "<br/>");
name = getNetuiTagName("lastName",document.forms[1]);
var myscope = getScopeId(document.forms[1]);
document.writeln("Name:" + name + " Scope:" + myscope + "<br/>");
</script>
</body>
<html>