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

📄 maintainorder.jsp

📁 Java EE 5 许多新功能都包含经过修补的 EJB 架构
💻 JSP
字号:
<!--
Copyright 2006 Borys Burnayev

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->

<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean"%>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html"%>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic"%>

<%@ page import="com.rdacorp.petstore.web.action.PetStoreSession"%>
<%@ page import="com.rdacorp.petstore.web.action.MaintainOrderForm"%>

<html:html locale="true">
<head>
	<title>
		Maintain Account
	</title>
	<html:base />
	<link rel="stylesheet" type="text/css" href="../css/petstore.css" />
	<SCRIPT type="text/javascript">
	function setShippingAddress() {
		if(document.getElementById("shipToBilling").checked) {
			document.getElementsByName("shippingFirstName")[0].value=document.getElementsByName("billingFirstName")[0].value;
			document.getElementsByName("shippingLastName")[0].value=document.getElementsByName("billingLastName")[0].value;
			document.getElementsByName("shippingAddressLine1")[0].value=document.getElementsByName("billingAddressLine1")[0].value;
			document.getElementsByName("shippingAddressLine2")[0].value=document.getElementsByName("billingAddressLine2")[0].value;
			document.getElementsByName("shippingCity")[0].value=document.getElementsByName("billingCity")[0].value;
			document.getElementsByName("shippingState")[0].value=document.getElementsByName("billingState")[0].value;
			document.getElementsByName("shippingZip")[0].value=document.getElementsByName("billingZip")[0].value;
			document.getElementsByName("shippingPhone")[0].value=document.getElementsByName("billingPhone")[0].value;
		}
	}
	</SCRIPT>
