List of usage examples for com.jgoodies.validation ValidationResult getMessages
public List<ValidationMessage> getMessages()
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// w w w . j av a2s . c om 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; } }