Package com.centraview.common

Examples of com.centraview.common.ListPreference


    // Check wheather the actionType is it Lookup or not
    String actionType = (String)request.getParameter("actionType");

    UserObject userObject = (UserObject)session.getAttribute("userobject");
    int individualId = userObject.getIndividualID();
    ListPreference listPreference = userObject.getListPreference("Order");
    ListView view = listPreference.getListView(String.valueOf(listPreference.getDefaultView()));
    ValueListParameters listParameters = null;
    ValueListParameters requestListParameters = (ValueListParameters)request.getAttribute("listParameters");
    if (requestListParameters == null) // build up new Parameters
    {
      listParameters = new ValueListParameters(ValueListConstants.ORDER_LIST_TYPE, listPreference.getRecordsPerPage(), 1);
    } else { // paging or sorting or something, use the parameters from the
             // request.
      listParameters = requestListParameters;
    }
    if (listParameters.getSortColumn() == 0) {
      FieldDescriptor sortField = (FieldDescriptor)ValueListConstants.orderViewMap.get(listPreference.getSortElement());
      listParameters.setSortColumn(sortField.getQueryIndex());
      if (listPreference.getsortOrder()) {
        listParameters.setSortDirection("ASC");
      } else {
        listParameters.setSortDirection("DESC");
      }
    }
