Skip to main content
1-Visitor
October 6, 2016
Question

How to do to run a validator for CAD objects for the SaveAs command and Rename

  • October 6, 2016
  • 2 replies
  • 1983 views

Hi


I need to
validate the parameter "number" in Windchill for CAD objects and parts when are performed SaveAs and Rename command.

Created validator class in which redefined the functions - validateSelectedAction(), validateSelectedMultiSelectAction() and validateFormSubmission()


What is the "action" I need to use to register the validator class?

What do I need to specify the "selector" to the calling function validateSelectedAction(), validateSelectedMultiSelectAction() and validateFormSubmission()


I tried to do as shown below, but are not called validators.


<Service context="default" name="com.ptc.core.ui.validation.UIComponentValidator" targetFile="codebase/service.properties">

        <Option requestor="null" serviceClass="ext.ntck.validators.NTCKValidator" selector="WFSAVEAS" />

        <Option requestor="null" serviceClass="ext.ntck.validators.NTCKValidator" selector="MULTIRENAME" />

</Service>

Thanks.

2 replies

1-Visitor
April 10, 2019

Hi,

 

Did you find any work around for this. If yes please share, i am also stuck in same kind of problem.

16-Pearl
June 6, 2022

This seems to be controlled by an unsupported API com.ptc.windchill.uwgm.cadx.saveas.SaveAsActionDelegate

 

INFO : wt.log4j.jmx.LoggerRepositoryMonitor.levelChanged - Logger=com.ptc.windchill.uwgm.cadx.saveas.SaveAsActionDelegate, OldLevel=ERROR, NewLevel=ALL
TRACE : com.ptc.windchill.uwgm.cadx.saveas.SaveAsActionDelegate wcadmin - SaveAsActionDelegate.valid :: context object is - wt.part.WTPart:780158
TRACE : com.ptc.windchill.uwgm.cadx.saveas.SaveAsActionDelegate wcadmin - SaveAsActionDelegate.valid :: object is valid - returning TRUE
TRACE : com.ptc.windchill.uwgm.cadx.saveas.SaveAsActionDelegate wcadmin - SaveAsActionDelegate.enableable :: Returning TRUE
TRACE : com.ptc.windchill.uwgm.cadx.saveas.SaveAsActionDelegate wcadmin - SaveAsActionDelegate.valid :: context object is - wt.epm.EPMDocument:678138
TRACE : com.ptc.windchill.uwgm.cadx.saveas.SaveAsActionDelegate wcadmin - SaveAsActionDelegate.valid :: copyAllowed is true
TRACE : com.ptc.windchill.uwgm.cadx.saveas.SaveAsActionDelegate wcadmin - SaveAsActionDelegate.enableable :: Returning TRUE
INFO : wt.log4j.jmx.LoggerRepositoryMonitor.levelChanged - Logger=com.ptc.windchill.uwgm.cadx.saveas.SaveAsActionDelegate, OldLevel=ALL, NewLevel=ERROR