Package com.centraview.common

Examples of com.centraview.common.ListPreference


    int individualId = user.getIndividualID();

    String moduleName = (request.getParameter("module") != null) ? (String)request.getParameter("module") : "Contacts";

    // Handle Paging, etc
    ListPreference listPreference = user.getListPreference("CustomView");
    ValueListParameters listParameters = ActionUtil.valueListParametersSetUp(listPreference, request, ValueListConstants.CUSTOM_VIEW_LIST_TYPE, ValueListConstants.customViewListViewMap, true);
    listParameters.setFilter("SELECT moduleid AS moduleid FROM module WHERE name='" + moduleName + "'");

    // Get the list from the database.
    ValueListHome valueListHome = (ValueListHome) CVUtility.getHomeObject("com.centraview.valuelist.ValueListHome","ValueList");
View Full Code Here


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

    // Handle Paging, etc
    ListPreference listPreference = user.getListPreference("History");
    ValueListParameters listParameters = ActionUtil.valueListParametersSetUp(listPreference, request, ValueListConstants.DATA_HISTORY_LIST_TYPE, ValueListConstants.historyListViewMap, true);
    listParameters.setFilter("");

    // Get the list from the database.
    ValueListHome valueListHome = (ValueListHome) CVUtility.getHomeObject("com.centraview.valuelist.ValueListHome","ValueList");
View Full Code Here

    String dataSource = Settings.getInstance().getSiteInfo(CVUtility.getHostName(super.getServlet().getServletContext())).getDataSource();
    HttpSession session = request.getSession(true);
    UserObject user = (UserObject) session.getAttribute("userobject");
    int individualId = user.getIndividualID();
    String moduleName = (request.getParameter("module") != null) ? (String) request.getParameter("module") : "Contacts";
    ListPreference listPreference = user.getListPreference("CustomFields");
    ValueListParameters listParameters = ActionUtil.valueListParametersSetUp(listPreference, request, ValueListConstants.CUSTOM_FIELDS_LIST_TYPE, ValueListConstants.customFieldsListViewMap, true);
    listParameters.setExtraString(moduleName);
    String filterParameter = request.getParameter("searchTextBox");
    if (filterParameter != null) {
      request.setAttribute("appliedSearch", filterParameter);
View Full Code Here

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

      InvoiceList displaylistSession = null;
      InvoiceList displaylist = null;

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

      InvoiceList 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 = (InvoiceList)lg.getInvoiceList(individualID, 1, records, "", sortelement, entityID, orderID);//called
View Full Code Here

    String returnStatus ="";
    HttpSession session = req.getSession();
    UserObject userObject = (UserObject)session.getAttribute("userobject");
    int userId = userObject.getIndividualID();

    ListPreference listpreference = userObject.getListPreference("Project");
    int recordsPerPage = listpreference.getRecordsPerPage();

    ListGenerator lg = ListGenerator.getListGenerator(dataSource);
    ProjectList DL = ( ProjectList )lg.getProjectList(userId , 0,0 , "" ,"Name");
    DL.setTotalNoOfRecords( DL.size() );
View Full Code Here

      marketingListId = sessionMarketingListId;
    }
    session.setAttribute("dbid", marketingListId);
    UserObject userObject = (UserObject)session.getAttribute("userobject");
    int individualId = userObject.getIndividualID();
    ListPreference listPreference = userObject.getListPreference("InvoiceHistory");
    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.INVOICE_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.invoiceViewMap.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", "email");

      UserObject userobjectd = (UserObject)session.getAttribute("userobject");
      ListPreference listpreference = userobjectd.getListPreference("Email");

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

      String deleteFlag = (String)request.getAttribute("deleteFlag");

//      System.out.println("displaylist"+displaylist);
      // Folder List

      EmailFacadeHome aa = (EmailFacadeHome)CVUtility.getHomeObject("com.centraview.email.emailfacade.EmailFacadeHome", "EmailFacade");
      EmailFacade remote = (EmailFacade)aa.create();
      remote.setDataSource(dataSource);
      int individualID = userobjectd.getIndividualID();
      FolderList fl = (FolderList)remote.getFolderList(individualID);

      String[] maps = mapping.findForwards();
      if (fl == null)
      {
        return (mapping.findForward("displaynomailaccount"));
      }
      else if (fl.size() == 0)
      {
        return (mapping.findForward("displaynomailaccount"));
      }

      session.setAttribute("folderlist", fl);

      int folderid = fl.getDefaultFolder();

      System.out.println("folderid"+folderid);

      if (request.getParameter("folderid") != null)
      {
        folderid = Integer.parseInt(request.getParameter("folderid"));
      }
      if (request.getParameter("folderid") == null)
      {
      System.out.println("request.getAttribute(folderid)--->"+request.getAttribute("folderid"));
     if(request.getAttribute("folderid") != null){
        folderid = Integer.parseInt((String)request.getAttribute("folderid"));
     }
      }


      //End Folder List
      session.setAttribute("folderid", "" + folderid);

      EmailList DL = null;
      if (displaylist == null)
      {
        ListGenerator lg = ListGenerator.getListGenerator(dataSource);
        DL = (EmailList)lg.getEmailList(individualID, 1, listpreference.getRecordsPerPage(), "", listpreference.getSortElement(),'D', folderid, true);
    }
      else
      {
        String searchSession = displaylistSession.getSearchString();
        String searchrequest = displaylist.getSearchString();
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("Timeslip");
    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.TIMESLIPS_LIST_TYPE, listPreference.getRecordsPerPage(), 1);
    } else { // paging or sorting or something, use the parameters from the
             // request.
      listParameters = requestListParameters;
    }
    if (listParameters.getSortColumn() == 0) {
      System.out.println(listPreference.getSortElement());
      FieldDescriptor sortField = (FieldDescriptor)ValueListConstants.timeslipsViewMap.get(listPreference.getSortElement());
     
      listParameters.setSortColumn(sortField.getQueryIndex());
      if (listPreference.getsortOrder()) {
        listParameters.setSortDirection("ASC");
      } else {
        listParameters.setSortDirection("DESC");
      }
    }
View Full Code Here

    {
      DynaActionForm dynaForm = (DynaActionForm)form;
      HttpSession session = request.getSession(true);
      UserObject userobjectd = (UserObject)session.getAttribute("userobject");
      int individualId = userobjectd.getIndividualID();
      ListPreference listpreference = userobjectd.getListPreference("Email");

      String accountid = null;
      accountid = request.getParameter("accountid");

      MailAccount mailaccount = null;
View Full Code Here

      saveErrors(request, allErrors);
      session.removeAttribute("listErrorMessage");
    }//end of if (session.getAttribute("listErrorMessage") != null)
   
      UserObject userobjectd =(UserObject) session.getAttribute("userobject");
      ListPreference listpreference = userobjectd.getListPreference("Project");

      DisplayList displaylistSession = (DisplayList) session.getAttribute("displaylist");
      DisplayList displaylist = (DisplayList) request.getAttribute("displaylist");
      ProjectList DL = null;

      if (displaylist == null)
      {
        ListGenerator lg = ListGenerator.getListGenerator(dataSource);
        DL = (ProjectList) lg.getProjectList(userobjectd.getIndividualID(), 1,
            listpreference.getRecordsPerPage(), "", listpreference.getSortElement());
      } //end of if statement (displaylist == null)
      else
      {
        String searchSession = displaylistSession.getSearchString();
        String searchrequest = displaylist.getSearchString();
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.