Examples of ILovDetail


Examples of it.eng.spagobi.behaviouralmodel.lov.bo.ILovDetail

      // get the lov associated to the parameter
      Parameter par = biparam.getParameter();
      ModalitiesValue lov = par.getModalityValue();
      // build the ILovDetail object associated to the lov
      String lovProv = lov.getLovProvider();
      ILovDetail lovProvDet = LovDetailFactory.getLovFromXML(lovProv);
      // get the result of the lov
      IEngUserProfile profile = getProfile();
//      String lovResult = biparam.getLovResult();
//      if ((lovResult == null) || (lovResult.trim().equals(""))) {
//        lovResult = lovProvDet.getLovResult(profile);
//      }
      String lovResult = "";

      Integer biparId = biparam.getId();
      String biparIdStr = biparId.toString();
      Integer parId = par.getId();
      Integer lovId = lov.getId();

      Integer parusecorrId = null;
      IParameterUseDAO parusedao = DAOFactory.getParameterUseDAO();
      List paruses = parusedao.loadParametersUseByParId(parId);
      Iterator iterParuse = paruses.iterator();
      while (iterParuse.hasNext()) {
        ParameterUse paruse = (ParameterUse) iterParuse.next();
        if (paruse.getIdLov().equals(lovId)) {
          parusecorrId = paruse.getUseID();
        }
      }

      if (parusecorrId != null) {
        request.updAttribute("LOOKUP_PARAMETER_ID", biparIdStr);
        request.updAttribute("correlated_paruse_id", parusecorrId.toString());
        LovToListService ltls = new LovToListService(lovResult);
        ListIFace listvalues = ltls.getLovAsListService();
        listvalues = ltls.filterListForCorrelatedParam(request, listvalues, httpRequest);
        PaginatorIFace listPagin = listvalues.getPaginator();
        SourceBean allrows = listPagin.getAll();
        lovResult = allrows.toXML(false);
      }

      // get value and description column
      String valueColumn = lovProvDet.getValueColumnName();
      String descriptionColumn = lovProvDet.getDescriptionColumnName();
      // get all the rows of the result and build the option of the
      // combobox
      LovResultHandler lovResultHandler = new LovResultHandler(lovResult);
      List rows = lovResultHandler.getRows();
      Iterator it = rows.iterator();
View Full Code Here

Examples of it.eng.spagobi.behaviouralmodel.lov.bo.ILovDetail

      ModalitiesValue paruse = par.getModalityValue();
      if (paruse.getITypeCd().equals("MAN_IN")) {
        logger.debug("Document parameter is manual input. An empty HashMap will be returned.");
      } else {
        String lovprov = paruse.getLovProvider();
        ILovDetail lovDetail = LovDetailFactory.getLovFromXML(lovprov);
        String lovResult = lovDetail.getLovResult(profile, null, null);
        LovResultHandler lovResultHandler = new LovResultHandler(lovResult);
        List rows = lovResultHandler.getRows();
        Iterator it = rows.iterator();
        while (it.hasNext()) {
          SourceBean row = (SourceBean) it.next();
          String value = (String) row.getAttribute(lovDetail.getValueColumnName());
          String description = (String) row.getAttribute(lovDetail.getDescriptionColumnName());
          values.put(value, description);
        }
      }
    } catch(NonExecutableDocumentException e) {
      throw e;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.