Package com.centraview.valuelist

Examples of com.centraview.valuelist.ValueListParameters


    int individualID = userObject.getIndividualID(); // logged in user
    int entityID = userObject.getEntityId(); // entityID of the logged-in user's entity
    ActionErrors allErrors = new ActionErrors();
    try {
      ListPreference listPreference = userObject.getListPreference("Email");
      ValueListParameters listParameters = ActionUtil.valueListParametersSetUp(listPreference, request, ValueListConstants.CUSTOMER_EMAIL_LIST_TYPE, ValueListConstants.customerEmailViewMap, false);
      String filter = "SELECT em.MessageID " +
      "FROM emailmessage em LEFT JOIN emailrecipient er ON (em.MessageID=er.MessageID) " +
      "LEFT JOIN emailmessagefolder es ON (em.MessageID = es.MessageID) " +
      "LEFT JOIN methodofcontact moc ON (er.Address=moc.Content) " +
      "LEFT JOIN mocrelate mr ON (moc.MOCID=mr.MOCID) " +
      "LEFT JOIN individual i ON (mr.ContactID=i.IndividualID) " +
      "WHERE mr.ContactType=2 AND moc.MOCType=1 AND es.FolderID IS NOT NULL AND i.Entity = " + entityID +
      " UNION SELECT em.MessageID " +
      "FROM emailmessage em LEFT JOIN emailrecipient er ON (em.MessageID=er.MessageID) " +
      "LEFT JOIN emailmessagefolder es ON (em.MessageID = es.MessageID) " +
      "LEFT JOIN methodofcontact moc ON (er.Address=moc.Content) " +
      "LEFT JOIN mocrelate mr ON (moc.MOCID=mr.MOCID) " +
      "WHERE mr.ContactType=1 AND moc.MOCType=1 AND es.FolderID IS NOT NULL AND mr.ContactID = " + entityID;
      listParameters.setFilter(filter);
      ValueList valueList = (ValueList)CVUtility.setupEJB("ValueList", "com.centraview.valuelist.ValueListHome", dataSource);
      ValueListVO listObject = valueList.getValueList(individualID, listParameters);
      ValueListDisplay displayParameters = new ValueListDisplay(new ArrayList(), false, false, true, true, true, true);
      listObject.setDisplay(displayParameters);
      request.setAttribute("valueList", listObject);
View Full Code Here


    int current = 1;
    try {
      current = Integer.valueOf(currentParam).intValue();
    } catch (Exception e) {}
    String selectedIds = request.getParameter("rowId");
    ValueListParameters listParameters = new ValueListParameters(
        ValueListConstants.INDIVIDUAL_LIST_TYPE, rpp, current);
    String filter = "SELECT individual.individualId FROM individual WHERE individualId IN ("
        + selectedIds + ")";
    listParameters.setFilter(filter);
    ArrayList columns = new ArrayList();
    FieldDescriptor nameField = (FieldDescriptor)ValueListConstants.individualViewMap.get("Name");
    listParameters.setSortColumn(nameField.getQueryIndex());
    listParameters.setSortDirection("ASC");
    columns.add(nameField);
    listParameters.setColumns(columns);
    ValueList valueList = null;
    try {
      valueList = (ValueList)CVUtility.setupEJB("ValueList",
          "com.centraview.valuelist.ValueListHome", dataSource);
    } catch (Exception e) {
View Full Code Here

      moduleList = (HashMap)globalMasterLists.get("moduleList");
   
    ListPreference listPreference = userObject.getListPreference("Employee");
    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.EMPLOYEE_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.employeeListViewMap.get(listPreference.getSortElement());
View Full Code Here

      moduleList = (HashMap)globalMasterLists.get("moduleList");

    ListPreference listPreference = userObject.getListPreference("Group");
    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.GROUP_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.groupViewMap.get(listPreference.getSortElement());
View Full Code Here

    HttpSession session = request.getSession(true);
    UserObject userObject = (UserObject)session.getAttribute("userobject");
    int individualId = userObject.getIndividualID();
    ListPreference listPreference = userObject.getListPreference(viewType);
    ListView view = listPreference.getListView(String.valueOf(listPreference.getDefaultView()));
    ValueListParameters listParameters = null;
    if (request.getAttribute("listParameters") != null) {
      listParameters = (ValueListParameters)request.getAttribute("listParameters");
    } else {
      listParameters = new ValueListParameters(valueListType, listPreference.getRecordsPerPage(), 1);
      // Sorting
      FieldDescriptor sortField = (FieldDescriptor)viewMap.get(listPreference.getSortElement());
      if (sortField != null) {
        listParameters.setSortColumn(sortField.getQueryIndex());
      } else {
        listParameters.setSortColumn(1)// probably Id.
      }
      if (listPreference.getsortOrder()) {
        listParameters.setSortDirection("ASC");
      } else {
        listParameters.setSortDirection("DESC");
      }
    }
    // Filter
    listParameters.setFilter(filter);
    // Columns
    ArrayList columns = new ArrayList();
    Vector viewColumns = view.getColumns();
    ActionUtil.mapOldView(columns, viewColumns, valueListType);
    listParameters.setColumns(columns);
    // extraId is used for custom field.
    listParameters.setExtraId(extraId);
    // EJB
    ValueList valueList = null;
    try {
      valueList = (ValueList)CVUtility.setupEJB("ValueList", "com.centraview.valuelist.ValueListHome", dataSource);
    } catch (Exception e) {
View Full Code Here

    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());
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;
    }
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("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);
      ValueListDisplay displayParameters = new ValueListDisplay(new ArrayList(), false, false, true, true, true, true);
      listObject.setDisplay(displayParameters);
      request.setAttribute("valueList", listObject);
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("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);
      ValueListDisplay displayParameters = new ValueListDisplay(new ArrayList(), false, false, true, true, true, true);
      listObject.setDisplay(displayParameters);
      request.setAttribute("valueList", listObject);
View Full Code Here

    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);
      ValueListDisplay displayParameters = new ValueListDisplay(new ArrayList(), false, false, true, true, true, true);
      listObject.setDisplay(displayParameters);
      request.setAttribute("valueList", listObject);
View Full Code Here

TOP

Related Classes of com.centraview.valuelist.ValueListParameters

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.