1 Reply Latest reply on Oct 24, 2013 4:01 PM by valatharv

    Issue with reRender from rich:fileUpload component



      I am not sure if reRender from rich:fileUpload is still an issue it is reported by users in the past but I am not able to find the solution.

      Environment : richfaces 3.3.1.GA, jboss-4.2.3, jboss-seam-2.0.2.SP1


      Issue Summay :

      - I simply wan't to reRender "itemPanel" using a4j:support used in rich:fileUpload but it is not working where as infoFile renders correctly.

      - I tried setting it render to true in backing bean (action="#{itemHome.renderItemPanel}") but no success... though Values are set correctly in backing bean

      - If I Refresh the page itemPanel displays the result.

      Request you to please suggest on possible workarounds..



      <rich:panel id="filePanel" label="Attache file">

      <f:facet name="header">Upload file</f:facet>

        <a4j:region renderRegionOnly="true">

        <h:panelGrid columns="3" >

        <rich:fileUpload id="upload" autoclear="true" fileUploadListener="#{fileUploadHome.listener}"

             maxFilesQuantity="#{fileUploadHome.uploadsAvailable}" immediateUpload="true" acceptedTypes="csv"  allowFlash="false"noDuplicate="true">
                <a4j:support event="onclear" reRender="upload, infoFile, itemPanel" action="#{fileUploadHome.fileWrapper.clear}"/>

                <a4j:support event="onuploadcomplete" reRender="infoFile, itemPanel" action="#{itemHome.renderItemPanel}"




        <rich:panel id="infoFile">

             <rich:dataTable value="#{itemHome.fileUpload}"   var="file" id="fileRecordsTable">


                       <f:facet name="header">ItemName</f:facet>   

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








      <rich:panel id="itemPanel" rendered="#{itemHome.renderItemPanel}">

        <f:facet name="header">#{itemHome.managed ? 'Edit' : 'Add/ Edit'} Item</f:facet>

        <a4j:repeat value="#{itemHome.itemList}" var="info" >

             <s:decorate id="itemNameField" template="layout/edit.xhtml">                 

                  <h:outputText id="itemName" required="true" value="#{info.itemName}"/>