0 Replies Latest reply on Mar 24, 2011 11:54 AM by Nicolai Abruzzese

    Obtaining md5 from a e:workbook (xhtml), doanwloadble excel file

    Nicolai Abruzzese Newbie

      Some help please,
      I have an excel file for download, I need to get the md5 of the file, an xhtml written for the excel is like this:
      exportarExcel.xhtml


      <e:workbook
          xmlns:ui="http://java.sun.com/jsf/facelets"
          xmlns:e="http://jboss.com/products/seam/excel"
          xmlns:f="http://java.sun.com/jsf/core"
          xmlns:s="http://jboss.com/products/seam/taglib"
          xmlns:c="http://java.sun.com/jstl/core">
          <f:loadBundle basename="messages" var="m"/>
           
          <e:worksheet id="listado" var="persona" value="#{busquedaResultado}"  >
      
              <e:column>
                  <f:facet name="header">
                      <e:cell value="#{m['APELLIDO_PATERNO']}"/>
                  </f:facet>
                  <e:cell value="#{persona.apellidoPaterno}"/>
              </e:column>
      
       </e:worksheet>



      This xhtml (excel workbook) is called from an ejb:




      public String exportarExcel(){
              
              //populate the with data #{busquedaResultado} (e:workbook) value, no porblem
              //then call the xhtml, and download box apers and downloads just fine
              return "/exportarExcel.xhtml";
          }



      What I really need is to get and md5 from this download file, get/capture file, pass it to and md5 (that i allready have and then make the download) md5 method will recive as parameter File or ByteArrayOutputStream, well the input can be converted, the problem, how can I get the file before the download???
      Any help really apreatiated. Thanks for your time.