0 Replies Latest reply on Dec 8, 2009 11:39 AM by paulorf1971

    a4j:mediaOutput as Applet

    paulorf1971

      Hi u there,

      I've been trying to use the a4j:mediaOutput to show an applet for Jasper Reports Viewer with no success. Actually i really don't know what attributes I should use to replace the applet tag attributes. This is the code i used to build the Jasper Reports Viewer applet:

      <?xml version="1.0" encoding="ISO-8859-1"?>
      <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
      <html xmlns="http://www.w3.org/1999/xhtml"
       xmlns:h="http://java.sun.com/jsf/html"
       xmlns:f="http://java.sun.com/jsf/core"
       xmlns:a4j="http://richfaces.org/a4j"
       xmlns:rich="http://richfaces.org/rich"
       xmlns:c="http://java.sun.com/jstl/core"
       xmlns:ui="http://java.sun.com/jsf/facelets">
       <f:view>
       <rich:modalPanel onshow="ajustaModal();" id="jasperViewer" label="0" top="0" keepVisualState="true">
       <f:facet name="header">
       <h:outputText value="Visualização de relatórios - "/>
       </f:facet>
       <f:facet name="controls">
       <h:panelGroup>
       <h:graphicImage value="/images/close.gif" styleClass="hidelink" id="hidelink"/>
       <rich:componentControl for="jasperViewer" attachTo="hidelink" operation="hide" event="onclick"/>
       </h:panelGroup>
       </f:facet>
       <applet mayscript="1" width="100%" height="100%">
       <param name ="CODE" value="com.prosul.portal.reports.jasper.appletviewer.ReportAppletViewer.class" />
       <param name ="CODEBASE" value="#{facesContext.externalContext.requestContextPath}/lib" />
       <param name ="ARCHIVE" value="#{facesContext.externalContext.requestContextPath}/lib/jasper-reports-framework.jar" />
       <param name="TYPE" value="application/x-java-applet;version=1.6.0" />
       <param name="REPORT_URL" value="#{performanceProjetosMBean.urlResult}" />
       </applet>
       </rich:modalPanel>
       </f:view>
      </html>


      Does anybody have an example of what attributes in a4j:mediaOutput I should use to replace the ones i'm using in the applet tag to acomplish this?

      To make things more clearly, I'm trying to do this because as you can see in the code above I'm using a URL parameter that is the url to the report file saved on disk and i don't wanted to save it, i wanted to send it as a stream to the applet and a4j:mediaOutput have this capability.

      Sorry for my poor English.

      Thanks,
      Paulo R.