Skip to main content
13-Aquamarine
November 15, 2013
Question

UICopmonentValidators for Soft Types

  • November 15, 2013
  • 3 replies
  • 887 views
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

1-Visitor
November 15, 2013
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.




13-Aquamarine
November 18, 2013
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]
1-Visitor
November 18, 2013
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