personaledit.jsp

来自「一个购房管理系统,JSF+Hibernate+Mssql2」· JSP 代码 · 共 62 行

JSP
62
字号
<%@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 Customer</title>
		<script type="text/javascript">
        	function setSomeValue(){
        		var f = document.forms['_id1'];  				
  				f.elements['_id1:customerName'].value=1;
  				f.elements['_id1:password'].value=1;
  				f.elements['_id1:idcard'].value=1;  				
        	}
        </script>
	</head>
	<body>
		<center>
			<f:view>
				<f:loadBundle basename="resources" var="label" />
				<h:messages errorStyle="color: red" infoStyle="color: green"
					layout="table" />
				<h:graphicImage url="../images/16.jpg" width="830" height="60"></h:graphicImage>
				<h:form>
					<h:dataTable value='#{customer.personalModel}' var='item'
						border="0" cellpadding="0" cellspacing="0">
					</h:dataTable>
					<h:inputHidden value="#{customer.customer}" immediate="true" />
					<h:panelGrid columns="2">
						<h:outputText value="#{label.CustomerName}" />
						<h:inputText id="customerName"
							value="#{customer.customer.customerName}" title="CustomerName" />
						<h:outputText value="#{label.Password}" />
						<h:inputText id="password" value="#{customer.customer.password}"
							title="Password">
							<f:converter converterId="javax.faces.Byte" />
						</h:inputText>
						<h:outputText value="#{label.Address}" />
						<h:inputText id="address" value="#{customer.customer.address}"
							title="Address" />
						<h:outputText value="#{label.Tel1}" />
						<h:inputText id="tel1" value="#{customer.customer.tel1}"
							title="Tel1" />
						<h:outputText value="#{label.Tel2}" />
						<h:inputText id="tel2" value="#{customer.customer.tel2}"
							title="Tel2" />
						<h:outputText value="#{label.Email}" />
						<h:inputText id="email" value="#{customer.customer.email}"
							title="Email" />
						<h:outputText value="#{label.IDCard}" />
						<h:inputText id="idcard" value="#{customer.customer.idcard}"
							title="IDCard" />
						<h:commandButton action="#{customer.personalEdit}" value="#{label.Save}" />
						<h:commandButton action="v_HouseInfo" value="#{label.Back}" onclick="setSomeValue();" />
					</h:panelGrid>					
				</h:form>
			</f:view>
		</center>
	</body>
</html>

⌨️ 快捷键说明

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