Package org.apache.struts.action

Examples of org.apache.struts.action.ActionErrors


    // After performing the logic in the DeleteHanlder, we are generat a new request for the list
    // So we will not be carrying the old error. So that we will try to collect the error from the Session variable
    // Then destory it after getting the Session value
    if (session.getAttribute("listErrorMessage") != null)
    {
      ActionErrors allErrors = (ActionErrors) session.getAttribute("listErrorMessage");
      saveErrors(request, allErrors);
      session.removeAttribute("listErrorMessage");
    }//end of if (session.getAttribute("listErrorMessage") != null)
    try
    {
View Full Code Here


       rowID=recordID;
      }
      catch(CvFileException e)
      {
        System.out.println("[Exception][SaveNewFileHandler.execute] Exception Thrown: "+e);
        ActionErrors allErrors = new ActionErrors();
        allErrors.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage("error.freeForm", "File With This Name Already Exists in this path"));
        saveErrors(request, allErrors);
        request.setAttribute("closeWindow","false");
      }

      if (!(request.getParameter("closeornew").equals("close")) && (request.getAttribute("ExistFileError") == null))
View Full Code Here

    HttpSession session = request.getSession(true);
    UserObject userObject = (UserObject)session.getAttribute("userobject");
    int individualId = userObject.getIndividualID();

    //  Check the session for an existing error message (possibly from the delete handler)
    ActionErrors allErrors = (ActionErrors)session.getAttribute("listErrorMessage");
    if (allErrors != null) {
      saveErrors(request, allErrors);
      session.removeAttribute("listErrorMessage");
    }
    ListPreference listPreference = userObject.getListPreference("EmailLookup");
View Full Code Here

        }
      }
      catch(CvFileException e)
      {
        System.out.println("[Exception][SaveEditFileHandler.execute] Exception Thrown: "+e);
        ActionErrors allErrors = new ActionErrors();
        allErrors.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage("error.freeForm", "This File Already Exists"));
        saveErrors(request, allErrors);
        FORWARD_final= FORWARD_editsavefile;
        request.setAttribute("bodycontent", "editdetailfile");
      }
      }
View Full Code Here

    HttpSession session = request.getSession();
    UserObject userObject = (UserObject)session.getAttribute("userobject");

    int individualID = userObject.getIndividualID();    // logged in user
   
    ActionErrors allErrors = new ActionErrors();
    String forward = "closeWindow";
    String errorForward = "errorOccurred";
   
    // "newMailFolderForm", defined in struts-config-email.xml
    DynaActionForm emailForm = (DynaActionForm)form;

    try
    {
      MailHome home = (MailHome)CVUtility.getHomeObject("com.centraview.mail.MailHome", "Mail");
      Mail remote = (Mail)home.create();
      remote.setDataSource(dataSource);
     
      // TODO: validate input;

      MailFolderVO newFolder = new MailFolderVO();

      Integer parentID = (Integer)emailForm.get("parentID");
      Integer accountID = (Integer)emailForm.get("accountID");
      String folderName = (String)emailForm.get("folderName");
     
     
      newFolder.setParentID(parentID.intValue());
      newFolder.setEmailAccountID(accountID.intValue());
      newFolder.setFolderName(folderName);
      newFolder.setFolderType(MailFolderVO.USER_FOLDER_TYPE);

      int newFolderID = remote.addEmailFolder(newFolder, true);

      if (newFolderID < 1)
      {
        forward = errorForward;
        allErrors.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage("error.freeForm", "The email folder could not be created. Please make sure all fields are filled in and try again. Also make sure you have privileges to create folders on your email server."));
        this.saveErrors(request, allErrors);
      }else{
        emailForm.set("closeWindow", new Boolean(true));
      }
     
View Full Code Here

    HttpSession session = request.getSession();
    UserObject userObject = (UserObject)session.getAttribute("userobject");

    int individualID = userObject.getIndividualID();    // logged in user

    ActionErrors allErrors = new ActionErrors();
    String forward = "displayComposeForm";
    String errorForward = "errorOccurred";

    // "composeMailForm", defined in struts-config-email.xml
    DynaActionForm emailForm = (DynaActionForm)form;

    try {
      // get the message ID from the form bean
      Integer messageID = (Integer)emailForm.get("messageID");

      // now, check the message ID on the form...
      if (messageID == null || messageID.intValue() <= 0 ) {
        // if Message ID is not set on the form, then there is
        // no point in continuing forward. Show user the door. :-)
        allErrors.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage("error.general.requiredField", "Message ID"));
        return(mapping.findForward(errorForward));
      }

      // This tells the Send.do handler to delete the
      // draft after it has been sent
View Full Code Here

    UserObject userObject = (UserObject) session.getAttribute("userobject");
    int individualId = userObject.getIndividualID();

    // Check the session for an existing error message (possibly from the delete
    // handler)
    ActionErrors allErrors = (ActionErrors) session.getAttribute("listErrorMessage");
    if (allErrors != null) {
      saveErrors(request, allErrors);
      session.removeAttribute("listErrorMessage");
    }
View Full Code Here

    } catch(RemoteException re) {
      logger.error("[execute] Exception thrown.", re);
    }

    if (! deleteLog.isEmpty()) {
      ActionErrors allErrors = new ActionErrors();
      allErrors.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage("error.freeForm", "You do not have permission to delete one or more of the records you selected."));
      session.setAttribute("listErrorMessage", allErrors);
    }

    // When deleteing a message we are either on the detail page
    // or on the list page.  On the list we forward back to the list
View Full Code Here

    HttpSession session = request.getSession();
    UserObject userObject = (UserObject) session.getAttribute("userobject");

    int individualID = userObject.getIndividualID(); // logged in user

    ActionErrors allErrors = new ActionErrors();
    String forward = "displayComposeForm";
    String errorForward = "errorOccurred";

    // "composeMailForm", defined in struts-config-email.xml
    DynaActionForm emailForm = (DynaActionForm) form;
    MailHome home = (MailHome) CVUtility.getHomeObject("com.centraview.mail.MailHome", "Mail");

    try {
      // get the message ID from the form bean
      Integer messageID = (Integer) emailForm.get("messageID");

      // now, check the message ID on the form...
      if (messageID == null || messageID.intValue() <= 0) {
        // if Message ID is not set on the form, then there is
        // no point in continuing forward. Show user the door. :-)
        allErrors.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage("error.general.requiredField", "Message ID"));
        return (mapping.findForward(errorForward));
      }

      Mail remote = home.create();
      remote.setDataSource(dataSource);
View Full Code Here

    // After performing the logic in the DeleteHanlder, we are generat a new request for the list
    // So we will not be carrying the old error. So that we will try to collect the error from the Session variable
    // Then destory it after getting the Session value
    if (session.getAttribute("listErrorMessage") != null)
    {
      ActionErrors allErrors = (ActionErrors) session.getAttribute("listErrorMessage");
      saveErrors(request, allErrors);
      session.removeAttribute("listErrorMessage");
    }//end of if (session.getAttribute("listErrorMessage") != null)
   
    try
View Full Code Here

TOP

Related Classes of org.apache.struts.action.ActionErrors

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.