Examples of NetteComponentNameValidator


Examples of org.netbeans.modules.php.nette.validators.NetteComponentNameValidator

    doEnablement();
  }

  private void doEnablement() {
    Validable classNameValidator = new NetteClassNameValidator();
    Validable componentNameValidator = new NetteComponentNameValidator();

    if (isFormTabSelected()) {
      if (!classNameValidator.validate(getFormClass())) {
        errorLabel.setIcon(errorIcon);
        setWarningText(NbBundle.getMessage(CreateComponentGeneratorPanel.class, "ERR_head_form_class"));
       
        dd.setValid(false);
      } else if (!componentNameValidator.validate(getFormName())) {
        errorLabel.setIcon(errorIcon);
        setWarningText(NbBundle.getMessage(CreateComponentGeneratorPanel.class, "ERR_head_form_name"));

        dd.setValid(false);
      } else {
        errorLabel.setIcon(null);
        errorLabel.setText("");

        dd.setValid(true);
      }
    } else {
      if (!classNameValidator.validate(getComponentClass())) {
        errorLabel.setIcon(errorIcon);
        setWarningText(NbBundle.getMessage(CreateComponentGeneratorPanel.class, "ERR_head_component_class"));

        dd.setValid(false);
      } else if (!componentNameValidator.validate(getComponentName())) {
        errorLabel.setIcon(errorIcon);
        setWarningText(NbBundle.getMessage(CreateComponentGeneratorPanel.class, "ERR_head_component_name"));

        dd.setValid(false);
      } else {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.