View Full Code Here


        HttpSession session = request.getSession(true);
        session.setAttribute("highlightmodule", "account");

        com.centraview.common.UserObject  userobjectd = (com.centraview.common.UserObject)session.getAttribute( "userobject" );//get the user object
        int individualID = userobjectd.getIndividualID();
        ListPreference listpreference= userobjectd.getListPreference("Payment");

        String strInvoiceID = request.getParameter("invoiceid");
        int invoiceID = 0;

        // 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)
       
        if (strInvoiceID != null)
        {
          invoiceID = Integer.parseInt(strInvoiceID);
        }


        PaymentList displaylistSession = null;
        PaymentList displaylist = null;

        try
        {
          displaylistSession = ( PaymentList )session.getAttribute( "displaylist") ;//gets the list from session
        }
        catch( Exception e )
        {
          displaylistSession = null;
        }
        try
        {
          displaylist = ( PaymentList )request.getAttribute( "displaylist") ;//gets the list from request
        }
        catch( Exception e )
        {
          displaylist = null;
        }


        PaymentList DL = null ;
        ListGenerator lg = ListGenerator.getListGenerator(dataSource);
        if( displaylist == null  )
        {
          int records = listpreference.getRecordsPerPage();//gets the initial record per page to be displayed from listPreference
          String sortelement = listpreference.getSortElement();//gets the initial sort element from listPreference
          DL = null;
          DL = (PaymentList)lg.getPaymentList( individualID , 1, records , "" ,sortelement,invoiceID );//called when the request for the list is for first time

          if(strInvoiceID != null)
            DL.setInvoiceID(invoiceID);
View Full Code Here

    GlobalMasterLists globalMasterLists = GlobalMasterLists.getGlobalMasterLists(dataSource);
    HashMap moduleList = new HashMap();
    if (globalMasterLists.get("moduleList") != null)
      moduleList = (HashMap)globalMasterLists.get("moduleList");
   
    ListPreference listPreference = userObject.getListPreference("LiteratureFulfillment");
    ListView view = listPreference.getListView(String.valueOf(listPreference.getDefaultView()));
   
    ValueListParameters listParameters = null;
    ValueListParameters requestListParameters = (ValueListParameters)request.getAttribute("listParameters");
    if (requestListParameters == null) { // build up new Parameters
      listParameters = new ValueListParameters(ValueListConstants.LITERATUREFULFILLMENT_LIST_TYPE, listPreference.getRecordsPerPage(), 1);
    } else { // paging or sorting or something, use the parameters from the request.
      listParameters = requestListParameters;
    }
    if (listParameters.getSortColumn() == 0) {
      FieldDescriptor sortField = (FieldDescriptor)ValueListConstants.literatureFulfillmentViewMap.get(listPreference.getSortElement());
      listParameters.setSortColumn(sortField.getQueryIndex());
      if (listPreference.getsortOrder())
        listParameters.setSortDirection("ASC");
      else
        listParameters.setSortDirection("DESC");
    }
   
View Full Code Here

        session.removeAttribute("listErrorMessage");
      }//end of if (session.getAttribute("listErrorMessage") != null)
     
      UserObject  userobjectd = (UserObject)session.getAttribute( "userobject" );//get the user object
      int individualID = userobjectd.getIndividualID();
      ListPreference listpreference= userobjectd.getListPreference("Ticket");

      TicketList displaylistSession = null;
      TicketList displaylist = null;
      try {
        displaylistSession = ( TicketList )session.getAttribute( "displaylist") ;//gets the list from session
      } catch( Exception e ) {
        displaylistSession = null;
      }
      try {
        displaylist = ( TicketList )request.getAttribute( "displaylist") ;//gets the list from request
      } catch( Exception e ) {
        displaylist = null;
      }
      TicketList DL = null ;
      if( displaylist == null  )
      {
        com.centraview.common.ListGenerator lg = com.centraview.common.ListGenerator.getListGenerator(dataSource);//get the List Generator object for Listing
        int records = listpreference.getRecordsPerPage();//gets the initial record per page to be displayed from listPreference
        String sortelement = listpreference.getSortElement();//gets the initial sort element from listPreference
        DL = (TicketList )lg.getTicketList( individualID , 1, records , "" ,sortelement);//called when the request for the list is for first time
        DL = setLinksfunction( DL );
      }
      else //if(displaylistSession !=null)
      {
View Full Code Here

        if (session.getAttribute("highlightmodule") != null)
        session.setAttribute("highlightmodule", "account");//Highlights the Accounting link on header.jsp

        com.centraview.common.UserObject  userobjectd = (com.centraview.common.UserObject)session.getAttribute( "userobject" );//get the user object
        int individualID = userobjectd.getIndividualID();
        ListPreference listpreference= userobjectd.getListPreference("Inventory");

        // 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)
       
        InventoryList displaylistSession = null;
        InventoryList displaylist = null;
        try
        {
          displaylistSession = ( InventoryList )session.getAttribute( "displaylist") ;//gets the list from session
        }
        catch( Exception e )
        {
          displaylistSession = null;
        }
        try
        {
          displaylist = ( InventoryList )request.getAttribute( "displaylist") ;//gets the list from request
        }
        catch( Exception e )
        {
          displaylist = null;
        }

        InventoryList DL = null ;
        ListGenerator lg = ListGenerator.getListGenerator(dataSource);

        if( displaylist == null  )
        {
          int records = listpreference.getRecordsPerPage();//gets the initial record per page to be displayed from listPreference
          String sortelement = listpreference.getSortElement();//gets the initial sort element from listPreference
          DL = null;
          DL = (InventoryList)lg.getInventoryList( individualID , 1, records , "" ,sortelement);//called when the request for the list is for first time
          DL = setLinksfunction( DL );
        }
        else //if(displaylistSession !=null)
View Full Code Here

    // Check wheather the actionType is it Lookup or not
    String actionType = (String)request.getParameter("actionType");

    UserObject userObject = (UserObject)session.getAttribute("userobject");
    int individualId = userObject.getIndividualID();
    ListPreference listPreference = userObject.getListPreference("Vendor");
    ListView view = listPreference.getListView(String.valueOf(listPreference.getDefaultView()));
    ValueListParameters listParameters = null;
    ValueListParameters requestListParameters = (ValueListParameters)request.getAttribute("listParameters");
    if (requestListParameters == null) // build up new Parameters
    {
      listParameters = new ValueListParameters(ValueListConstants.VENDOR_LIST_TYPE, listPreference.getRecordsPerPage(), 1);
    } else { // paging or sorting or something, use the parameters from the
             // request.
      listParameters = requestListParameters;
    }
    if (listParameters.getSortColumn() == 0) {
      FieldDescriptor sortField = (FieldDescriptor)ValueListConstants.vendorViewMap.get(listPreference.getSortElement());
      listParameters.setSortColumn(sortField.getQueryIndex());
      if (listPreference.getsortOrder()) {
        listParameters.setSortDirection("ASC");
      } else {
        listParameters.setSortDirection("DESC");
      }
    }
View Full Code Here

          session.removeAttribute("listErrorMessage");
        }//end of if (session.getAttribute("listErrorMessage") != null)

        com.centraview.common.UserObject  userobjectd = (com.centraview.common.UserObject)session.getAttribute( "userobject" );//get the user object
        int individualID = userobjectd.getIndividualID();
        ListPreference listpreference= userobjectd.getListPreference("Order");

        OrderList displaylistSession = null;
        OrderList displaylist = null;

        try
        {
        displaylistSession = ( OrderList)session.getAttribute( "displaylist") ;

        }
        catch( Exception e )
        {
        displaylistSession = null;
        }
        try
        {
        displaylist = ( OrderList)request.getAttribute( "displaylist") ;//gets the list from request
        }
        catch( Exception e )
        {
        displaylist = null;
        }

        ListGenerator lg = ListGenerator.getListGenerator(dataSource);

        OrderList DL = null ;

        if( displaylist == null  )
        {
          int records = listpreference.getRecordsPerPage();//gets the initial record per page to be displayed from listPreference
          String sortelement = listpreference.getSortElement();//gets the initial sort element from listPreference
          DL = (OrderList )lg.getOrderList( individualID , 1, records , "" ,sortelement );//called when the request for the list is for first time
          DL = setLinksfunction( DL );
        }
        else //if(displaylistSession !=null)
        {
View Full Code Here

    int requestCategoryID = 1;
    HttpSession session = request.getSession(true);
    UserObject userobjectd = (UserObject)session.getAttribute("userobject");
    int individualID = userobjectd.getIndividualID();

    ListPreference listpreference = userobjectd.getListPreference("Knowledgebase");
    KnowledgebaseList displaylistSession = null;
    try
    {
      displaylistSession = (KnowledgebaseList)session.getAttribute("displaylist");
      //System.out.println(" displaylistSession "+displaylistSession);
    } catch (Exception e) {
      System.out.println("[Exception] KnowledgebaseListHandler.execute: " + e.toString());
    }

    // 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");
    }

    KnowledgebaseList displaylist = null;
    try
    {
      displaylist = (KnowledgebaseList)request.getAttribute("displaylist");
    } catch (Exception e) {
      System.out.println("[Exception] KnowledgebaseListHandler.execute: " + e.toString());
    }

    if (request.getParameter("rowId") != null)
    {
      String rowID = (String)request.getParameter("rowId");
      int indexRowID = rowID.indexOf("#");
      if (indexRowID == -1)
      {
        requestCategoryID = (Integer.parseInt((String)request.getParameter("rowId")));
      }
      else if (displaylistSession != null) {
        requestCategoryID = displaylistSession.getCurrentCategoryID();
      } else {
        requestCategoryID = Integer.parseInt(rowID.substring(0, indexRowID));
      }
    } else if (displaylistSession != null) {
      requestCategoryID = displaylistSession.getCurrentCategoryID();
    }

    KnowledgebaseList DL = null;
    if (displaylist == null)
    {
      ListGenerator lg = ListGenerator.getListGenerator(dataSource);
      int records = listpreference.getRecordsPerPage();
      String sortelement = listpreference.getSortElement();
      // If we are not coming from customer View List handler than we must have
      // to set the as false.
      // Otherwise true.
      boolean customerViewFlag = false;
      DL = (KnowledgebaseList)lg.getKnowledgebaseList(individualID, 1, records, "", sortelement, requestCategoryID, customerViewFlag);
View Full Code Here

      // now, we need to set some stuff up for the folder bar which
      // shows where the user is located within the folder hierarchy
      ArrayList folderPathList = mailRemote.getFolderFullPath(folderID.intValue());
      emailListForm.set("folderPathList", folderPathList);

      ListPreference listPrefs = userObject.getListPreference("Email");

      // TODO: make sure searchString is taken care of
      String searchString = request.getParameter("searchTextBox");
      if (searchString == null)
      {
        searchString = "";
      }else{
        searchString = "SIMPLE :" + searchString;
      }

      // Paging stuff - we are ALWAYS getting the EmailList object populated from
      // the EJB layer. However, we are chaging the startAt and endAt parameters
      // passed to the ListGenerator when we get that list. By default, startAt is
      // set to 1 and endAt is set to records per page;
      int startAt = 1;
      int endAt = listPrefs.getRecordsPerPage();
      char sortType = 'D';

      // 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);
      }

      Set listkey = emailList.keySet();
      Iterator it = listkey.iterator();
      while (it.hasNext())
