1 Reply Latest reply on Dec 3, 2012 8:03 AM by 971908

    OAMessageDownload is displayed as messageStyledText

    971908
      Hi,

      in my Controller class, I programmatically create a download bean:

      OAMessageDownloadBean downloadBean = (OAMessageDownloadBean) pageContext.getWebBeanFactory().createWebBean(pageContext,OAWebBeanConstants.MESSAGE_DOWNLOAD_BEAN);
      downloadBean.setID("XxpoDropshipDocsDownload");
      downloadBean.setUINodeName("XxpoDropshipDocsDownload");
      downloadBean.setPrompt("hier herunterladen"); //TODO: use a message here
      downloadBean.setViewUsageName("XxpoDropshipDocsBlobsVO1");
      downloadBean.setViewAttributeName("FileName"); //FileName?
      downloadBean.setContentViewAttributeName("FileData");
      downloadBean.setDataType("BLOB");
      // downloadBean.setDownloadFileName(fileName);

      downloadBean.setFileContentType("application/pdf");
      // OADataBoundValueViewObject contentBoundValue = new OADataBoundValueViewObject(downloadBean,"FileContentType");
      //downloadBean.setAttributeValue(FILE_CONTENT_TYPE, contentBoundValue);


      try
      {
      webBean.findChildRecursive("PosAsnShipResults").addIndexedChild(0,downloadBean);
      }
      catch(Exception e)
      {
      throw new OAException("Exception in XxpoShippingDocumentsCO.displayFileDownload(): " +
      debug +
      " Original message: " + e.getMessage()
      , OAException.WARNING);
      }

      As a result, the new bean is visible with the correct prompt and the correct filename. But it is not displayed as a link but only as a text. In "About this page" it is also listed as a messageStyledText.

      What am I missing here?

      Any help would be appreciated.