@Override
public List<UIMessage> validate()
{
assertInitialized();
UIValidationContextImpl validationContext = new UIValidationContextImpl(context);
for (InputComponent<?, ?> inputComponent : getInputs().values())
{
validationContext.setCurrentInputComponent(inputComponent);
inputComponent.validate(validationContext);
}
validationContext.setCurrentInputComponent(null);
if (!containsErrorMessage(validationContext.getMessages()))
{
initialCommand.validate(validationContext);
}
return validationContext.getMessages();
}