View Full Code Here

    GlobalMasterLists globalMasterLists = GlobalMasterLists.getGlobalMasterLists(dataSource);
    HashMap moduleList = new HashMap();
    if (globalMasterLists.get("moduleList") != null)
      moduleList = (HashMap)globalMasterLists.get("moduleList");
   
    ListPreference listPreference = userObject.getListPreference("FAQ");
    ListView view = listPreference.getListView(String.valueOf(listPreference.getDefaultView()));
   
    ValueListParameters listParameters = null;
    ValueListParameters requestListParameters = (ValueListParameters)request.getAttribute("listParameters");
    if (requestListParameters == null) { // build up new Parameters
      listParameters = new ValueListParameters(ValueListConstants.FAQ_LIST_TYPE, listPreference.getRecordsPerPage(), 1);
    } else { // paging or sorting or something, use the parameters from the request.
      listParameters = requestListParameters;
    }
    if (listParameters.getSortColumn() == 0) {
      FieldDescriptor sortField = (FieldDescriptor)ValueListConstants.FAQViewMap.get(listPreference.getSortElement());
      listParameters.setSortColumn(sortField.getQueryIndex());
      if (listPreference.getsortOrder())
        listParameters.setSortDirection("ASC");
      else
        listParameters.setSortDirection("DESC");
    }
   
View Full Code Here

TOP

Related Classes of com.centraview.common.ListPreference

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.