Grid.jsp Sample
This topic inludes the source code for the Grid.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/grid/
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-template:template templatePage="/resources/jsp/grid_template.jsp">
06 <netui-template:setAttribute value="ItemsRowSetControl - Grid View" name="title"/>
07 <netui-template:section name="bodySection">
08 <blockquote>
09 <span class="pagehead">
10 <netui:label value="ItemsRowSetControl - Grid View"/>
11 </span>
12 <br/>
13 <br/>
14 <netui-data:grid dataSource="{pageFlow.allRows}" name="{pageFlow.gridName}">
15 <netui-data:gridStyle styleClassPrefix="gridStyle"/>
16 <netui-data:pager pageSize="5" renderInHeader="true" action="pageAction" renderInFooter="true"/>
17 <netui-data:columns filterAction="begin" sortAction="begin">
18 <netui-data:anchorColumn action="detailsItems" addRowId="true" title="Details"/>
19 <netui-data:anchorColumn action="updateItems" addRowId="true" title="Edit"/>
20 <netui-data:basicColumn filterable="true" title="Itemnumber" sortable="true" name="itemnumber"/>
21 <netui-data:basicColumn filterable="true" title="Itemname" sortable="true" name="itemname"/>
22 <netui-data:basicColumn filterable="true" title="Quantityavailable" sortable="true" name="quantityavailable"/>
23 <netui-data:expressionColumn title="" value="Our Price: {container.item.price}"/>
24 </netui-data:columns>
25 </netui-data:grid>
26 <netui:imageAnchor action="insertItems" align="center" border="0" src='<%=request.getContextPath() + "/resources/images/insert.gif"%>'>
27 Insert
28 </netui:imageAnchor>
29 </blockquote>
30 <hr>
31 <netui:anchor href="/WebApp/tagSamples/tagSamplesController.jpf">Return to Tag Samples</netui:anchor>
32 </netui-template:section>
33 <netui-template:section name="navBackSection"></netui-template:section>
34 </netui-template:template>
|