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

Community Tip - You can subscribe to a forum, label or individual post and receive email notifications when someone posts a new topic or reply. Learn more! X

How to validate Create Page Attributes

adev-2
4-Participant

How to validate Create Page Attributes

Hi,

I am working on one UIValidation where I need to validate the two attributes (customer part number, new customer part number ) of New Document wizard page,

currently I am trying this is on acion=createDocumentSetTypeAndAttributesWizStep  but not working can any one please tell me how should I use this

1 REPLY 1

Hi Ankit,

If the action has a afterVK element you will have to register the validator against that. In case of createDocumentSetTypeAndAttributesWizStep you will have to use the setAttributesWizStep and get your custom validator registered.

<action name="createDocumentSetTypeAndAttributesWizStep" id="createDocumentSetTypeAndAttributesWizStep" afterVK="setAttributesWizStep" preloadWizardPage="false" required="true" afterJS="validateDuplicateName">

        <command windowType="wizard_step" url="servlet/TypeBasedIncludeServlet?contextAction=createDocumentSetTypeAndAttributesWizStep"/>

      </action>

But I guess setAttributesWizStep already has a OOTB validator in place, so you may want to extend that and create rename the afterVK (say setAttributesWizStep1) and register in properties

e.g.

wt.services/svc/default/com.ptc.core.ui.validation.UIComponentValidator/setAttributesWizStep1/null/0=ext.CustomValidator/duplicate

I tried this and it actually called validateFormSubmission from customValidator class.

Regards,

Bhushan

Announcements


Top Tags