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

📄 listing.jsp

📁 jsf的小程序和教学PPTjsf的小程序和教学PPT
💻 JSP
字号:
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<f:subview id="listing">
	<h:form>
		<h:dataTable value="#{contactController.contacts}" var="contact"
			rowClasses="oddRow, evenRow"
			rendered="#{not empty contactController.contacts}"
			styleClass="contactTable" headerClass="headerTable"
			columnClasses="normal,normal,normal,centered">
			<h:column>
				<%-- Name column --%>
				<f:facet name="header">
					<h:column>
						<h:outputText value="Name" />
					</h:column>
				</f:facet>
				<h:outputText value="#{contact.lastName}, #{contact.firstName}" />
			</h:column>
			<h:column>
				<%-- Group column --%>
				<f:facet name="header">
					<h:column>
						<h:outputText value="Group" />
					</h:column>
				</f:facet>
				<h:outputText value="#{contact.group.name}" />
			</h:column>
			<h:column>
				<%-- Type column --%>
				<f:facet name="header">
					<h:column>
						<h:outputText value="Type" />
					</h:column>
				</f:facet>
				<h:outputText value="#{contact.type}" />
			</h:column>
			<h:column>
				<%-- Action column (remove / edit) --%>
				<f:facet name="header">
					<h:column>
						<h:outputText value="Action" />
					</h:column>
				</f:facet>
				<h:panelGrid columns="2">
					<h:commandLink value="remove" action="#{contactController.remove}">
						<f:setPropertyActionListener
							target="#{contactController.selectedContact}" value="#{contact}" />
					</h:commandLink>
					<h:commandLink value="edit" action="#{contactController.read}">
						<f:setPropertyActionListener
							target="#{contactController.selectedContact}" value="#{contact}" />
					</h:commandLink>
				</h:panelGrid>
			</h:column>

		</h:dataTable>
	</h:form>
</f:subview>

⌨️ 快捷键说明

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