List of usage examples for com.jgoodies.validation ValidationResult hasMessages
public boolean hasMessages()
From source file:org.openthinclient.console.wizards.newdirobject.ConfigurationPanel.java
License:Open Source License
public boolean isValid() { final ValidationResult validate = validator.validate(); if (!validate.hasErrors()) { if (validate.hasMessages()) { final PropertyValidationMessage m = (PropertyValidationMessage) validate.getMessages().get(0); wd.putProperty("WizardPanel_errorMessage", m.formattedText()); //$NON-NLS-1$ } else/* ww w . j a v a2 s.c o m*/ wd.putProperty("WizardPanel_errorMessage", null); //$NON-NLS-1$ return true; } else { final PropertyValidationMessage m = (PropertyValidationMessage) validate.getErrors().iterator().next(); wd.putProperty("WizardPanel_errorMessage", m.formattedText()); //$NON-NLS-1$ return false; } }