home.jsp
来自「一个使用struts+hibernate+spring开发的完的网站源代码。」· JSP 代码 · 共 53 行
JSP
53 行
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
<html>
<head>
<title>Invoice</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
</head>
<body>
<f:view>
<h:form id="invoiceForm">
<h:messages/><p>
Invoice Number: <h:inputText value="#{invoice.invoiceNumber}"/><br>
Purchaser: <h:inputText value="#{invoice.purchaser}"/><br>
<p>
<h:dataTable
rows="0"
value="#{invoice.lineItems}"
var="item"
>
<h:column>
<f:facet name="header">
<h:outputText value="Product"/>
</f:facet>
<h:inputText value="#{item.product}"/>
</h:column>
<h:column>
<f:facet name="header">
<h:outputText value="Quantity"/>
</f:facet>
<h:inputText value="#{item.quantity}"/>
</h:column>
</h:dataTable>
<h:commandButton id="addButton"
value="Add Line Item"
action="#{invoice.addLineItem}"
>
</h:commandButton>
<h:commandButton id="removeButton"
value="Remove Line Item"
action="#{invoice.removeLineItem}"
>
</h:commandButton>
</h:form>
</f:view>
</body>
</html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?