2 Replies Latest reply on Jan 9, 2012 9:50 AM by Ricardo Giron

    fileupload listener

    Ricardo Giron Newbie

      Hello, newbie question. I'm trying to figure out how to make the example work. I basically copied all the files from the example and for gui I placed it on a modal panel which is shown when a button is pressed.


      the problem I'm having is that even though the fileupload box says it uploaded the file, nothing is to be found. the box on the side doesn't update with anything. I tried debugging and the listener is never called. I tried some of the solutions posted around here, well basically just allowing flash and setting autoupload to false but I'm having the problem still.


      please help me



      here is the jsp code



      <%@ include file="/pages/common/taglibs.jsp"%>
      <rich:modalPanel id="FileUploadBox" autosized="true" style="overflow:auto;" rendered="#{fileUploadBean != null}"
           <a4j:form id="FileUpload">
             <%@ include file="/pages/common/statusQueue.jsp"%>
                     <DIV id="screen" class="width4">
                       <h:panelGroup styleClass="tituloPagina">
                       <h:outputText value="File Upload" styleClass="tituloPagina" />
                       <rich:spacer styleClass="separadorTitulo" />
                          <br />
                       <h:form enctype="multipart/form-data">
                       <h:panelGrid columns="2" columnClasses="top,top">
                                    maxFilesQuantity="#{fileUploadBean.uploadsAvailable}" id="upload"
                                    immediateUpload="false" acceptedTypes="jpg, gif, png, bmp"
                                    <a4j:support event="onuploadcomplete" reRender="info" />
                            <h:panelGroup id="info">
                            <rich:panel bodyClass="info">
                                 <f:facet name="header">
                                      <h:outputText value="Uploaded Files Info" />
                                 <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}"
                                                                        createContent="#{fileUploadBean.paint}" value="#{row}"
                                                                    style="width:100px; height:100px;" cacheable="false">
                                                                       <f:param value="#{fileUploadBean.timeStamp}" name="time" />
                                                             <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}" />
                                 <rich:spacer height="3" />
                                 <br />
                                 <a4j:commandButton action="#{fileUploadBean.clearUploadData}"
                                           reRender="info, upload" value="Clear Uploaded Data"
                                           rendered="#{fileUploadBean.size>0}" />



      which is basically the example, also attached are the web.xml and the faces config.xml files, maybe the problem is there? fileUploadBean and file are the same from the example.