Package com.centraview.common

Examples of com.centraview.common.ListPreference


  {
    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();
    ListPreference listPreference = user.getListPreference("Group");

    ValueListParameters listParameters = null;
    ValueListParameters requestListParameters = (ValueListParameters)request.getAttribute("listParameters");
    if (requestListParameters == null) // build up new Parameters
    {
      listParameters = new ValueListParameters(ValueListConstants.GROUP_LOOKUP_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.groupLookupViewMap.get(listPreference.getSortElement());
      listParameters.setSortColumn(sortField.getQueryIndex());
      if (listPreference.getsortOrder()) {
        listParameters.setSortDirection("ASC");
      } else {
        listParameters.setSortDirection("DESC");
      }
    }
View Full Code Here


    }

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

    ListPreference listPreference = userObject.getListPreference("Individual");
    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.INDIVIDUAL_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.individualViewMap
          .get(listPreference.getSortElement());
      listParameters.setSortColumn(sortField.getQueryIndex());
      if (listPreference.getsortOrder()) {
        listParameters.setSortDirection("ASC");
      } else {
        listParameters.setSortDirection("DESC");
      }
    }
View Full Code Here

    UserObject userObject = (UserObject)session.getAttribute("userobject");
    int individualID = userObject.getIndividualID(); // logged in user
    int entityID = userObject.getEntityId(); // logged in user's entityID
    ActionErrors allErrors = new ActionErrors();
    try {
      ListPreference listPrefs = userObject.getListPreference("InvoiceHistory");
      ValueListParameters listParameters = ActionUtil.valueListParametersSetUp(listPrefs, request, ValueListConstants.CUSTOMER_INVOICE_LIST_TYPE, ValueListConstants.customerInvoiceViewMap, false);
      String filter = "SELECT invoice.InvoiceID FROM invoice WHERE invoice.CustomerID = " + entityID;
      listParameters.setFilter(filter);
      ValueList valueList = (ValueList)CVUtility.setupEJB("ValueList", "com.centraview.valuelist.ValueListHome", dataSource);
      ValueListVO listObject = valueList.getValueList(individualID, listParameters);
View Full Code Here

      SimpleDateFormat simpleDateFormat = new SimpleDateFormat("MMM d, yyyy h:mm a");
      dynaForm.set("create", simpleDateFormat.format(createdDate));
      dynaForm.set("modify", simpleDateFormat.format(modifiedDate));
      dynaForm.set("owner", (new Integer(groupVO.getOwner())).toString());

      ListPreference listPreference = userObject.getListPreference("Individual");
      ListView view = listPreference.getListView(String.valueOf(listPreference.getDefaultView()));
      ValueListParameters listParameters = (ValueListParameters)request
          .getAttribute("listParameters");
      if (listParameters == null) {
        listParameters = new ValueListParameters(ValueListConstants.GROUP_MEMBER_LIST_TYPE,
            listPreference.getRecordsPerPage(), 1);
        FieldDescriptor sortField = (FieldDescriptor)ValueListConstants.individualViewMap
            .get(listPreference.getSortElement());
        listParameters.setSortColumn(sortField.getQueryIndex());
        if (listPreference.getsortOrder()) {
          listParameters.setSortDirection("ASC");
        } else {
          listParameters.setSortDirection("DESC");
        }
      }
View Full Code Here

    UserObject userObject = (UserObject)session.getAttribute("userobject");
    int individualID = userObject.getIndividualID(); // logged in user
    int entityID = userObject.getEntityId(); // logged in user's entityID
    ActionErrors allErrors = new ActionErrors();
    try {
      ListPreference listPrefs = userObject.getListPreference("Payment");
      ValueListParameters listParameters = ActionUtil.valueListParametersSetUp(listPrefs, request, ValueListConstants.CUSTOMER_PAYMENT_LIST_TYPE, ValueListConstants.customerPaymentViewMap, false);
      String filter = "SELECT payment.PaymentID FROM payment WHERE payment.linestatus != 'deleted' AND  payment.EntityID = "+entityID;
      listParameters.setFilter(filter);
      ValueList valueList = (ValueList)CVUtility.setupEJB("ValueList", "com.centraview.valuelist.ValueListHome", dataSource);
      ValueListVO listObject = valueList.getValueList(individualID, listParameters);
View Full Code Here

    int individualID = userObject.getIndividualID(); // logged in user
    int entityID = userObject.getEntityId(); // logged in user's entityID

    ActionErrors allErrors = new ActionErrors();
    try {
      ListPreference listPrefs = userObject.getListPreference("Order");
      ValueListParameters listParameters = ActionUtil.valueListParametersSetUp(listPrefs, request, ValueListConstants.CUSTOMER_ORDER_LIST_TYPE, ValueListConstants.customerOrderViewMap, false);
      String filter = "SELECT cvorder.orderid FROM cvorder WHERE entityid=" + entityID;
      listParameters.setFilter(filter);
      ValueList valueList = (ValueList)CVUtility.setupEJB("ValueList", "com.centraview.valuelist.ValueListHome", dataSource);
      ValueListVO listObject = valueList.getValueList(individualID, listParameters);
View Full Code Here

        if (session.getAttribute("highlightmodule") != null)
          session.setAttribute("highlightmodule", "hr");

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

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

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

        DisplayList displaylist = ( DisplayList )request.getAttribute( "displaylist") ;
        ExpenseFormList DL= null;
        // 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)
        ListGenerator lg = ListGenerator.getListGenerator(dataSource);
        if( displaylist == null)
        {
          DL = ( ExpenseFormList )lg.getExpensesList( userobjectd.getIndividualID() , 1,listpreference.getRecordsPerPage() , "" ,listpreference.getSortElement());
        }
        else//When the dispaly list in not null
        {
          String searchSession = displaylistSession.getSearchString();
          String searchrequest = displaylist.getSearchString();
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("TimeSheet");
    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.TIMESHEET_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.timeSheetViewMap.get(listPreference.getSortElement());
      listParameters.setSortColumn(sortField.getQueryIndex());
      if (listPreference.getsortOrder())
        listParameters.setSortDirection("ASC");
      else
        listParameters.setSortDirection("DESC");
    }
   
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("Proposal");
    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.PROPOSALS_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.proposalsViewMap.get(listPreference.getSortElement());
      listParameters.setSortColumn(sortField.getQueryIndex());
      if (listPreference.getsortOrder())
      {
        listParameters.setSortDirection("ASC");
      } else {
        listParameters.setSortDirection("DESC");
      }
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"); //get the user object
    int individualId = user.getIndividualID();
    ListPreference listPreference = user.getListPreference("SecurityProfile");
    ValueListParameters listParameters = ActionUtil.valueListParametersSetUp(listPreference, request, ValueListConstants.SECURITY_PROFILE_LIST_TYPE, ValueListConstants.securityProfileListViewMap, true);
    ValueList valueList = null;
    try {
      valueList = (ValueList)CVUtility.setupEJB("ValueList", "com.centraview.valuelist.ValueListHome", dataSource);
    } catch (Exception e) {
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.