list.jsp
来自「一个购房管理系统,JSF+Hibernate+Mssql2」· JSP 代码 · 共 172 行
JSP
172 行
<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<%@taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>List House</title>
</head>
<body>
<f:view>
<f:loadBundle basename="resources" var="label" />
<h:form>
<table width="850" border="0" cellpadding="0" cellspacing="0">
<tr>
<td>
<img id="_id1" src="../images/32.jpg" height="60" width="100%" />
</td>
</tr>
<tr>
<td width="100%" align="center">
<table width="650" border="0" cellspacing="0">
<tr>
<td style="background-color: #cc0001;" height="26">
<div
style="color:#FFFFFF;font-size:14px; font-family:'
宋体'; font-weight:bold;"
align="left">
<h:outputText value="#{label.ListingHouses}" />
</div>
</td>
</tr>
<tr>
<td>
<h:dataTable value='#{house.model}' var='item' border="1"
cellpadding="0" cellspacing="0" width="650">
<h:column>
<f:facet name="header">
<h:outputText value="#{label.HouseID}" />
</f:facet>
<h:commandLink action="#{house.detailSetup}"
value="#{item.houseId}" />
</h:column>
<h:column>
<f:facet name="header">
<h:outputText value="#{label.HouseName}" />
</f:facet>
<h:outputText value="#{item.houseName}" />
</h:column>
<h:column>
<f:facet name="header">
<h:outputText value="#{label.HouseState}" />
</f:facet>
<h:outputText value="#{item.houseState}" />
</h:column>
<h:column>
<f:facet name="header">
<h:outputText value="#{label.Bz}" />
</f:facet>
<h:outputText value="#{item.bz}" />
</h:column>
<h:column>
<f:facet name="header">
<h:outputText value="#{label.StyleID}" />
</f:facet>
<h:outputText value="#{item.houseStyle.styleId}" />
</h:column>
<h:column>
<f:facet name="header">
<h:outputText value="#{label.Action}" />
</f:facet>
<h:commandLink value="#{label.Destroy}"
action="#{house.destroy}">
<f:param name="houseID" value="#{item.houseId}" />
</h:commandLink>
<h:outputText value=" " />
<h:commandLink value="#{label.Edit}"
action="#{house.editSetup}">
<f:param name="houseID" value="#{item.houseId}" />
</h:commandLink>
</h:column>
</h:dataTable>
</td>
</tr>
<tr>
<td>
<h:outputText
value="#{label.The}#{house.itemCount==0?0:house.firstItem + 1}--#{house.lastItem}#{label.Item}/#{label.AmountTo}#{house.itemCount}#{label.Item}" />
<h:commandLink action="#{house.prev}"
value="#{label.Previous}#{house.batchSize}#{label.Item}"
rendered="#{house.firstItem >= house.batchSize}" />
<h:commandLink action="#{house.next}"
value="#{label.Next}#{house.batchSize}#{label.Item}"
rendered="#{house.lastItem + house.batchSize <= house.itemCount}" />
<h:commandLink action="#{house.next}"
value="#{label.Remaining}#{house.itemCount - house.lastItem}#{label.Item}"
rendered="#{house.lastItem < house.itemCount && house.lastItem + house.batchSize > house.itemCount}" />
</td>
</tr>
<tr>
<td height="25">
</td>
</tr>
<tr>
<td>
<table width="650" border="0" cellspacing="0">
<tr>
<td align="center">
按照
</td>
<td align="right">
<h:selectOneMenu value="#{house.queryProperty}">
<f:selectItem itemValue="houseId" itemLabel="房屋编号" />
<f:selectItem itemValue="houseName" itemLabel="房屋名字" />
<f:selectItem itemValue="houseStyle.styleId"
itemLabel="类型编号" />
<f:selectItem itemValue="all"
itemLabel="#{label.QueryByAll}" />
</h:selectOneMenu>
</td>
<td align="left">
<h:inputText id="queryValue" value="#{house.queryValue}"
title="queryValue" />
<h:commandButton action="#{house.findHouses}"
value="#{label.Query}" />
</td>
<td align="center">
<div align="center">
<h:commandButton action="#{house.createSetup}"
value="#{label.NewHouse}" />
</div>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="100%" align="center">
<table width="650" border="0" cellspacing="0">
<tr>
<td align="left">
<h:messages errorStyle="color: red" infoStyle="color: green" layout="table" />
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="100%" align="center">
<table width="650" border="0" cellspacing="0">
<tr>
<td align="left">
<h:messages errorStyle="color: red" infoStyle="color: green" layout="table" />
</td>
</tr>
</table>
</td>
</tr>
</table>
</h:form>
</f:view>
</body>
</html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?