Skip to main content
1-Visitor
April 21, 2014
Question

Wizard step validator

  • April 21, 2014
  • 3 replies
  • 3713 views

Hi.

I defined afterVK validator for my wizard step (extends DefaultUIComponentValidator).

I have 2 questions i cann't find answers for in customization guide.

1) Validator works in both ways (Back and Next). I need it to work only when moving forward. How to disable it for "Back" button?

2) If i have an error while validation process, i show it at pop-up window by specifying UIValidationFeedbackMsg for UIValidationResult. How should i define UIValidationResult to disable pop-up if a i have no error. I have no error - i don't want show anything for user. But now pop-up window with NULL message arises.

Thanks.

3 replies

1-Visitor
April 23, 2014

2) You can show something in success case like that:

FeedbackMessage localFeedbackMessage =

new FeedbackMessage(FeedbackType.FAILURE, ChangeManagementClientHelper.getLocale()," paramString1", null, new String[] { "paramString2" });

And don't show anything in failure case.

12-Amethyst
June 20, 2014

Can you please tell me how to add validation on each field ? Suppose after an user selected a document

type five attribute fields appeared in object creation page so I need to add validation on each attribute field.

Thanks

1-Visitor
November 14, 2014

The first question is still actual. Is it possible to define what button was pressed?

1-Visitor
November 14, 2014

I am not sure, but try this:

Every wizard step is the jsp page. On every page you can get and set attributes and parameters of the request object. You can create some parameter and keep there previous step value.