0 Replies Latest reply on Jan 4, 2013 9:36 AM by Amitkumar Dalvi

    firefox 17.0.1 and rich:datagrid/a4j:mediaOutput

    Amitkumar Dalvi Newbie

      i have a problem regarding rich:datagrid/a4j:mediaoutput.

      i am using jsf2 and richfaces.

       

      my code is as follows

        <h:panelGrid columns="2" columnClasses="top,top">

                  <rich:fileUpload fileUploadListener="#{fileUploadBean.listener}"

                      maxFilesQuantity="#{fileUploadBean.uploadsAvailable}"

                      id="upload"

                      immediateUpload="#{fileUploadBean.autoUpload}"

                      acceptedTypes="jpg, gif, png, bmp" allowFlash="#{fileUploadBean.useFlash}">

                      <a4j:support event="onuploadcomplete" reRender="info" />

                  </rich:fileUpload>

                  <h:panelGroup id="info">

                      <rich:panel bodyClass="info">

                          <f:facet name="header">

                              <h:outputText value="Uploaded Files Info" />

                          </f:facet>

                          <h:outputText value="No files currently uploaded"

                              rendered="#{fileUploadBean.size==0}" />

                          <rich:dataGrid columns="1" value="#{fileUploadBean.files}"

                              var="file" rowKeyVar="row">

                              <rich:panel bodyClass="rich-laguna-panel-no-header">

                                  <h:panelGrid columns="2">

                                      <a4j:mediaOutput element="img" mimeType="#{file.mime}" session="false"

                                          createContent="#{fileUploadBean.paint}" value="#{row}"

                                          style="width:100px; height:100px;" cacheable="false">

                                          <f:param value="#{fileUploadBean.timeStamp}" name="time"/>

                                      </a4j:mediaOutput>

                                      <h:panelGrid columns="2">

                                          <h:outputText value="File Name:" />

                                          <h:outputText value="#{file.name}" />

                                          <h:outputText value="File Length(bytes):" />

                                          <h:outputText value="#{file.length}" />

                                      </h:panelGrid>

                                  </h:panelGrid>

                              </rich:panel>

                          </rich:dataGrid>

                      </rich:panel>

                      <rich:spacer height="3"/>

                      <br />

                      <a4j:commandButton action="#{fileUploadBean.clearUploadData}"

                          reRender="info, upload" value="Clear Uploaded Data"

                          rendered="#{fileUploadBean.size>0}" />

                  </h:panelGroup>

              </h:panelGrid>

       

      my fileUploadListener works  works fine but the only problem is a4j:mediaOutput paint() is no getting called.

      but the

      <h:outputText value="File Name:" />

                                          <h:outputText value="#{file.name}" />

                                          <h:outputText value="File Length(bytes):" />

                                          <h:outputText value="#{file.length}" />

       

       

      prints the filename and the file length. only the image is not getting displayed.

       

      i am getting this following exception

      javax.faces.FacesException: Error decode resource data

                at org.ajax4jsf.resource.ResourceBuilderImpl.decrypt(ResourceBuilderImpl.java:627)

                at org.ajax4jsf.resource.ResourceBuilderImpl.getResourceDataForKey(ResourceBuilderImpl.java:371)

                at org.ajax4jsf.resource.InternetResourceService.serviceResource(InternetResourceService.java:156)

                at org.ajax4jsf.resource.InternetResourceService.serviceResource(InternetResourceService.java:141)

                at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:508)

                at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)

                at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

                at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)

                at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)

                at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

                at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)

                at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)

                at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)

                at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)

                at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)

                at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)

                at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)

                at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)

                at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)

                at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)

                at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)

                at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)

                at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:598)

                at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)

                at java.lang.Thread.run(Unknown Source)

      Caused by: java.util.zip.DataFormatException: invalid bit length repeat

                at java.util.zip.Inflater.inflateBytes(Native Method)

                at java.util.zip.Inflater.inflate(Unknown Source)

                at java.util.zip.Inflater.inflate(Unknown Source)

                at org.ajax4jsf.resource.ResourceBuilderImpl.decrypt(ResourceBuilderImpl.java:621)

                ... 24 more

       

      can anyone help me with this pls