Hi all,

Just a report on the progress of our migration to 7. So far, I have
migrated our bare application template without too many problems.

The only real issue so far is this change of API in PatternValidator:
protected IValidationError decorate(IValidationError error,
IValidatable<String> validatable)
    {
        return error;
    }

We used to do this to override the keys of PatternValidator:
@Override
                protected ValidationError decorate(ValidationError error,
IValidatable<String> validatable) {

error.setKeys(Collections.singletonList("common.validator.username.pattern"));
                    return error;
                }
(note the fact that Wicket 6 used the Impl and not the interface)

And we can't do it any more without adding an explicit cast.

While I understand the rationale to use interfaces for public facing API,
I'm wondering if it's a good choice here, considering that IValidationError
only has a getErrorMessage() method so it's quite hard to decorate anything
here.

I'll be in favor of reverting this change.

Thoughts?

-- 
Guillaume

Reply via email to