1 Reply Latest reply on Sep 17, 2010 3:06 AM by flavioeasy

    display message with fileUpload

    flavioeasy

      Hi all,

      i use rich:fileUpload to some files on the server.

      Everything works fine, but while uploading i process the file and then put some info or error messages in a rich:messages component.

      Unfortunately there's no way to view those messages.

      I use richFaces 3.3.3 on tomcat 6.0.20.

      Any hint would be appreciated.

      Flavio

      here is my very simple code :

       

      <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">

       

          <rich:modalPanel id="ESFileUpload4ccUploadPanel" autosized="false" keepVisualState="false"
                           width="500" height="300" headerClass="panel-header-class">
              <f:facet name="header">
                  <h:outputText value="#{mess.titleUpload4ccUpload}"/>
              </f:facet>
              <f:facet name="controls">
                  <span style="cursor:pointer" onclick="javascript:Richfaces.hideModalPanel('ESFileUpload4ccUploadPanel')">X</span>
              </f:facet>
              <h:form id="ESUploadFile4ccUploadPanelForm">
                  <rich:fileUpload fileUploadListener="#{esFileUpload.listener}"
                                   maxFilesQuantity="#{esFileUpload.uploadsAvailable}"
                                   id="ESUploadFile4ccFormUpload"
                                   immediateUpload="#{esFileUpload.autoUpload}"
                                   acceptedTypes="txt, xls, xlsx" allowFlash="#{ESFileUploadBean.useFlash}">
                      <a4j:support event="oncomplete" reRender="ESUploadFile4ccUploadPanelForm" />
                  </rich:fileUpload>
                  <rich:panel id="ESUploadFile4ccUploadPanelFormErr">
                      <rich:messages infoClass="msg-info-class" errorClass="msg-err-class" layout="list"></rich:messages>
                  </rich:panel>
              </h:form>
          </rich:modalPanel>
      </html>