Issue with reRender from rich:fileUpload component
valatharv Oct 23, 2013 3:00 PMHi,
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..
<code>
<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}"
actionListener="#{fileUploadHome.fileWrapper.setComplete(true)}"/>
</rich:fileUpload>
<rich:panel id="infoFile">
<rich:dataTable value="#{itemHome.fileUpload}" var="file" id="fileRecordsTable">
<h:column>
<f:facet name="header">ItemName</f:facet>
<h:outputText value="#{file.fileName}"/>
</h:column>
</rich:dataTable>
</rich:panel>
</h:panelGrid>
</a4j:region>
</rich:panel>
<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}"/>
</s:decorate>
</a4j:repeat>
</rich:panel>
</code>