0 Replies Latest reply on May 24, 2010 5:53 PM by joe.knudsen

    rich:fileUpload allowFlash="true" Firefox 3.6 and Chrome Transfer error occured

    joe.knudsen Newbie

      I am trying to use the flash version of the rich:fileUpload and I get a Transfer error occured on both Firefox 3.6 and Chrome seems to work on IE 8.  I am using richfaces 3.3.1.  I am doing this in a modal panel.  I could go back to not using flash but the ajax in the rich:fileUpload was conflicting with my refreshing of the modal panel.  Any thoughts?

       

       

      <f:subview xmlns="http://www.w3.org/1999/xhtml"
            xmlns:ui="http://java.sun.com/jsf/facelets"
            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">
          <rich:modalPanel id="fileUploadPanel" width="550" height="400">
              <f:facet name="header">
                  <h:panelGroup>
                      <h:outputText value="Upload District and/or MDE Files"></h:outputText>
                  </h:panelGroup>
              </f:facet>
              <f:facet name="controls">
                  <h:panelGroup>
                      <h:graphicImage value="/images/close.png" styleClass="hidelink" id="hidelink"/>
                      <rich:componentControl for="fileUploadPanel" attachTo="hidelink" operation="hide" event="onclick"/>
                  </h:panelGroup>
              </f:facet>
              <div style="margin: 1em">
              <h:outputText
                  value="Please select a file to upload."></h:outputText>
              </div>
              <div style="margin: 1em">
              <h:form id="fileUploadForm">
              <s:decorate>
                <rich:fileUpload id="uploadFile"
                                 listHeight="100px"
                                 listWidth="500px"
                                 maxFilesQuantity="1"
                                 addControlLabel="Browse"
                                 cancelEntryControlLabel="Cancel"
                                 uploadControlLabel="Upload File"
                                 fileUploadListener="#{fileUploadAction.uploadFileListener}"
                                 immediateUpload="true"
                                 allowFlash="true"
                                 progressLabel="File upload in progress...">
                    <f:facet name="label">
                        <h:outputText value="{_KB}KB from {KB}KB uploaded: {mm}:{ss}"/>
                    </f:facet>
                </rich:fileUpload>
                <br/>
                <a4j:outputPanel ajaxRendered="true">         
                <h:messages globalOnly="true" styleClass="message"
                    errorClass="errormsg" infoClass="infomsg" warnClass="warnmsg"/>
                </a4j:outputPanel>
              </s:decorate>
              <br/>
              <a4j:commandButton
                  value="Save"
                  action="#{fileUploadAction.saveFile}"
                  oncomplete="if (#{fileUploadAction.errorFree}) Richfaces.hideModalPanel('fileUploadPanel');"
                  alt="Save"/>
              <span style="padding-right: 1em"/>
              <a4j:commandButton
                  value="Close"
                  immediate="true"
                  oncomplete="Richfaces.hideModalPanel('fileUploadPanel');"
                  alt="Close"/>
              </h:form>
              </div>
              <br/>
          </rich:modalPanel>
      </f:subview>