Package net.sourceforge.stripes.validation

Examples of net.sourceforge.stripes.validation.SimpleError


          try {
            oInv = new Invoice(oDms, aDocs[d]);
            oInv.reject(getSession(), getSessionAttribute("user_uuid"), sCmmt);
              addDataLine("id",oInv.id());
          } catch (ElementNotFoundException enfe) {
            addError(new SimpleError("Invoice not found "+aDocs[d]));
          }
        }
        disconnect();
      } catch (Exception xcpt) {
        Log.out.error(xcpt.getMessage(), xcpt);
        addError(new SimpleError(xcpt.getMessage()));
      } finally {
        close();
      }     
    }
      return AjaxResponseResolution();
View Full Code Here


              oInv.approve(getSession(), getSessionAttribute("user_uuid"));
              addDataLine("docid", aDocs[d]);
              commit();
            } catch (Exception xcpt) {
              rollback();
              addError("document", new SimpleError (xcpt.getClass().getName()+" "+xcpt.getMessage()));
              Log.out.error("ApproveInvoices.approve("+aDocs[d]+")  "+xcpt.getClass().getName()+" "+xcpt.getMessage());
            }
          }
          disconnect();
        } catch (StorageException stox) {
          addError("document", new SimpleError ("DMS exception"));
          Log.out.error("ApproveInvoices.approve() StorageException "+stox.getMessage());
        } finally {
          close();         
        }
      }
View Full Code Here

        addDataLine("id",oUsr.id());
        addDataLine("id",oUsr.getString("default_capture_type"));
        addDataLine("id",oUsr.getString("default_scanner"));
    } catch (Exception xcpt) {
      Log.out.error(xcpt.getMessage(), xcpt);
      addError(new SimpleError(xcpt.getMessage()));
    } finally {
      close();
    }
    if (oUsr!=null) {
      Log.out.debug("default_capture_type="+oUsr.getString("default_capture_type"));
View Full Code Here

        } // next       
      } // next
      disconnect();
    } catch (Exception xcpt) {
      Log.out.error("SendInvitations.validatePreviousPermissions() "+xcpt.getMessage(), xcpt);
      addError(new SimpleError(xcpt.getMessage()));
    } finally {
      close();
    }
  }
View Full Code Here

            new AsyncSendInvitation(sEmail, getParam("email["+String.valueOf(e)+"]"), getParam("firstName["+String.valueOf(e)+"]"), getParam("lastName["+String.valueOf(e)+"]"), oSender.getFirstName(), oSender.getLastName(), aTaxPayers, getSessionAttribute("customer_account_docid"), bCreateEmployee, getParam("approve","").length()>0, getParam("settle","").length()>0, getParam("premium","").length()>0,new StringBuffer(new String(oTxt.toByteArray())),new StringBuffer(new String(oHtm.toByteArray()))).start();
          } //fi
        } // next
      } catch (Exception xcpt) {
        Log.out.error("SendInvitations.send() "+xcpt.getMessage(), xcpt);
        addError(new SimpleError(xcpt.getMessage()));
      } finally {
        close();
      }
    } else {
      Log.out.debug("SendInvitations.send() "+String.valueOf(getErrorsCount())+" validation errors found");     
View Full Code Here

      oSes.close();
      oSes = null;
      return oUsr;
    } catch (Exception exc) {
      Log.out.error(exc.getClass().getName()+" User.convert("+sDocId+") "+exc.getMessage());
      conversionErrors.add(new SimpleError(exc.getMessage()));
      return null;
    }
  }
View Full Code Here

      oSes.disconnect();
      oSes.close();
      oSes = null;
      if (null==oClnt) {
        Log.out.error("No client with id "+sClientId+" was found");
        conversionErrors.add(new SimpleError("No client with id "+sClientId+" was found"));
      }
      return oClnt;
    } catch (Exception exc) {
      Log.out.error(exc.getClass().getName()+" Client.convert("+sClientId+") "+exc.getMessage());
      conversionErrors.add(new SimpleError(exc.getMessage()));
      return null;
    }
  }
View Full Code Here

              if (capturedCount==1) {
                capuredpage1 = page.id();
              }
              attachment.delete();
            } else {
              ValidationError error = new SimpleError(attachment.getFileName()+ " is not a valid file." );
              getContext().getValidationErrors().add("items" , error);
            }
          }
          } // next
        disconnect();
View Full Code Here

      setSessionAttribute("businessname", getTaxPayer().getBusinessName());
      oRes = new RedirectResolution(CaptureInvoice.class);
    } catch (Exception e) {
      close();
      Log.out.error("ActivateTaxPayer.save() "+e.getClass().getName()+" "+e.getMessage(), e);
      getContext().getMessages().add(new SimpleError(e.getClass().getName()+" "+e.getMessage()));
      oRes = new RedirectResolution(ActivateTaxPayer.class);
    }
    Log.out.debug("End ActivateTaxPayer.save()");
    return oRes;
  }
View Full Code Here

        if (nAdminCount==0)
          addError(new LocalizableError("com.zesped.action.SaveUser.atLeastOneAdminIsRequired"));
        disconnect();
      } catch (Exception xcpt) {
        Log.out.error(xcpt.getMessage(), xcpt);
        addError(new SimpleError(xcpt.getClass().getName()+" "+xcpt.getMessage()));
      } finally {
        close();
      }
    }   
  } 
View Full Code Here

TOP

Related Classes of net.sourceforge.stripes.validation.SimpleError

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.