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/EJBs_ClientApps/valueObject/

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 <netui:html>
06     <head>
07         <title>
08             List of Items
09         </title>
10     </head>
11     <body>
12         <netui-data:repeater dataSource="{pageFlow.manufacturers}">
13            <netui-data:repeaterHeader>
14               <p>The following manufacturers are currently known:</p>
15               <p><table border="1" cellpadding="4">
16                   <tr>
17                      <td><b>List Number</b></td>
18                      <td><b>Name</b></td>
19                      <td><b>US Manufacturer</b></td>
20                      <td><b>Link To Items</b></td>
21                     </tr>
22             </netui-data:repeaterHeader>
23             <netui-data:repeaterItem>
24                <netui-data:choiceMethod object="{pageFlow}" method="getBooleanValue">
25                   <netui-data:methodParameter value="{container.item.usManufacturer}"/>
26                </netui-data:choiceMethod>
27                <netui-data:choice value="Yes">
28                <tr>
29                   <td>
30                      <netui:label value="{container.item.manufacturerId}" />
31                   </td>
32                   <td>
33                      <netui:label value="{container.item.manufacturername}" />
34                   </td>
35                   <td>Yes</td>
36                   <td>
37                   <netui:anchor action="showItemsManufacturer">
38                      Show Items
39                      <netui:parameter name="manufacturerPK" value="{container.item.manufacturerId}"/>
40                   </netui:anchor>   
41                   </td>
42                </tr>
43                </netui-data:choice>
44                <netui-data:choice value="No">
45                <tr>
46                   <td>
47                      <netui:label value="{container.item.manufacturerId}" />
48                   </td>
49                   <td>
50                      <netui:label value="{container.item.manufacturername}" />
51                   </td>
52                   <td>No</td>
53                   <td>
54                   <netui:anchor action="showItemsManufacturer">
55                      Show Items
56                      <netui:parameter name="manufacturerPK" value="{container.item.manufacturerId}"/>
57                   </netui:anchor>   
58                   </td>
59                </tr>
60                </netui-data:choice>
61             </netui-data:repeaterItem>
62             <netui-data:repeaterFooter>
63                 </table>
64             </netui-data:repeaterFooter>    
65         </netui-data:repeater>
66         <p>
67         <netui:form action="toNewManufacturer">
68             <netui:button value="New Manufacturer" type="submit"/>
69         </netui:form>
70         </p>
71 
72     <p><font size="-1">This table is created on the basis of a Collection of
73     'ManufacturerValue' value objects holding manufacturer information. This collection is
74     returned by the AdminBean's getManufacturersVO method. The value objects do not
75     contain information about the items created by a manufacturer, as this information
76     is not needed in this table.</font></p>
77     </body>
78 </netui:html>