AddressBookForm.jsp

當客戶想在通訊錄中新增新地址,或者編輯或刪除現有的地址資訊, 可在 AddressBookForm.jsp 中選取想執行的作業。

AddressBookForm.jsp 會使用內容檔來判斷攸關文化的內容。 此範例的所有內容檔全位於同一目錄中,但檔名會因該檔案所套用的顯示格式而異。

內容檔

以下是供 AddressBookForm.jsp 檔使用的內容檔:

範例的所有內容檔皆位於下列目錄中:

drive:\WebSphere\CommerceServer\samples\Properties
drive:\Program Files\WebSphere\CommerceServer\samples\Properties
/usr/WebSphere/CommerceServer/samples/Properties
/opt/WebSphere/CommerceServer/samples/Properties
/QIBM/ProdData/WebCommerce/samples/Properties

類別

AddressBookForm.jsp 會匯入下列類別:

<%@ page import="javax.servlet.*" %>
<%@ page import="java.util.*" %>
<%@ page import="com.ibm.commerce.command.*" %>
<%@ page import="com.ibm.commerce.server.*" %>
<%@ page import="com.ibm.commerce.beans.*" %>
<%@ page import="com.ibm.commerce.common.beans.*" %>
<%@ page import="com.ibm.commerce.user.beans.*" %>
<%@ page import="com.ibm.commerce.user.objects.*" %>
<%@ page import="com.ibm.commerce.datatype.*" %>
<%@ page import="com.ibm.commerce.usermanagement.commands.ECUserConstants" %>

指令

AddressBookForm.jsp 採用的指令如下:

Bean

AddressBookForm.jsp 採用的 Bean 如下:

施行細節

提出套表
所執行的指令將視所選的動作而定。若客戶選取的是「新增地址」, 則會執行 AddressForm 指令, 並登錄到 AddressForm.jsp 頁面中。傳給指令的是空白的地址 ID, 表示是要新增而非更新地址;如果客戶選取的是「更新地址」選項, 則會再次執行 AddressForm 指令, 但此時所送的是將要更新的地址 ID。若是選取「刪除地址」, 則會呼叫 AddressDelete 指令, 而傳給它的是所要刪除的地址 ID。

產生的 HTML 輸出

以下檔案是針對此 JSP 頁面產生的 HTML 輸出範例:

在運作的系統中,這些頁面不會儲存成 HTML 檔, 不過可應要求以「檢視」指令產生。

針對本範例產生的 HTML 輸出檔位於下列目錄中:

drive:\WebSphere\CommerceServer\samples\web\Registration
drive:\Program Files\WebSphere\CommerceServer\samples\web\Registration
/usr/WebSphere/CommerceServer/samples/web/Registration
/opt/WebSphere/CommerceServer/samples/web/Registration
/QIBM/ProdData/WebCommerce/samples/web/Registration

相關概念

IBM copyright