基本的なカスタマイズ > ユーザーインタフェースのカスタマイズ > ウィザードの作成 > 単一オブジェクトを編集するウィザードの構築 > サンプルコード > 「部品を編集」ウィザードのメイン JSP
  
「部品を編集」ウィザードのメイン JSP
ファイル名: <Windchill>/codebase/netmarkets/jsp/part/edit.jsp
注記:
インストールされている製品モジュールに応じて、単一ステップのウィザードである場合と複数ステップのウィザードである場合があります。
「分類属性の設定」ステップおよび「添付資料」ステップを含める方法を示します。
ページのロード時に、このページによって js 関数 onloadEditPart が呼び出されます。部品が分類され、ウィザードの開始ポイントに応じてほかの UI 設定が行われる場合、この関数によって loadClassificationStep が呼び出され、分類ステップがロードされます。
<%@ taglib prefix="jca"
uri="http://www.ptc.com/windchill/taglib/components"%>
<%@ taglib prefix="wip"
uri="http://www.ptc.com/windchill/taglib/workinprogress"%>
<%@ taglib uri="http://www.ptc.com/windchill/taglib/fmt"
prefix="fmt"%>
<%@ taglib uri="http://www.ptc.com/windchill/taglib/attachments"
prefix="attachments" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ include file="/netmarkets/jsp/components/beginWizard.jspf"%>
<%@ include
file="/netmarkets/jsp/components/includeWizBean.jspf"%>
<%@ include
file="/netmarkets/jsp/components/createEditUIText.jspf"%>
<%-->
PartHelper.js contains the “onloadEditPartWizard” method
<--%>
<script language="JavaScript"
src="netmarkets/javascript/part/PartHelper.js"></script>
<% if(InstalledProperties.isInstalled(InstalledProperties.SCMI)) {
%>
<attachments:fileSelectionAndUploadApplet
forceApplet='${param.addAttachments != null }'/>
<% } %>

<%-->
The onload javascript method dynamically loads the classification step if the
part is classified. It also disables the check in button when the wizard is
launched from a workspace.
<--%>
<script language="Javascript">
Event.observe(window, 'load', onloadEditPartWizard);
</script>

<fmt:setBundle
basename="com.ptc.windchill.enterprise.part.partResource"/>

<%--> Reuse the same labels as for create part <--%>
<fmt:message var="editAttributesWizStepLabel"
key="part.createPartWizard.SET_ATTRIBUTES_WIZ_STEP_LABEL" />
<fmt:message var="attachmentsWizStepLabel"
key="part.createPartWizard.ATTACHMENTS_WIZ_STEP_LABEL" />

<jca:initializeItem operation="${createBean.edit}"/>

<% if (request.getParameter("newInWorkspace") == null) { %>
<%--> The part is not new in workspace. Do autoCheckout <--%>
<wip:autoCheckOutItem/>
<% } %>
<% if ((request.getParameter("newInWorkspace") != null) ||
(request.getParameter("checkedOutInWorkspace") != null)) { %>
<script
language="Javascript">newOrCheckedOutInWorkspace=true</script>
<% } %>

<%--Only if SCMI or PartsLink is installed do we use a multi-step wizard<--%>
<% if (InstalledProperties.isInstalled(InstalledProperties.SCMI) ||

InstalledProperties.isInstalled(InstalledProperties.PARTSLINK)) { %>
<c:set var="buttonSet" value="EditWizardButtons"/>
<% } else { %>
<c:set var="buttonSet" value="NoStepsEditWizardButtons"/>
<% } %>

<jca:wizard buttonList="${buttonSet}"
helpSelectorKey="PartEdit_help">

<%-->
The Set Attributes step uses the common action definition. The JSP file for the
step is, however, part
specific and hooked up using PartManagement-typedservices-properties.xconf
<--%>
<jca:wizardStep action="editAttributesWizStep"
label="${editAttributesWizStepLabel}" type="object"/>

<jca:wizardStep action="setClassificationAttributesWizStep" type="part"/>
<%-->
The attachments step will get enabled or disabled based on the
AttachmentsStepAction
Validator hooked up to it
<--%>
<jca:wizardStep action="attachments_step"
label="${attachmentsWizStepLabel}" type="attachments" />

</jca:wizard>

<%@include file="/netmarkets/jsp/util/end.jspf"%>