FormPage.jsp Sample

This topic inludes the source code for the FormPage.jsp Sample.

Sample Location

This sample is located in the following directory in your WebLogic Workshop installation:

BEA_HOME/weblogic81/samples/workshop/SamplesApp/WebApp/handlingData/multipleForms/

Sample Source Code


01 <%@ page contentType="text/html;charset=UTF-8" language="java" %>
02 <%@ taglib uri="netui-tags-html.tld" prefix="netui" %>
03 
04 
05 <html>
06 <head>
07 <title>Page with Multiple Forms</title>
08 </head>
09 <body bgcolor="white">
10 <jsp:include page="/resources/jsp/header.jsp"/>
11 
12 <h3>Page with multiple forms</h3>
13     
14     <font color="red"><netui:label value="{pageFlow.message}"/></font>
15     <br>
16     <br>
17     
18     <b>Form 1</b>:
19     <netui:form action="submitForm1">
20         <netui:label value="Field A  "/>
21         <netui:textBox dataSource="{actionForm.fieldA}"/>
22         <br>
23         <netui:label value="Field B  "/>
24         <netui:textBox dataSource="{actionForm.fieldB}"/>
25         <br><br>
26         <netui:button>submit Form 1</netui:button>
27     </netui:form>
28     <hr>
29     
30     <b>Form 2</b>:
31     <netui:form action="submitForm2">
32         <netui:label value="Field A  "/>
33         <netui:textBox dataSource="{actionForm.fieldA}"/>
34         <br>
35         <netui:label value="Field B  "/>
36         <netui:textBox dataSource="{actionForm.fieldB}"/>
37         <br><br>
38         <netui:button>submit Form 2</netui:button>
39     </netui:form>
40 
41     <hr>
42     <p><netui:anchor action="begin">Re-run this sample</netui:anchor>
43     <p><netui:anchor href="/WebApp/handlingData/handlingDataController.jpf">
44     Back to Handling Data Samples</netui:anchor>
45 
46 </body>
47 </html>