資料修改畫面程式
Edit.jsp
<%@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" %>
<%
String formName = "通訊錄修改";
%>
<f:view>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title><%=formName%></title>
<link rel="stylesheet" type="text/css" href="/JSF-Contact/faces/jsfcrud.css" />
</head>
<body>
<h:panelGroup id="messagePanel" layout="block">
<h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
</h:panelGroup>
<h1><%=formName%></h1>
<h:form>
<h:panelGrid columns="2">
<h:outputText value="MSN:"/>
<h:outputText value="#{contact.contact.msn}" title="MSN" />
<h:outputText value="姓名:"/>
<h:inputText id="realName" value="#{contact.contact.realName}" title="姓名" />
<h:outputText value="電話:"/>
<h:inputText id="tel" value="#{contact.contact.tel}" title="電話" />
</h:panelGrid>
<br />
<h:commandLink action="#{contact.edit}" value="存檔">
<f:param name="jsfcrud.currentContact" value="#{jsfcrud_class['com.emprogria.util.JsfUtil'].jsfcrud_method['getAsConvertedString'][contact.contact][contact.converter].jsfcrud_invoke}"/>
</h:commandLink>
<br />
<br />
<h:commandLink action="#{contact.detailSetup}" value="明細" immediate="true">
<f:param name="jsfcrud.currentContact" value="#{jsfcrud_class['com.emprogria.util.JsfUtil'].jsfcrud_method['getAsConvertedString'][contact.contact][contact.converter].jsfcrud_invoke}"/>
</h:commandLink>
<br />
<h:commandLink action="#{contact.listSetup}" value="列表" immediate="true"/>
<br />
<br />
<h:commandLink value="回首頁" action="welcome" immediate="true" />
</h:form>
</body>
</html>
</f:view>