cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Help us improve the PTC Community by taking this short Community Survey! X

UICopmonentValidators for Soft Types

pwilliams-3
11-Garnet

UICopmonentValidators for Soft Types

10.1 M040

Does anyone know how to register a UIComponentValidator for a soft type? For example I have soft typed the Change Task to an Engineering Change Task. I want to register a validator but I only want it to be called when an Engineering Change Task is being created and NOT when a Change Task is being created. I found in the Customization Guide on page 803 that this can be done but I haven't seen an example with a soft type.

<service context="default" name="com.ptc.core.ui.validation.UIComponentValidator">
<option serviceclass="com.steelcase.enterprise.change2.validators.ECACreateWizardValidator"&lt;br"/> selector="ECACreateWizardValidatorVK"
requestor="wt.change2.WTChangeActivity2"
targetFile="codebase/service.properties"/>
</service>

The requestor attribute is supposed to be able to do this but I'm wondering if it's not working because my soft type class is not defined in actions.xml. Do I have to "duplicate" the blocks for the changeTask for my EngineeringChangeTask in actions.xml? Any thoughts?

Patrick Williams | Engineering Systems | c: 616.947.2110
[cid:image003.jpg@01CEE209.8D6FA3D0]

3 REPLIES 3

Same syntax as OIR, like with "WCTYPE|" leading, but it's been awhile.
Suggest trying both ways.



I personally find it easier to against WTObject one of these, then setup a
properties file to eval type and then load another class for biz logic
execution.




Yes David I tried that syntax. The reason I can't put my soft type in as the requestor is because my soft type doesn't have a definition block in the actions.xml file...and it shouldn't.

Patrick Williams | Engineering Systems | c: 616.947.2110
[cid:image002.jpg@01CEE431.F12DBCC0]

Put the validator on the modeled class associated actions.xml have it run always, but react only if soft type is correct.


Sent from my Verizon Wireless 4G LTE Smartphone
Top Tags