1 Reply Latest reply on Aug 15, 2009 11:13 AM by kukeltje.ronald.jbpm.org

    Iframes and Seam

    mtigua.mtigua.yahoo.es
      Hi everybody,

      I have a JSF page and in a specific place of that page I need to show an html document generated by a response object.

      I solved this problem using an iframe inside the page:

      verExpediente.xhtml

      iframe name="myFrame" align="middle" width="700" height="700" src="cargandoDoc.seam?#{manager.conversationIdParameter}=#{conversation.id}" >


      cargandoDoc.xhtml

      In this page i have a button that call the method "verExpediente.documentoOriginal" that generates the html response. This button call itself automatically when the page is loaded


      <h:commandButton id ="botonMostrarPDF"                                         action="#{visualizador.verDocumento(verExpediente.documentoOriginal)}" value="Visualizando Factura">

      <script language="JavaScript">
              document.getElementById("divOculto").style.visibility='hidden';
              document.getElementById("accionForm:botonMostrarPDF").click();
      </script>

      The question is , are there any ahother elegant way to do this?


      Thanks in advance,
      Mario