Simple.jsp Sample
This topic inludes the source code for the Simple.jsp Sample.
Sample Location
This sample is located in the following directory in your WebLogic Workshop installation:
BEA_HOME/weblogic81/samples/workshop/SamplesApp/WebApp/tagSamples/netui_databinding/declarePageInput/
Sample Source Code
01 <%@ page language="java" contentType="text/html;charset=UTF-8"%>
02 <%@ taglib uri="netui-tags-databinding.tld" prefix="netui-data"%>
03 <%@ taglib uri="netui-tags-html.tld" prefix="netui"%>
04 <%@ taglib uri="netui-tags-template.tld" prefix="netui-template"%>
05
06 <netui-data:declarePageInput name="fooBean" type="pageInput.PageInputController.FooBean"/>
07 <netui-data:declarePageInput name="barBean" type="pageInput.PageInputController.BarBean"/>
08 <netui-data:declarePageInput name="simpleForm" type="pageInput.PageInputController.SimpleForm"/>
09
10 <netui:html>
11 <head>
12 <title>
13 Declare Page Input Sample: simple.jsp
14 </title>
15 <link href="../../../resources/css/style.css" type="text/css" rel="stylesheet"/>
16 </head>
17 <body>
18
19 <jsp:include page="/resources/jsp/header.jsp"/> <br/>
20
21 <blockquote>
22
23 <h3>Declare Page Input Sample: simple.jsp</h3>
24
25 <p>This JSP page contains the following <netui-data:declarePageInput> tags.</p>
26
27 <p>
28 <code>
29 <netui-data:declarePageInput name="fooBean" type="pageInput.PageInputController$FooBean"/><br/>
30 <netui-data:declarePageInput name="barBean" type="pageInput.PageInputController$BarBean"/><br/>
31 <netui-data:declarePageInput name="simpleForm" type="pageInput.PageInputController$SimpleForm"/>
32 </code>
33 </p>
34
35 <p>This causes the IDE to become of aware of three new data types, and display those data types
36 in the Data Palette's Page Inputs section.</p>
37
38 <img src="PageInputs_simple.gif" />
39
40 <p>At design time, you can drag and drop these data types onto the JSP page to create <netui:label>
41 tags.
42 </p>
43
44 <p>The following <netui:label> tags were created by dragging and dropping from
45 the Data Palette's Page Inputs section.</p>
46
47 <p>
48 <p><b>fooBean.foo:</b> <netui:label style="color:red" value="{pageInput.fooBean.foo}"></netui:label><br/>
49 <b>barBean.bar:</b> <netui:label style="color:red" value="{pageInput.barBean.bar}"></netui:label><br/>
50 <b>simpleForm.stringProperty:</b> <netui:label style="color:red" value="{pageInput.simpleForm.stringProperty}"></netui:label>
51 </p>
52
53 <hr width="90%">
54
55 <h3>Continue Declare Page Input Sample...</h3>
56
57 <p>
58 Navigate to the second part of this sample.
59 In the second part, we have declared page inputs from
60 a database control.</p>
61 <p><netui:anchor action="next">To next.jsp</netui:anchor><br/>
62
63 </blockquote>
64
65 </body>
66 </netui:html>
|