Next.jsp Sample

This topic inludes the source code for the Next.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 <!-- 
07 This netui-data:declarePageInput tag creates and initializes the variable "items" of type
08 pageInput.ItemsDBControl.Item[].  
09 Note that the Workshop IDE is aware of this variable and displays it in the Data Palette's 
10 Page Inputs section.
11 -->
12 <netui-data:declarePageInput name="items" type="pageInput.ItemsDBControl.Item[]"/>
13 
14 <netui:html>
15     <head>
16         <title>
17             Declare Page Input Sample: next.jsp
18         </title>
19     <link href="../../../resources/css/style.css" type="text/css" rel="stylesheet"/>           
20     </head>
21     
22     <body>
23     
24     <jsp:include page="/resources/jsp/header.jsp"/> <br/>
25         <blockquote>
26         <h3>Declare Page Input Sample: next.jsp</h3>
27         
28         <p>On this page, a &lt;netui-data:declarePageInput> tag declares
29         and initializes a variable of type pageInput.ItemsDBControl.Item[].  Note that this type is 
30         defined within a Database control file.
31         
32         <p>&lt;netui-data:declarePageInput name="items" type="pageInput.ItemsDBControl.Item[]"/> </p>
33          
34         <p>The Workshop IDE is aware of this variable and displays it
35         in the Data Palette's Page Inputs section.
36         
37         <p>
38         <img src="PageInputs_next.gif" />
39         </p>
40         
41         <p>At design time you can drag and drop this variable on the JSP page to display the variable.
42         
43         <p>The following &lt;netui-data:repeater> tag was created by dragging and dropping the variable
44         "items" from the Data Palette. 
45         
46         <p>&nbsp;</p>
47         <p><b>An array of product items:</b>
48         <netui-data:repeater dataSource="{pageInput.items}">
49             <netui-data:repeaterHeader>
50                 <ul> </netui-data:repeaterHeader>
51             <netui-data:repeaterItem>
52                 <li>
53                     <netui:label value="{container.item.itemname}" style="color:red;" />
54                 </li>
55             </netui-data:repeaterItem>
56             <netui-data:repeaterFooter> </ul> </netui-data:repeaterFooter>
57         </netui-data:repeater>
58 
59         <p>That concludes the Declare Page Input sample </p>
60         </blockquote>        
61 
62         <hr>
63         <p><netui:anchor action="begin">Re-run this sample</netui:anchor>
64         <p><netui:anchor href="/WebApp/tagSamples/tagSamplesController.jpf">Return to Tag Samples</netui:anchor>        
65         
66     </body>
67 </netui:html>