高级自定义 > 业务逻辑自定义 > 保留服务 > 向菜单中添加“撤消保留”操作
向菜单中添加“撤消保留”操作
为站点和组织管理员提供了“撤消保留”操作,用于立即释放保留对象以供其他用户修改。
对于使用保留服务的预设 Windchill 对象,此操作提供在对象菜单中。
例如,更改请求信息页面包括此操作:
undoReservation 操作可添加到实现 wt.reservation.Reservable 接口的任何对象的操作模型中。例如,更改请求操作模型文件包括以下 undoReservation 条目:
<model name="more change request row actions" menufor="wt.change2.WTChangeRequest2">
:
:
<action name="undoReservation" type="reservation"/>
:
:
</model>
示例代码:保留服务
以下示例将显示添加到更改请求编辑操作窗口的行。代码需要保留正在编辑的对象,并在编辑完成时执行更新计数验证:
<%@ taglib prefix="jca" uri="http://www.ptc.com/windchill/taglib/components"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@taglib prefix="cwiz" uri="http://www.ptc.com/windchill/taglib/changeWizards"%>
<%@ taglib prefix="rwiz" uri="http://www.ptc.com/windchill/taglib/reservation"%>
<%@ taglib uri="http://www.ptc.com/windchill/taglib/attachments" prefix="attachments"%>
<%@include file="/netmarkets/jsp/components/beginWizard.jspf"%>
<%@include file="/netmarkets/jsp/components/includeWizBean.jspf"%>
<jca:initializeItem operation="${createBean.edit}"/>
<%@include file="/netmarkets/jsp/change/changeWizardConfig.jspf" %>
<%@include file="/netmarkets/jsp/annotation/wizardConfig.jspf" %>
<%@include file="/netmarkets/jsp/attachments/initAttachments.jspf"%>
<cwiz:initializeChangeWizard changeMode="EDIT"
varianceEffectivity="false" annotationUIContext="change"
changeItemClass="wt.change2.ChangeRequestIfc" />
<jca:wizard helpSelectorKey="change_editChangeRequest"
buttonList="DefaultWizardButtonsWithSubmitPrompt"
formProcessorController=
"com.ptc.windchill.enterprise.change2.forms.controllers.ChangeItemFormProcessorController">
<jca:wizardStep action="editAttributesWizStep" type="object" />
<jca:wizardStep action="affectedEndItemsStep" type="change" />
<jca:wizardStep action="affectedDataStep" type="change" />
<jca:wizardStep action="attachments_step" type="attachments" />
<jca:wizardStep action="associatedChangeIssuesStep" type="changeRequest" />
<jca:wizardStep action="associatedChangeItemsStep" type="change" />
</jca:wizard>
<rwiz:handleUpdateCount/>
<rwiz:configureReservation reservationType="modify"
nforcedByService="true" workflowOverride="true"/>

<attachments:fileSelectionAndUploadApplet/>
<script language='Javascript'>
change_postLoad();
</script>
<%@ include file="/netmarkets/jsp/util/end.jspf"%>
这对您有帮助吗?