</head>
<body class="bodystyle" bgcolor="white" topmargin="0" leftmargin="0" bottommargin="0" rightmargin="0">
	<html:form action="/confirmOrder">
		<table class="normal">
			<tr>
				<td valign="top" colspan="7">
					<div class="categoryName" style="margin-bottom: 10">
						Credit Card Information
					</div>
				</td>
			</tr>
			<tr>
			<tr>
				<td align="right">
					*CC Type
				</td>
				<td>
					<html:select property="creditCardType" tabindex="1">
						<html:options collection="ccTypes" property="creditCardCompanyId" labelProperty="name" />
					</html:select>
				</td>
				<td colspan="5"></td>
			</tr>
			<tr>
				<td align="right">
					*CC Number
				</td>
				<td>
					<html:text property="creditCardNumber" tabindex="2" />
				</td>
				<td>
					<html:messages id="ccNumberError" property="creditCardNumber">
						<span class="error">
							<bean:write name="ccNumberError" />
							&nbsp;
						</span>
					</html:messages>
				</td>
				<td colspan="4"></td>
			</tr>
			<tr>
				<td align="right">
					*Exp Month/Year
				</td>
				<td>
					<html:select property="expirationMonth" tabindex="3">
						<%for (int i = 1; i < 13; i++) {
            PetStoreSession petStoreSession = new PetStoreSession(request.getSession());
            MaintainOrderForm order = petStoreSession.getOrder();
            String selected = order.getExpirationMonth() == i ? "selected='selected'" : "";%>
						<option value="<%=i%>" <%=selected%>>
							<%=i < 10? "0" + String.valueOf(i): String.valueOf(i)%>
						</option>
						<%}%>
					</html:select>
					<html:select property="expirationYear" tabindex="4">
						<%for (int i = 2006; i < 2011; i++) {
            PetStoreSession petStoreSession = new PetStoreSession(request.getSession());
            MaintainOrderForm order = petStoreSession.getOrder();
            String selected = order.getExpirationYear() == i ? "selected='selected'" : "";%>
						<option value="<%=i%>" <%=selected%>>
							<%=i%>
						</option>
						<%}%>
					</html:select>
				</td>
				<td>
					<html:messages id="expirationDateError" property="expirationMonth">
						<span class="error">
							<bean:write name="expirationDateError" />
							&nbsp;
						</span>
					</html:messages>
				</td>
				<td width="5%"></td>
				<td colspan="3">
					<input type="checkbox" id="shipToBilling" onclick="setShippingAddress()" tabindex="13" />
					Ship to billing address
				</td>
			</tr>
			<tr>
				<td colspan="3">
					<div class="categoryName" style="margin-top: 20; margin-bottom: 10">
						Billing Address
					</div>
				</td>
				<td></td>
				<td colspan="3">
					<div class="categoryName" style="margin-top: 20; margin-bottom: 10">
						Shipping Address
					</div>
			</tr>
			<tr>
				<td align="right">
					*First Name
				</td>
				<td>
					<html:text property="billingFirstName" tabindex="5" />
				</td>
				<td>
					<html:messages id="billingFirstNameError" property="billingFirstName">
						<span class="error">
							<bean:write name="billingFirstNameError" />
							&nbsp;
						</span>
					</html:messages>
				</td>
				<td></td>
				<td align="right">
					*First Name
				</td>
				<td>
					<html:text property="shippingFirstName" tabindex="14" />
				</td>
				<td>
					<html:messages id="shippingFirstNameError" property="shippingFirstName">
						<span class="error">
							<bean:write name="shippingFirstNameError" />
							&nbsp;
						</span>
					</html:messages>
				</td>
			</tr>
			<tr>
				<td align="right">
					*Last Name
				</td>
				<td>
					<html:text property="billingLastName" tabindex="6" />
				</td>
				<td>
					<html:messages id="billingLastNameError" property="billingLastName">
						<span class="error">
							<bean:write name="billingLastNameError" />
							&nbsp;
						</span>
					</html:messages>
				</td>
				<td></td>
				<td align="right">
					*Last Name
				</td>
				<td>
					<html:text property="shippingLastName" tabindex="15" />
				</td>
				<td>
					<html:messages id="shippingLastNameError" property="shippingLastName">
						<span class="error">
							<bean:write name="shippingLastNameError" />
							&nbsp;
						</span>
					</html:messages>
				</td>
			</tr>
			<tr>
				<td align="right">
					*Street Address
				</td>
				<td>
					<html:text property="billingAddressLine1" tabindex="7" />
				</td>
				<td>
					<html:messages id="billingAddressLine1Error" property="billingAddressLine1">
						<span class="error">
							<bean:write name="billingAddressLine1Error" />
							&nbsp;
						</span>
					</html:messages>
				</td>
				<td></td>
				<td align="right">
					*Street Address
				</td>
				<td>
					<html:text property="shippingAddressLine1" tabindex="16" />
				</td>
				<td>
					<html:messages id="shippingAddressLine1Error" property="shippingAddressLine1">
						<span class="error">
							<bean:write name="shippingAddressLine1Error" />
							&nbsp;
						</span>
					</html:messages>
				</td>
			</tr>
			<tr>
				<td align="right">
				</td>
				<td>
					<html:text property="billingAddressLine2" tabindex="8" />
				</td>
				<td colspan="2"></td>
				<td align="right">
				</td>
				<td>
					<html:text property="shippingAddressLine2" tabindex="17" />
				</td>
				<td></td>
			</tr>
			<tr>
				<td align="right">
					*City
				</td>
				<td>
					<html:text property="billingCity" tabindex="9" />
				</td>
				<td>
					<html:messages id="billingCityError" property="billingCity">
						<span class="error">
							<bean:write name="billingCityError" />
							&nbsp;
						</span>
					</html:messages>
				</td>
				<td></td>
				<td align="right">
					*City
				</td>
				<td>
					<html:text property="shippingCity" tabindex="18" />
				</td>
				<td>
					<html:messages id="shippingCityError" property="shippingCity">
						<span class="error">
							<bean:write name="shippingCityError" />
							&nbsp;
						</span>
					</html:messages>
				</td>
			</tr>
			<tr>
				<td align="right">
					*State
				</td>
				<td>
					<html:select property="billingState" tabindex="10">
						<html:options collection="states" property="stateId" labelProperty="description" />
					</html:select>
				</td>
				<td colspan="2"></td>
				<td align="right">
					*State
				</td>
				<td>
					<html:select property="shippingState" tabindex="19">
						<html:options collection="states" property="stateId" labelProperty="description" />
					</html:select>
				</td>
				<td></td>
			</tr>
			<tr>
				<td align="right">
					*Zip
				</td>
				<td>
					<html:text property="billingZip" tabindex="11" />
				</td>
				<td>
					<html:messages id="billingZipError" property="billingZip">
						<span class="error">
							<bean:write name="billingZipError" />
							&nbsp;
						</span>
					</html:messages>
				</td>
				<td></td>
				<td align="right">
					*Zip
				</td>
				<td>
					<html:text property="shippingZip" tabindex="20" />
				</td>
				<td>
					<html:messages id="shippingZipError" property="shippingZip">
						<span class="error">
							<bean:write name="shippingZipError" />
							&nbsp;
						</span>
					</html:messages>
				</td>
			</tr>
			<tr>
				<td align="right">
					*Phone Number
				</td>
				<td>
					<html:text property="billingPhone" tabindex="12" />
				</td>
				<td>
					<html:messages id="billingPhoneError" property="billingPhone">
						<span class="error">
							<bean:write name="billingPhoneError" />
							&nbsp;
						</span>
					</html:messages>
				</td>
				<td></td>
				<td align="right">
					*Phone Number
				</td>
				<td>
					<html:text property="shippingPhone" tabindex="21" />
				</td>
				<td>
					<html:messages id="shippingPhoneError" property="shippingPhone">
						<span class="error">
							<bean:write name="shippingPhoneError" />
							&nbsp;
						</span>
					</html:messages>
				</td>
			</tr>
		</table>
		<div class="paragraph" style="margin-top: 20">
			<html:image border="0" src="images/continue.gif" alt="Continue" tabindex="22" />
		</div>
	</html:form>
</body>
</html:html>

⌨️ 快捷键说明

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