Package org.activiti.designer.integration.servicetask.validator

Examples of org.activiti.designer.integration.servicetask.validator.ValidationException


    if (control instanceof Composite) {
      parent = (Composite) control;
    }

    if (parent == null) {
      throw new ValidationException(
              "Unable to validate control because it is not a radio's parent composite. This probably means the process node was incorrectly configured");
    }

    boolean selectionApplied = false;

    for (final Control currentControl : parent.getChildren()) {
      if (currentControl instanceof Button) {
        if (((Button) currentControl).getSelection()) {
          selectionApplied = true;
          break;
        }
      }
    }

    if (!selectionApplied) {
      throw new ValidationException("This field is required");
    }
  }
View Full Code Here


    if (control instanceof Composite) {
      parent = (Composite) control;
    }

    if (parent == null) {
      throw new ValidationException(
              "Unable to validate control because it is not a period's parent composite. This probably means the process node was incorrectly configured");
    }

    boolean atLeastOneSpecified = false;

    for (final Control currentControl : parent.getChildren()) {
      if (currentControl instanceof Spinner) {
        final int elementValue = ((Spinner) currentControl).getSelection();
        if (elementValue != 0) {
          atLeastOneSpecified = true;
          break;
        }
      }
    }

    if (!atLeastOneSpecified) {
      throw new ValidationException("This field is required");
    }
  }
View Full Code Here

TOP

Related Classes of org.activiti.designer.integration.servicetask.validator.ValidationException

Copyright © 2018 www.massapicom. 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.