toolstrip.providesDeleteOp(false);
toolstrip.setPreValidation(new FormToolStrip.PreValidation() {
@Override
public boolean isValid() {
ValidationResult validation = presenter.validateInterfaceConstraints(
form.getUpdatedEntity(),
form.getChangedValues()
);
errorMessages.setHTML("");
if(!validation.isValid())
{
SafeHtmlBuilder html = new SafeHtmlBuilder();
int i=0;
for(String detail : validation.getMessages())
{
if(i==0) html.appendHtmlConstant("<b>");
html.appendEscaped(detail).appendHtmlConstant("<br/>");
if(i==0) html.appendHtmlConstant("</b>");
i++;
}
//Feedback.alert("Invalid Interface Constraints", html.toSafeHtml());
errorMessages.setHTML(html.toSafeHtml());
}
return validation.isValid();
}
});
form.bind(table);