Package com.centraview.common

Examples of com.centraview.common.DisplayList


  ListGenerator lg = ListGenerator.getListGenerator(dataSource);
  RuleList DL = ( RuleList )lg.getDisplayList(idd );
 
  //added by sameer
  DisplayList displaylistSession = ( DisplayList )session.getAttribute( "displaylist") ;
  if((displaylistSession!=null)&&(displaylistSession.getListID()==idd))
      displaylistSession.setDirtyFlag(true);
     
  for( int l=0 ; l < rowId.length ; l++ )
  {
    DL.enableElement( rowId[l] , status   );
    DL.setDirtyFlag(true);   
View Full Code Here



            ListPreference listpreference= userobjectd.getListPreference("Timeslip");


      DisplayList displaylistSession = ( DisplayList )session.getAttribute( "displaylist") ;

      DisplayList displaylist = ( DisplayList )request.getAttribute( "displaylist") ;

      TimeSlipList DL= null;
      if( displaylist == null  )
      {
         ListGenerator lg = ListGenerator.getListGenerator(dataSource);

         DL = ( TimeSlipList )lg.getTimeSlipList( userobjectd.getIndividualID() , 1,listpreference.getRecordsPerPage() , "" ,listpreference.getSortElement());

      }
      else
      {

        String searchSession = displaylistSession.getSearchString();
        String searchrequest = displaylist.getSearchString();


        if(searchSession == null)
          searchSession = "";
        if(searchrequest == null)
          searchrequest = "";

        //if ( (displaylistSession.getListID() == displaylist.getListID() ) && ( displaylist.getDirtyFlag() == false ) && ( displaylist.getStartAT() >= displaylistSession.getBeginIndex() ) && ( displaylist.getEndAT()<=displaylistSession.getEndIndex() ) && (displaylist.getSortMember().equals(displaylistSession.getSortMember()) && (displaylist.getSortType()==(displaylistSession.getSortType()) ) ))
        if (( (displaylistSession.getListID() == displaylist.getListID() ) && ( displaylist.getDirtyFlag() == false ) && ( displaylist.getStartAT() >= displaylistSession.getBeginIndex() ) && ( displaylist.getEndAT()<=displaylistSession.getEndIndex() ) && (displaylist.getSortMember().equals(displaylistSession.getSortMember()) && (displaylist.getSortType()==(displaylistSession.getSortType())) && (searchSession.equals(searchrequest)) ))|| displaylist.getAdvanceSearchFlag() == true)
         {
          DL = (TimeSlipList)displaylistSession;
          request.setAttribute("displaylist" , displaylistSession );
         }
         else
View Full Code Here

       }
           rowId = messageID + "";
      }

      System.out.println("indexfrompage"+indexfrompage);
      DisplayList displaylistSession = (DisplayList)session.getAttribute("displaylist");

      int index = 0;
      boolean flag = false;

      // THIS IS UTTER SILLINESS. WHY ARE WE LOOPING THROUGH A SESSION ATTRIBUTE
      // WITH A GENERIC NAME LIKE "displaylist", WHICH COULD HAVE BEEN SET
      // BY *ANY* HANDLER, WHEN WE *ALREADY HAVE* THE KEY TO THE MESSAGE?!??!
      // I'VE INTRODUCED A HACK HERE, TO ACCOUNT FOR CASES IN WHICH WE'RE TRYING
      // TO VIEW A MESSAGE DETAILS, BUT WE HAVEN'T COME FROM THE EMAIL LIST SCREEN.
      if (displaylistSession != null && (displaylistSession.getListType()).equals("Email"))
      {
        Set listkey = displaylistSession.keySet();
        Iterator it = listkey.iterator();

        while (it.hasNext())
        {
          index++;
          String str = (String)it.next();
          ListElement ele = (ListElement)displaylistSession.get(str);
          ListElementMember sm = (ListElementMember)ele.get("MessageID");
          Integer id = (Integer)sm.getMemberValue();
          int messageid = id.intValue();

          if (index == (Integer.parseInt(indexfrompage)))
View Full Code Here

        dynaForm.set("tomonth", (String)toDateSplitUp.get(1));
        dynaForm.set("today", (String)toDateSplitUp.get(2));
      }
    dynaForm.set("timesheetID",timeSheetId+"");

      DisplayList displaylist = (DisplayList)timeSheetVO.getTimeSlipList();

      //Setting the timesliplist attribute
      session.setAttribute("timesliplist", displaylist);
      session.setAttribute("timesheetvo", timeSheetVO);
      request.setAttribute("timesliplist", displaylist);
View Full Code Here

          {
            saveForm();
          }

          ListPreference listpreference = userobjectd.getListPreference("TimeSheet");
          DisplayList displaylistSession = (DisplayList) session.getAttribute("displaylist");

          DisplayList displaylist = (DisplayList) request.getAttribute("displaylist");

          TimeSheetList DL = null;

          if (displaylist == null)
          {
            ListGenerator lg = ListGenerator.getListGenerator(dataSource);
            DL = (TimeSheetList) lg.getTimeSheetList(userobjectd.getIndividualID(),
            1, listpreference.getRecordsPerPage(), "", listpreference.getSortElement());
          }
          else
          {
            DL = (TimeSheetList) displaylistSession;
          }

          request.setAttribute("HrExpenseForm", form);
          session.setAttribute("HrExpenseForm", form);

          session.setAttribute("displaylist", DL);
          session.setAttribute("timesheetvo", timeSheetVO);
          request.setAttribute("displaylist", DL);
          request.setAttribute("list", "TimeSheet");
          request.setAttribute(HrConstantKeys.TYPEOFSUBMODULE, HrConstantKeys.TIMESHEET);

          returnStatus = ".view.hr.timesheet.edit";
        }
        else if ((saveandclose != null) &&
           saveandclose.equalsIgnoreCase("Save & Close"))
        {
          TimeSheetVOX timeSheetVOX = new TimeSheetVOX(userobjectd,
          dynaValidatorForm);
          TimeSheetVO timeSheetVO = timeSheetVOX.getTimeSheetVO();

          String addslipflag = (String) session.getAttribute("addslip");

          //Condition that instructs that the NewSlip button is clicked  and the timesheet is already added to the database
          if (addslipflag == null)
          {
            saveForm();
          }
          else
          {
            session.setAttribute("addslip", null);
          }

          ListPreference listpreference = userobjectd.getListPreference("TimeSheet");
          DisplayList displaylistSession = (DisplayList) session.getAttribute("displaylist");

          DisplayList displaylist = (DisplayList) request.getAttribute("displaylist");

          TimeSheetList DL = null;

          if (displaylist == null)
          {
            ListGenerator lg = ListGenerator.getListGenerator(dataSource);
            DL = (TimeSheetList) lg.getTimeSheetList(userobjectd.getIndividualID(),
            1, listpreference.getRecordsPerPage(), "", listpreference.getSortElement());
          }
          else
          {
            DL = (TimeSheetList) displaylistSession;
          }

          session.setAttribute("displaylist", DL);
          request.setAttribute("displaylist", DL);
          request.setAttribute("list", "TimeSheet");
          request.setAttribute(HrConstantKeys.TYPEOFSUBMODULE, HrConstantKeys.TIMESHEET);

          returnStatus = ".view.hr.timesheet.list";
        }
        else if ((saveandnew != null) &&
        saveandnew.equalsIgnoreCase("Save & New"))
        {
          String addslipflag = (String) session.getAttribute("addslip");

          if (addslipflag == null)
          {
            saveForm();
          }
          else
          {
            session.setAttribute("addslip", null);
          }

          dynaValidatorForm.initialize(mapping);
          session.setAttribute("timesliplist", null);
          session.setAttribute("savenewflag", "true");
          returnStatus = ".view.hr.timesheet.new";
        }
      }
      else if (sTypeOfOperation.equalsIgnoreCase("EDIT"))
      {
        //Here we will be doing the editing of the timesheet records
        //i.e. the update query will be set
        String sTimeSheetID = (String) request.getParameter("timesheetID");

        int timesheetId = 0;
        if (sTimeSheetID != null)
        {
          Integer iTimeSheetId = new Integer(sTimeSheetID);
          timesheetId = iTimeSheetId.intValue();
        }
        else
        {
          Integer iTimeSheetId = (Integer) request.getAttribute("timesheetID");
          timesheetId = iTimeSheetId.intValue();
        }

        updateForm(timesheetId);

        if ((save != null) && save.equals("Save"))
        {
          //The record is updated in the DB and the new timesheet screen is shown.
          returnStatus = ".view.hr.timesheet.edit";
          dynaValidatorForm.initialize(mapping);
        }

        if ((saveandclose != null) && saveandclose.equals("Save & Close"))
        {
          //The record will be updated in the DB and the page is closed.
          returnStatus = ".view.hr.timesheet.list";
        }
        else if ((saveandnew != null) && saveandnew.equals("Save & New"))
        {
          //The record is updated in the DB and the new timesheet screen is shown.
          session.setAttribute("savenewflag", "true");
          returnStatus = ".view.hr.timesheet.new";
          dynaValidatorForm.initialize(mapping);
        }

        session.setAttribute("TYPEOFOPERATION", sTypeOfOperation);
      }
      else if (sTypeOfOperation.equalsIgnoreCase("DUPLICATE"))
      {

        String sTimeSheetID = (String) request.getParameter("timesheetID");
        Integer iTimeSheetId = new Integer(0);
        if (sTimeSheetID != null){
          iTimeSheetId = new Integer(sTimeSheetID);
        }
        else if(request.getAttribute("timesheetID") != null){
          iTimeSheetId = (Integer) request.getAttribute("timesheetID");
        }


        if (iTimeSheetId != null)
        {
          int timesheetId = iTimeSheetId.intValue();
          int iNewTimeSheetId = saveForm();
          TimeSheetVO timeSheetVO=null;
          try
          {
            HrFacadeHome aa = (HrFacadeHome)
            CVUtility.getHomeObject("com.centraview.hr.hrfacade.HrFacadeHome", "HrFacade");

            HrFacade remote = (HrFacade) aa.create();
            remote.setDataSource(dataSource);
            timeSheetVO = remote.getTimeSheet(iNewTimeSheetId);
          }
          catch (Exception e)
          {
            System.out.println("[Exception] AddTimeSheetHandler.execute: " + e.toString());
            e.printStackTrace();
          }

          DisplayList DL = null;

          if (timeSheetVO != null)
          {
            DL = (DisplayList) timeSheetVO.getTimeSlipList();
          }
View Full Code Here

      System.out.println("In HR View HANDLER Returning failure ");
      return (mapping.findForward("failure"));
    }
    finally
    {
      DisplayList DL = (DisplayList)request.getAttribute("displaylist");
      DisplayList DLSession = (DisplayList)session.getAttribute("displaylist");
      session.setAttribute("displaylist",DLSession);
      request.setAttribute("displaylist",DL);
      request.setAttribute("SAMETIMESHEET","no");
    }
    return mapping.findForward(returnStatus);
View Full Code Here

      com.centraview.common.UserObject  userobjectd = (com.centraview.common.UserObject)session.getAttribute( "userobject" );

      ListPreference listpreference= userobjectd.getListPreference("TimeSheet");

      DisplayList displaylistSession = ( DisplayList )session.getAttribute( "displaylist") ;

      // 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)
     
      DisplayList displaylist = ( DisplayList )request.getAttribute( "displaylist") ;
      TimeSheetList DL= null;
      ListGenerator lg = ListGenerator.getListGenerator(dataSource);
      if( displaylist == null  )
      {
        DL = ( TimeSheetList )lg.getTimeSheetList( userobjectd.getIndividualID() , 1,listpreference.getRecordsPerPage() , "" ,listpreference.getSortElement());
      }
      else//when display list is not null
      {
        String searchSession = displaylistSession.getSearchString();
        String searchrequest = displaylist.getSearchString();

        if(searchSession == null)
          searchSession = "";
        if(searchrequest == null)
          searchrequest = "";

        if (( (displaylistSession.getListID() == displaylist.getListID() ) &&
              ( displaylist.getDirtyFlag() == false ) &&
              ( displaylist.getStartAT() >= displaylistSession.getBeginIndex() ) &&
              ( displaylist.getEndAT()<=displaylistSession.getEndIndex() ) &&
              (displaylist.getSortMember().equals(displaylistSession.getSortMember()) &&
              (displaylist.getSortType()==(displaylistSession.getSortType())) &&
              (searchSession.equals(searchrequest)) )) ||
              displaylist.getAdvanceSearchFlag() == true)
        {
          DL = (TimeSheetList)displaylistSession;
          request.setAttribute("displaylist" , displaylistSession );
        }
        else
View Full Code Here

      long idd = 0;
      if (listId != null)
        idd = Long.parseLong(listId);

      ListGenerator lg = ListGenerator.getListGenerator(dataSource);
      DisplayList DL = lg.getDisplayList(idd);

      DisplayList displaylistSession = (DisplayList)session.getAttribute("displaylist");
      if ((displaylistSession != null) && (displaylistSession.getListID() == idd))
        displaylistSession.setDirtyFlag(true);

      String eventID = request.getParameter("eventid").toString();

      int iCount;
View Full Code Here

          ActionErrors allErrors = (ActionErrors) session.getAttribute("listErrorMessage");
          saveErrors(request, allErrors);
          session.removeAttribute("listErrorMessage");
        }//end of if (session.getAttribute("listErrorMessage") != null)

        DisplayList displaylistSession = ( DisplayList )session.getAttribute( "displaylist") ;

        DisplayList displaylist = ( DisplayList )request.getAttribute( "displaylist") ;

        EntityList DL = new EntityList();
        ListGenerator lg = ListGenerator.getListGenerator(dataSource);
        if( displaylist == null  )
        {

          String searchString = "ADVANCE:SELECT entityid FROM vendor  ";
          DL = ( EntityList )lg.getEntityList( userobjectd.getIndividualID(), 1,listpreference.getRecordsPerPage() , searchString ,listpreference.getSortElement());
          if (DL == null)
          {
            DL = new EntityList();
          }

          DisplayList DL1 = lg.getDisplayList(DL.getListID() );
          DL1.setListType("Vendor");
          DL.setListType("Vendor");
          DL.setPrimaryTable("vendor");
          DL1.setTotalNoOfRecords(DL.size());
          DL.setTotalNoOfRecords(DL.size());
        }
        else
        {
          String searchSession = displaylistSession.getSearchString();
          String searchrequest = displaylist.getSearchString();

          if(searchSession == null)
            searchSession = "";
          if(searchrequest == null)
            searchrequest = "";

          if (( (displaylistSession.getListID() == displaylist.getListID() ) &&
                ( displaylist.getDirtyFlag() == false ) &&
                ( displaylist.getStartAT() >= displaylistSession.getBeginIndex() ) &&
                ( displaylist.getEndAT()<=displaylistSession.getEndIndex() ) &&
                (displaylist.getSortMember().equals(displaylistSession.getSortMember()) &&
                (displaylist.getSortType()==(displaylistSession.getSortType())) &&
                (searchSession.equals(searchrequest)) )) ||
                displaylist.getAdvanceSearchFlag() == true)
          {
            DL = (EntityList)displaylistSession;
            DL.setListType("Vendor");
            DL.setPrimaryTable("vendor");
            DL.setTotalNoOfRecords(DL.size());
            request.setAttribute("displaylist" , displaylistSession );
          }
          else
          {
            DL = ( EntityList )lg.getEntityList( displaylist );
            DisplayList DL1 = lg.getDisplayList(DL.getListID() );
            DL1.setListType("Vendor");
            DL.setListType("Vendor");
            DL.setPrimaryTable("vendor");
            DL1.setTotalNoOfRecords(DL.size());
            DL.setTotalNoOfRecords(DL.size());
          }
        }

View Full Code Here

      // but if NextPageHandler or PreviousPageHandler have been called, then we
      // get the DisplayList that either of those handlers put on the request,
      // and get the startAt and endAt parameters from that object (BUT THROW
      // AWAY THE ACTUAL LIST)
      DisplayList sessionEmailList = (DisplayList)request.getAttribute("displaylist");

      if (sessionEmailList != null)
      {
        startAt = sessionEmailList.getStartAT();
        endAt = sessionEmailList.getEndAT();
        sortType = sessionEmailList.getSortType();
      }

      ListGenerator lg = ListGenerator.getListGenerator(dataSource);
      EmailList emailList = null;
     
      // If we are setting the Advance Search Flag to True means we already processed the List with Advance Search condition. So we don't need to get the list once again.
      if (sessionEmailList != null && sessionEmailList.getAdvanceSearchFlag() == true)
      {
        emailList = (EmailList) sessionEmailList;
      }else{
        emailList = (EmailList)lg.getEmailList(individualID, startAt, endAt, searchString, listPrefs.getSortElement(), sortType, folderID.intValue(),true);
      }
View Full Code Here

TOP

Related Classes of com.centraview.common.DisplayList

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.