Index.jsp Sample

This topic inludes the source code for the Index.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/checkBoxGroup/

Sample Source Code


01 <!--Generated by WebLogic Workshop-->
02 <%@ page language="java" contentType="text/html;charset=UTF-8"%>
03 <%@ taglib uri="netui-tags-databinding.tld" prefix="netui-data"%>
04 <%@ taglib uri="netui-tags-html.tld" prefix="netui"%>
05 <%@ taglib uri="netui-tags-template.tld" prefix="netui-template"%>
06 <netui:html>
07     <head>
08         <title>
09             Check Box Group Sample: index.jsp
10         </title>
11     </head>
12     <body>
13         <jsp:include page="/resources/jsp/header.jsp"/>
14         <p><b>CheckBoxGroup Tag Sample</b></p>
15         <p>
16         <netui:form action="submit">
17             <table>
18                 <tr>
19                     <td><netui:label value="State:"></netui:label></td>
20                     <td>
21                     <!--
22                       The "{actionForm.states}" expression references the list 
23                       of currently selected states.  If there are no currently
24                       selected states, the default value, {actionForm.defaultState}, is used.
25                       The "{pageFlow.availableStates}" expression references the 
26                       list of choices to render in the checkboxes.  In this example, 
27                       the display text and POST value are the same.
28                       -->
29                     <netui:checkBoxGroup dataSource="{actionForm.states}" 
30                                          optionsDataSource="{pageFlow.availableOptions}"
31                                          defaultValue="{actionForm.defaultState}"/>
32                     </td>
33                 </tr>
34             </table>
35             <netui:button value="Submit" type="submit"/>
36         </netui:form>
37         </p>
38         <hr>
39         <netui:anchor href="/WebApp/tagSamples/tagSamplesController.jpf">Return to Tag Samples</netui:anchor>
40     </body>
41 </netui:html>