5

I'm using Spring Webflow for an application and I need to validate a model object outside of the "normal" webflow validation cycle. I'm using a separate validation class:

@Component
public class MyInfoValidator {
    public void validateMyInfo(MyInfoView myInfo, ValidationContext context) {
        MessageContext messages = context.getMessageContext();
[snip]
    }
}

I'd like to call this same validation class from another part of my code and validate the object, but I need to create (or retrieve) a ValidationContext object.

Can anyone tell me how to do this? Is it floating around somewhere in one of the Webflow beans or do I have to create one from scratch?

user1071914
  • 3,295
  • 11
  • 50
  • 76
  • 2
    August 2017, I need to do the same and it so disappointing to seeing that none has answered xD – hzitoun Aug 04 '17 at 15:27

0 Answers0