技术文章 - CS185231

如何将自定义 UI 验证器添加到 Windchill PDMLink 中的新建部件向导

已修改: 29-Mar-2022   


注意:本文已使用机器翻译软件翻译,以方便非英语客户阅读。但翻译内容可能包含语法错误或不准确之处。请注意, PTC对本文所含信息的翻译准确性及使用后果不承担任何责任。请在 此处 查看本文的英文原始版本以便参考。有关机器翻译的更多详情,请单击 此处
感谢您告诉我们。我们将尽快审阅此译文。

适用于

  • Windchill PDMLink 9.0 to 11.1

说明

  • 如何将自定义 UI Validator 添加到 New Part 向导?
  • 在 service.properties 中注册服务并将afterVK参数添加到 Part 操作模型中的操作后,仍然没有调用验证器
  • 例子:
service.properties.xconf
<Service context="default" name="com.ptc.core.ui.validation.UIComponentValidator" targetFile="codebase/service.properties">
   <Option requestor="null" selector="myTestValidator" serviceClass="com.ptcts.enterprise.change2.validators.myTestValidator"/>
</Service>

动作模型
<objecttype name="part" class="wt.part.WTPart" resourceBundle="com.ptc.windchill.enterprise.part.partResource">
<action name="createPartWizard" uicomponent="CREATE_PART" ajax="row" afterVK="myTestValidator">
<command class="com.ptc.windchill.enterprise.part.forms.CreatePartAndCADDocFormProcessor" method="execute" 
url="/netmarkets/jsp/part/createPartWizard.jsp?revisionMode=create&amp;showNewCADDocStep=true&amp;hideAssociatePart=true" 
onClick="validateCreateLocation(event)" windowType="popup"/>
 <includeFilter name="showNewActionPreValidation"/>
 </action>
 </objecttype>
这是文章 185231 的 PDF 版本,可能已过期。最新版本 CS185231