DialogWrapper validation

I think I have done all the right things, and my class extending DialogWrapper is working for the most part, execpt for the validation part. I override doValidate() which returns ValidationInfo when needed and null when everything is OK. I have put init() last in my constructor of my class which extends DialogWrapper. Validation works with the standard OK button, but I override createActions() which returns two of my own actions (Which extend DialogWrapper.DialogWrapperExitAction) and the cancelAction. And those two actions do not trigger any validation.

My action class is surprisingly simple, since the exitcode is checked after the dialog is closed. Here's what it looks like:

private class AddAction extends DialogWrapperExitAction {
        public AddAction() {
            super("Add", EXIT_ADD);
            putValue(DEFAULT_ACTION, Boolean.TRUE);


Do I miss something here?

1 comment
Comment actions Permalink

Hmm, no answers yet. Perhaps my question was too vague :). Let me try this then: how do I let DialogWrapper trigger doValidate() when I return custom actions from createActions() ?


Please sign in to leave a comment.