⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 rowcategorization.jsp

📁 IBM RSA下的JSF开发示例
💻 JSP
字号:
<%-- tpl:insert page="/template/jsfTemplate.jtpl" --%><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<%@page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>
<%@taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<%@taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<%@taglib uri="http://www.ibm.com/jsf/html_extended" prefix="hx"%>
<HTML>
<HEAD>
<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<META name="GENERATOR" content="IBM Software Development Platform">
<META http-equiv="Content-Style-Type" content="text/css">
<LINK href="../theme/Master.css" rel="stylesheet" type="text/css">
<LINK href="../theme/new.css" rel="stylesheet">
<LINK rel="stylesheet" type="text/css" href="../theme/stylesheet.css" title="Style">
<%-- tpl:put name="headarea" --%>
			<title>rowCategorization.jsp</title>
		<%-- /tpl:put --%>
<LINK rel="stylesheet" type="text/css" href="/JSFandSDO/theme/stylesheet.css" title="Style">
</HEAD>

<f:view>
	<BODY>
		<TABLE class="title" cellpadding="0">
			<TBODY>
				<TR>
					<TD class="noBorder" background="../images/gradient.jpg"
						align="CENTER"><IMG border="0" src="../images/title.jpg"></TD>
				</TR>
				<TR>
					<TD class="noBorder" align="RIGHT"><A href="/JSFandSDO">Return to Main Menu</A></TD>
				</TR>
			</TBODY>
		</TABLE>
		<%-- tpl:put name="bodyarea" --%>

	<hx:scriptCollector id="scriptCollector1">
		<h:form styleClass="form" id="form1">
			<H2>Creating Expandable and Collapsable Data Groupings</H2>
	This sample contains a data table using row categorization. Row categorization groups the records of the data table based on a value  set in the row category JSF tag. Each group of records can be   expanded and collapsed.<BR>
			<BR>Click the arrows to expand and collapse the data table categories.<BR>
			<P><h:dataTable id="table1" value="#{pc_RowCategorization.categorization}" var="varcategorization" styleClass="dataTable" headerClass="headerClass" footerClass="footerClass" rowClasses="rowClass1, rowClass2" columnClasses="columnClass1" border="1" cellpadding="2" cellspacing="0">
				<h:column id="column7">
					<hx:panelRowCategory styleClass="panelRowCategory" id="rowCategory1" value="#{varcategorization.CATEGORY}">
					</hx:panelRowCategory>
					<f:facet name="header">
						<h:outputText styleClass="outputText" value="Categories" id="text15"></h:outputText>
					</f:facet>
				</h:column>
				<h:column id="column1">
					<f:facet name="header">
						<h:outputText styleClass="outputText" value="Id" id="text1"></h:outputText>
					</f:facet>
					<h:outputText id="text2" value="#{varcategorization.ID}" styleClass="outputText">
						<f:convertNumber />
					</h:outputText>
				</h:column>
				<h:column id="column3">
					<f:facet name="header">
						<h:outputText styleClass="outputText" value="Title" id="text5"></h:outputText>
					</f:facet>
					<h:outputText id="text6" value="#{varcategorization.TITLE}" styleClass="outputText">
					</h:outputText>
				</h:column>
				<h:column id="column4">
					<f:facet name="header">
						<h:outputText styleClass="outputText" value="Description" id="text7"></h:outputText>
					</f:facet>
					<h:outputText id="text8" value="#{varcategorization.DESCRIPTION}" styleClass="outputText">
					</h:outputText>
				</h:column>
				<h:column id="column5">
					<f:facet name="header">
						<h:outputText styleClass="outputText" value="Price" id="text9"></h:outputText>
					</f:facet>
					<h:outputText id="text10" value="#{varcategorization.PRICE}" styleClass="outputText">
						<f:convertNumber type="currency" />
					</h:outputText>
				</h:column>
				<h:column id="column6">
					<f:facet name="header">
						<h:outputText styleClass="outputText" value="Quantity" id="text11"></h:outputText>
					</f:facet>
					<h:outputText id="text12" value="#{varcategorization.QUANTITY}" styleClass="outputText">
						<f:convertNumber />
					</h:outputText>
				</h:column>
			</h:dataTable></P>
			<H4>How It works:</H4>
			To turn on row categorization:<BR>1. Open the Properties view of the data table.<BR>2. On Display Options,   click  &quot;Add Column to Categorize Table Row&quot;. A new column containing a small arrow is added to the data table.<BR>3. Select the arrow to display  the row categorization Properties view.<BR>4.  Bind the row categorization control to the   the column you want
the items grouped by. <BR>
					<BR>In this example we bind to the CATEGORY column.<BLOCKQUOTE>Example:<BR>&lt;h:column id=&quot;column7&quot;&gt;<BR>					&lt;hx:panelRowCategory styleClass=&quot;panelRowCategory&quot; id=&quot;rowCategory1&quot; value=&quot;#{varcategorization.CATEGORY}&quot;&gt;<BR>					&lt;/hx:panelRowCategory&gt;<BR>					&lt;f:facet name=&quot;header&quot;&gt;<BR>						&lt;h:outputText styleClass=&quot;outputText&quot; value=&quot;Categories&quot; id=&quot;text15&quot;&gt;&lt;/h:outputText&gt;<BR>					&lt;/f:facet&gt;<BR>				&lt;/h:column&gt;</BLOCKQUOTE>
		<H4>Files of Interest:</H4>
			<UL>
				<LI><B>WebContent/rowCategorization/rowCategorization.jsp</B> - (This Page) Here you will find the row categorization JSF tag attached to the data table.</LI>
				<LI><B>src/rowCategorization/rowCategorization.java</B> - The page code file.</LI>
			</UL>
		</h:form>
	</hx:scriptCollector>

		<%-- /tpl:put --%>
		<TABLE class="title" cellpadding="0">
			<TBODY>
				<TR>
					<TD class="noBorder" align="RIGHT"><A href="/JSFandSDO">Return to Main Menu</A></TD>
				</TR>
			</TBODY>
		</TABLE>
	</BODY>
</f:view>

</HTML><%-- /tpl:insert --%>
<%-- jsf:pagecode language="java" location="/src/pagecode/rowCategorization/RowCategorization.java" --%><%-- /jsf:pagecode --%>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -