Package it.eng.spagobi.behaviouralmodel.lov.bo

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


        if (startIndex != -1 && endIndex != -1)
          response.setAttribute("errorMessage", stacktrace.substring(startIndex, endIndex));
        response.setAttribute("testExecuted", "false");
      }
    } else if(typeLov.equalsIgnoreCase("FIXED_LIST")) {
      FixedListDetail fixlistDet = FixedListDetail.fromXML(looProvider);
//      if (fixlistDet.requireProfileAttributes()) {
//        String message = PortletUtilities.getMessage("scheduler.noProfileAttributesSupported", "component_scheduler_messages");
//        response.setAttribute(SpagoBIConstants.MESSAGE_INFO, message);
//        return list;
//      }
      valColName = fixlistDet.getValueColumnName();
      try{
        String result = fixlistDet.getLovResult(profile, null, null);
        rowsSourceBean = SourceBean.fromXMLString(result);
        if(!rowsSourceBean.getName().equalsIgnoreCase("ROWS")) {
          throw new Exception("The fix list is empty");
        } else if (rowsSourceBean.getAttributeAsList(DataRow.ROW_TAG).size()==0) {
          throw new Exception("The fix list is empty");
View Full Code Here


          objectToTest = scriptDet;
        }
       
        else  if (input_type_cd.equalsIgnoreCase("FIX_LOV")) {
          String lovProv = modVal.getLovProvider();
          FixedListDetail fixlistDet = null;
          if( (lovProv==null) || (lovProv.trim().equals("")) ) {
            fixlistDet = new FixedListDetail();
          } else {
            fixlistDet = (FixedListDetail)LovDetailFactory.getLovFromXML(lovProv);
          }
          boolean itemTaskDone = doFixListItemTask(modVal, fixlistDet, request);
          if(itemTaskDone) {
            prepareDetailModalitiesValuePage(modVal, mod, response);
            session.setAttribute(SpagoBIConstants.LOV_MODIFIED, "true");
            session.setAttribute(SpagoBIConstants.MODALITY_VALUE_OBJECT, modVal);
            // exits without writing into DB and without loop
            return;
          } else {
            List items = fixlistDet.getItems();
            if(items.size()==0) {
              modVal.setLovProvider("<LOV/>");
            }
            objectToTest = fixlistDet;
         
View Full Code Here

   * @param modVal  The ModalitiesValue to modify with the new entry
   * @throws SourceBeanException  If a SourceBean Exception occurred
   */
  private FixedListDetail addFixLovItem (SourceBean request, ModalitiesValue modVal) throws SourceBeanException {
    String lovProv = modVal.getLovProvider();
    FixedListDetail lovDetList = null;
    if ((lovProv==null) || (lovProv.trim().equals("")) || (!modVal.getITypeCd().equals("FIX_LOV"))) {
      lovDetList = new FixedListDetail();
    } else {
      lovDetList = FixedListDetail.fromXML(lovProv);
    }
    String lovDesc = (String)request.getAttribute("nameOfFixedLovItemNew");
    String lovValue = (String)request.getAttribute("valueOfFixedLovItemNew");
    lovDetList.add(lovValue, lovDesc);
    return lovDetList;
  }
View Full Code Here

        if (startIndex != -1 && endIndex != -1)
          response.setAttribute("errorMessage", stacktrace.substring(startIndex, endIndex));
        response.setAttribute("testExecuted", "false");
      }
    } else if(typeLov.equalsIgnoreCase("FIXED_LIST")) {
      FixedListDetail fixlistDet = FixedListDetail.fromXML(looProvider);
      try{
        String result = fixlistDet.getLovResult(profile, null, null);
        rowsSourceBean = SourceBean.fromXMLString(result);
        colNames = findFirstRowAttributes(rowsSourceBean);
        if(!rowsSourceBean.getName().equalsIgnoreCase("ROWS")) {
          throw new Exception("The fix list is empty");
        } else if (rowsSourceBean.getAttributeAsList(DataRow.ROW_TAG).size()==0) {
View Full Code Here

    private SourceBean executeFixedList(String lovProvider, SourceBean response, IEngUserProfile profile)
      throws Exception {
  logger.debug("IN");
  logger.debug("lovProvider."+lovProvider);
  SourceBean resultSB = null;
  FixedListDetail fixlistDet = FixedListDetail.fromXML(lovProvider);
  if (fixlistDet.requireProfileAttributes()) {
      String message = PortletUtilities.getMessage("scheduler.noProfileAttributesSupported",
        "component_scheduler_messages");
      response.setAttribute(SpagoBIConstants.MESSAGE_INFO, message);
      return null;
  }
  valColName = fixlistDet.getValueColumnName();
  visibleColNames = fixlistDet.getVisibleColumnNames();
  logger.debug("valColName:"+valColName);
  descriptionColName = fixlistDet.getDescriptionColumnName();
  logger.debug("descriptionColName="+descriptionColName);
 
  try {
//      String result = fixlistDet.getLovResult(profile);
//      resultSB = SourceBean.fromXMLString(result);
View Full Code Here

TOP

Related Classes of it.eng.spagobi.behaviouralmodel.lov.bo.FixedListDetail

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.