Template.jsp Sample

This topic inludes the source code for the Template.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_template/template/

Sample Source Code


01 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
02 <%@ page language="java" contentType="text/html;charset=UTF-8"%>
03 <%@ taglib uri="netui-tags-template.tld" prefix="netui-template"%>
04 <%@ taglib uri="netui-tags-databinding.tld" prefix="netui-data"%>
05 <%@ taglib uri="netui-tags-html.tld" prefix="netui"%>
06 
07 <netui:html>
08     <head>
09         <netui:base />
10         <title>
11             <netui-template:attribute name="title"/>
12         </title>
13         <link href="<%=request.getContextPath()%>/resources/css/style.css" type="text/css" rel="stylesheet"/>
14     </head>
15     <body>
16         <netui-template:includeSection name="topImage"/>
17         <h3><netui-template:attribute name="title"/></h3>
18         <table border="1">
19             <tr>
20                 <td colspan="3" bgcolor="<netui-template:attribute name="headerColor" defaultValue="#ffffff"/>">
21                     <netui-template:includeSection name="tableHeader"/>
22                 </td>
23             </tr>
24             <tr>
25                 <td width="30%"><h3>Left Column</h3></td>
26                 <td width="30%"><h3>Center Column</h3></td>
27                 <td width="30%"><h3>Right Column</h3></td>
28             </tr>
29             <tr>
30                 <td><netui-template:includeSection name="leftCol"/></td>
31                 <td><netui-template:includeSection name="centerCol"/></td>
32                 <td><netui-template:includeSection name="rightCol" defaultPage="defaultPage.jsp"/></td>
33             </tr>
34             <tr>
35                 <td colspan="3" bgcolor="<netui-template:attribute name="footerColor" defaultValue="#ffffff"/>">
36                     <netui-template:includeSection name="tableFooter"/>
37                 </td>
38             </tr>
39         </table>
40         <hr>
41         <netui:anchor href="/WebApp/tagSamples/tagSamplesController.jpf">Return to Tag Samples</netui:anchor>
42     </body>
43 </netui:html>