Skip to main content
5-Regular Member
Solved

WizardStep Not Closing After Validator DENIED

Version: Windchill 12.1

 

Use Case: Open a Windchill folder and click 【Export List to CSV】.
The exportTable.jsp wizard opens with a wizardStep 
Add a custom validator before the standard export processing:

return UIValidationResult.newInstance(var1, UIValidationStatus.DENIED, UIValidationFeedbackMsg.newInstance( "Error message", FeedbackType.ERROR)); 


The validation message displays correctly in the wizardStep popup.
Click OK on the message dialog.

Expected Result: After acknowledging the validation message, the wizardStep popup should close safely without JavaScript errors.


Description:

When adding a custom validator to Windchill’s standard “Export List to CSV” action,
the validation message displays correctly in the wizardStep popup.
However, after clicking OK in the message dialog,
the wizard does not close properly. The browser console logs the following JavaScript error

windchill-all.js:1556 Uncaught TypeError: top.finishServerSideExport is not a function
 at PTC.exportTable.exportTableSuccessListener (windchill-all.js:1556:281)
 at handleSubmitResult (windchill-all.js:3759:62)
 at handleSubmitResult (windchill-all.js:2317:91)
 at ext-and-extensions.js:1845:156

 

HelesicPetr
22-Sapphire II

Hello @福耿_13361195 

In my opinion this is standard behavior, if there is an error after you click the OK. 

The error message informs a user that there is something wrong there and user has a option to correct the wizard input.

So there for the wizard is not closed. 

If you need to change this behavior, you have to add a FormResult - setNextAction or find a way how to do so in wch 13.1+ because some methods are deprecated

PetrH 

3 replies

Catalina
Community Manager

Hi @福耿_13361195 

Thank you for your question. 

Your post appears well documented but has not yet received any response. I am replying to raise awareness. Hopefully, another community member will be able to help.

Also, feel free to add any additional information you think might be relevant.

 

Best regards,

Translate
Catalina | PTC Community Manager
HelesicPetr
22-Sapphire II

Hello @福耿_13361195 

In my opinion this is standard behavior, if there is an error after you click the OK. 

The error message informs a user that there is something wrong there and user has a option to correct the wizard input.

So there for the wizard is not closed. 

If you need to change this behavior, you have to add a FormResult - setNextAction or find a way how to do so in wch 13.1+ because some methods are deprecated

PetrH 

Translate
5-Regular Member

Thank you for your explanation.

I understand that keeping the Wizard open after validation fails is the standard behavior, so that users can correct their input.

However, in my case, I would like to close the Wizard even when my custom Validator returns DENIED.

I'm using the standard CSV export functionality, so I cannot easily customize or replace its FormProcessor.

Is there any way to achieve this behavior in Windchill 13.1+ without customizing the standard FormProcessor?

You mentioned using FormResult.setNextAction(). Could you please provide an example of how this could be implemented in this scenario?

Thank you for your help.

Translate