class MergeValidator implements ChangeListener<String> {

    @Override
    public void changed(ObservableValue<? extends String> observable, String oldValue, String newValue)
    {
        String errorMessage = null;
        if (StringUtils.isNotEmpty(newValue))
        {
            DataGroupInfo groupInfo = myGroupController.getDataGroupInfo(newValue);
            if (groupInfo != null)
            {
                errorMessage = "Layer name already exists.";
            }
        }
        else
        {
            errorMessage = "Please type in a new layer name.";
        }

        if (errorMessage == null)
        {
            myValidatorSupport.setValidationResult(ValidationStatus.VALID, null);
        }
        else
        {
            myValidatorSupport.setValidationResult(ValidationStatus.ERROR, errorMessage);
        }
    }

    public  MergeValidator(DataGroupController groupController, MergeModel model);

}