Examples of Validation


Examples of br.com.procempa.modus.services.Validation

          usuario.setDeficiencia(deficienciaCombo.getSelectedIndex());

          if (!String.valueOf(senhaField.getPassword()).equals(
              String.valueOf(senhaRetypeField.getPassword()))) {
            Validation validation = new Validation(
                "Senha n�o confere. Por favor, redigite.");
            throw new ValidationException(validation);
          }

          Logger.info("Iniciando a persistencia");
View Full Code Here

Examples of com.alu.e3.prov.restapi.model.Validation

  private static final Validation fromDataModel(com.alu.e3.data.model.sub.Validation val) {
    if (val == null)
      return null;

    Validation rVal = new Validation();

    if (val.getXml() != null) {
      rVal.setXml(new Validation.Xml());
    }
    if (val.getSchema() != null) {
      rVal.setSchema(fromDataModel(val.getSchema()));
    }

    if (val.getSoap() != null) {
      rVal.setSoap(new Validation.Soap(com.alu.e3.prov.restapi.model.SoapVersionEnum.fromValue(val.getSoap().getVersion().value())));
    }

    return rVal;
  }
View Full Code Here

Examples of com.centraview.common.Validation

    // initialize new actionerror object
    ActionErrors errors = new ActionErrors();

    try
    {
      Validation validation = new Validation();

      if (this.getTitle() == null || this.getTitle().trim().length() <= 0) {
        errors.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage("error.general.requiredField", "Title"));
      }
     
View Full Code Here

Examples of com.centraview.common.Validation

    }

    try
    {
      // initialize validation
      Validation validation = new Validation();

      // invoice
      if (this.getOrderid() == null || this.getOrderid().trim().length() <= 0) {
        errors.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage("error.general.requiredField", "Order"));
      }
View Full Code Here

Examples of com.centraview.common.Validation

    // cache the form data
    convertItemLines();

    try {
      Validation validation = new Validation();
      validation.checkForMaxlength("label.account.expense.description", this
          .getExpenseDescription(), "error.application.maxlength", errors, 40);
      validation.checkForRequired("label.account.expense.entity", this.getEntity(),
          "error.application.required", errors);
      validation.checkForRequired("label.account.expense.employee", this.getEmployee(),
          "error.application.required", errors);
      // validation.checkForRequired("label.account.expense.project",this.getProject(),"error.application.required","",errors);

      boolean itemPresent = false;
      int counter = 0;
View Full Code Here

Examples of com.centraview.common.Validation

    ActionErrors errors = new ActionErrors();

    try
    {
      // initialize validation
      Validation validation = new Validation()

      if (this.getFirstName() == null || this.getFirstName().trim().length() <= 0) {
        errors.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage("error.general.requiredField", "Name"));
      }
     
View Full Code Here

Examples of com.centraview.common.Validation

    ActionErrors errors = new ActionErrors();
    HttpSession session = null;
    try
    {
      // initialize validation
      Validation validation = new Validation();

      validation.checkForRequired("label.hr.newtimesheet.reportingto", ((String)get("reportingTo")), "error.application.required", errors);
      validation.checkForRequired("label.hr.newtimesheet.employee", ((String)get("employee")), "error.application.required", errors);
      validation.checkForRequired("label.hr.newtimesheet.fromdate", ((String)get("fromday")), "error.application.required", errors);
      validation.checkForRequired("label.hr.newtimesheet.todate", ((String)get("toyear")), "error.application.required", errors);

      if (
        ((String)get("fromday") != null && ((String)get("fromday")).length() != 0) ||
         ((String)get("fromyear") != null && ((String)get("fromyear")).length() != 0) ||
         ((String)get("frommonth") != null && ((String)get("frommonth")).length() != 0)
         )
      {
        validation.checkForDate("label.hr.newtimesheet.fromdate", ((String)get("fromyear")), ((String)get("frommonth")), ((String)get("fromday")), "error.application.date", errors);
      }
      if (
         (((String)get("today")) != null && ((String)get("today")).length() !=0) ||
         (((String)get("toyear")) != null && ((String)get("toyear")).length() !=0) ||
         (((String)get("tomonth")) != null && ((String)get("tomonth")).length() !=0)
        )
        {
        validation.checkForDate("label.hr.newtimesheet.todate", ((String)get("toyear")), ((String)get("tomonth")), ((String)get("today")), "error.application.date", errors);
      }

      if(((String)get("fromday")) != null && ((String)get("fromday")).length() != 0 && ((String)get("today")) != null && ((String)get("today")).length() !=0)
        validation.checkForDateComparison ("label.hr.newtimesheet.fromdate", ((String)get("fromyear")), ((String)get("frommonth")),((String)get("fromday")), "label.hr.newtimesheet.todate", ((String)get("toyear")), ((String)get("tomonth")), ((String)get("today")), "error.application.datecomparison", errors);

      session = request.getSession(true);

    }
    catch(Exception e)
View Full Code Here

Examples of com.centraview.common.Validation

    // cache the form data
    convertItemLines();

    try {
      // initialize validation
      Validation validation = new Validation();

      validation.checkForRequired("label.hrs.hr.ReportingTo", reportto,
          "error.application.required", errors);

      validation.checkForRequired("label.hrs.hr.Employee", getEmployee(),
          "error.application.required", errors);

      validation.checkForRequired("label.hrs.hr.From", getFromday(), "error.application.required",
          errors);
      validation.checkForRequired("label.hrs.hr.To", getToday(), "error.application.required",
          errors);

      if ((getFromday() != null && getFromday().length() != 0)
          || (getFromyear() != null && (getFromyear()).length() != 0)
          || (getFrommonth() != null && (getFrommonth()).length() != 0)) {
        validation.checkForDate("label.hrs.hr.From", getFromyear(), getFrommonth(), getFromday(),
            "error.application.date", errors);
      }
      if ((getToday() != null && getToday().length() != 0)
          || (getToyear() != null && getToyear().length() != 0)
          || (getTomonth() != null && getTomonth().length() != 0)) {
        validation.checkForDate("label.hrs.hr.To", getToyear(), getTomonth(), getToday(),
            "error.application.date", errors);
      }

      if ((getFromday()) != null
          && (getFromday().length() != 0 && (getToday()) != null && (getToday()).length() != 0))
        validation.checkForDateComparison("label.hrs.hr.From", (getFromyear()), (getFrommonth()),
            (getFromday()), "label.hrs.hr.To", (getToyear()), (getTomonth()), (getToday()),
            "error.application.datecomparison", errors);
      boolean itemPresent = false;
      int counter = 0;
View Full Code Here

Examples of com.centraview.common.Validation

     * @return ActionErrors
     */
    public ActionErrors validate(ActionMapping mapping, HttpServletRequest request)
    {
        ActionErrors errors = new ActionErrors();
        Validation validation = new Validation();
        validation.checkForRequired("label.reports.name", getName(), "error.application.required", errors);
        return errors;
    }
View Full Code Here

Examples of com.centraview.common.Validation

    ActionErrors errors = new ActionErrors();

    try
    {
      // initialize validation
      Validation validation = new Validation();

      this.convertPaymentLines();

      if (this.getEntityId() == null || this.getEntityId().trim().length() <= 0) {
        errors.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage("error.general.requiredField", "Entity"));
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.