How to display form validation constraints message on GWT Material inputs using Editor and Validation Framework from Presenter's class?
<p>I use:</p>

<ul>
<li><a href="http://dev.arcbees.com/gwtp/" rel="nofollow">Gwt-platform</a></li>
<li><a href="http://www.gwtproject.org/doc/latest/DevGuideValidation.html" rel="nofollow">Gwt Validation</a></li>
<li><a href="http://www.gwtproject.org/doc/latest/DevGuideUiEditors.html" rel="nofollow">Gwt UiEditor framework</a></li>
<li><a href="https://gwtmaterialdesign.github.io/gwt-material-demo/#!errors" rel="nofollow">Gwt Material inputs</a></li>
</ul>

<p>After constraints validation I would like to display error messages. This is supported by gwt material inputs, like <code>MaterialTextBox</code> using method: <code> materialTextBox.setError("Please provide your name");</code></p>

<p>The problem is that it can be only executed from view class:</p>

<pre><code>public class LoginView extends ViewWithUiHandlers&lt;LoginUiHandlers&gt; implements LoginPresenter.MyView {
    interface Binder extends UiBinder&lt;Widget, LoginView&gt; {}

    /** The driver to link the proxy bean with the view. */
    public interface EditorDriver extends SimpleBeanEditorDriver&lt;LoginModel, LoginView&gt; { }

    @UiField MaterialTextBox email;
    @UiField MaterialTextBox password;
    @UiField MaterialButton loginButton;
    @UiField MaterialCheckBox keepMeLoggedInCheckbox;

    @Inject
    LoginView(Binder uiBinder) {
        initWidget(uiBinder.createAndBindUi(this));
        addClickHandlerToLoginButton();
    }



    //@UiHandler("loginButton")
    private void onLoginButtonClick(ClickEvent e){
        getUiHandlers().onLoginButtonClick();
    }
    private void addClickHandlerToLoginButton() {
        loginButton.addClickHandler(new ClickHandler() {
            @Override public void onClick(ClickEvent event) {
                onLoginButtonClick(event);
            }
        });     
    }
    @Override
    public SimpleBeanEditorDriver&lt;LoginModel, ?&gt; createEditorDriver() {
        EditorDriver driver = GWT.create(EditorDriver.class);
        driver.initialize(this);
        return driver;
    }
    public void test() {}
}
</code></pre>

<p>But I do all my editor/validation action in <code>Presenter</code>, and I do not have there any View connection I could use:</p>

<pre><code>public class LoginPresenter extends Presenter&lt;LoginPresenter.MyView, LoginPresenter.MyProxy&gt; implements LoginUiHandlers {
    public interface MyView extends BeanEditView&lt;LoginModel&gt;, HasUiHandlers&lt;LoginUiHandlers&gt; {}
    public static final Type&lt;RevealContentHandler&lt;?&gt;&gt; SLOT_Login = new Type&lt;RevealContentHandler&lt;?&gt;&gt;();

    @ProxyStandard
    @NameToken(NameTokens.login)
    public interface MyProxy extends ProxyPlace&lt;LoginPresenter&gt; {}

    // Editor
    private SimpleBeanEditorDriver&lt;LoginModel, ?&gt; editorDriver;
    private static final LoginService service = GWT.create(LoginService.class);
    private LoginModel model = new LoginModel("","");


    @Override
    public void onLoginButtonClick() {
        if (editorDriver.isDirty()) {
            model = editorDriver.flush();
            validateModel();

            if (editorDriver.hasErrors()) {
                MaterialToast.fireToast("Errors occur");
                StringBuilder errorBuilder = new StringBuilder();
                for (EditorError error : editorDriver.getErrors()) {
                    errorBuilder.append(error.getMessage() + "\n");
                }
                MaterialToast.fireToast(errorBuilder.toString());
            } else {
                service.login(
                        model, new MethodCallback&lt;Integer&gt;() {
                            @Override
                            public void onSuccess(Method method, Integer response) {
                                MaterialToast.fireToast("Succefully set info. status code: " + response);
                            }
                            @Override
                            public void onFailure(Method method, Throwable exception) {
                                MaterialToast.fireToast("Error setting");
                            }
                    });
            }
        } else {
            MaterialToast.fireToast("Data has not changed");
        }
    }

    private void validateModel() {
        Validator validator = Validation.buildDefaultValidatorFactory().getValidator();
        Set&lt;ConstraintViolation&lt;LoginModel&gt;&gt; violations = validator.validate(model);
        if (violations.size() &gt; 0) {
            editorDriver.setConstraintViolations(new ArrayList&lt;ConstraintViolation&lt;?&gt;&gt;(violations));
        }

    }

    @Inject
    LoginPresenter(EventBus eventBus,MyView view, MyProxy proxy) {
        super(eventBus, view, proxy, RevealType.Root);
        getView().setUiHandlers(this);
        editorDriver = getView().createEditorDriver();
        editorDriver.edit(model);

    }
}
</code></pre>

<p>I think that I should add an interface where I will declare methods to access inputs in view. And do implementation of that. But I don't know how. Please help me.</p>