4 Replies Latest reply on Jul 10, 2008 9:38 AM by ilya_shaikovsky

    RichFaces fileUpload "reRender" attribute

    a.t.aman


      [img]http://pic1.resimupload.com/r5/resim_520503890.bmp[/img]
      Hi,
      As you see in the picture,the "reRender" attribute of <rich:fileUpload/> is not recognised by Eclipse.Is it about taglib?
      When I select a file,the "table" which shows the uploaded files,is not be rendered by fileUpload.
      I use RichFaces v.3.2.1.

      <?xml version="1.0" encoding="ISO-8859-1" ?>
      <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page"
       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">
      <html xmlns="http://www.w3.org/1999/xhtml">
      <ui:composition>
      
       <style>
      .top {
       vertical-align: top;
      
      }
      .info {
       height: 202px;
       overflow: auto;
      }
      </style>
      
       <h:form>
       <h:panelGrid columns="2" columnClasses="top,top">
       <rich:fileUpload fileUploadListener="#{fileUploadBean.listener}"
       maxFilesQuantity="#{fileUploadBean.uploadsAvailable}"
       reRender="table" id="upload"
       immediateUpload="#{fileUploadBean.autoUpload}"
       acceptedTypes="jpg, gif, png, bmp">
       <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}"
       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>
       </h:form>
      </ui:composition>
      
      
      
      </html>
      </jsp:root>