Search in sources :

Example 1 with NewPoolNameLengthValidation

use of org.ovirt.engine.ui.uicommonweb.validation.NewPoolNameLengthValidation in project ovirt-engine by oVirt.

the class NewPoolModelBehavior method validate.

@Override
public boolean validate() {
    boolean parentValidation = super.validate();
    if (getModel().getName().getIsValid()) {
        getModel().getName().validateEntity(new IValidation[] { new NewPoolNameLengthValidation(getModel().getName().getEntity(), getModel().getNumOfDesktops().getEntity(), getModel().getOSType().getSelectedItem()) });
        final boolean isNameValid = getModel().getName().getIsValid();
        getModel().setValidTab(TabName.GENERAL_TAB, getModel().isValidTab(TabName.GENERAL_TAB) && isNameValid);
        return getModel().getName().getIsValid() && parentValidation;
    }
    return parentValidation;
}
Also used : NewPoolNameLengthValidation(org.ovirt.engine.ui.uicommonweb.validation.NewPoolNameLengthValidation)

Aggregations

NewPoolNameLengthValidation (org.ovirt.engine.ui.uicommonweb.validation.NewPoolNameLengthValidation)1