JSF2 + RichFaces4 - problem with <rich:fileUpload />
gtludwig Jun 24, 2011 10:08 AMHi all,
I've been at this problem for a little while now and would like some help with it. The issue is very similar to the one discussed here:
http://community.jboss.org/thread/162986?start=0&tstart=0
My page calls has a <rich:fileUpload /> component which opens the file selector menu, uploads one and several files, autocloses, is resizeable, so I deem it to be working as should. It also has a fileUploadListener which points to a method on the managed bean. The issue here is that this method is never accessed.
The page snippet:
<rich:fileUpload id="popupFileUpload"
title="Indique o caminho do arquivo a carregar"
acceptedTypes="xls, xlsx"
uploadData="#{assemblyMB.batchList}"
fileUploadListener="#{assemblyMB.listener}"
maxFilesQuantity="#{assemblyMB.uploadsAvailable}" listHeight="250"
listWidth="400"
onuploadcomplete="#{rich:component('popup')}.hide(); return false;"
noDuplicate="true" />
</a4j:outputPanel>
The managed bean's listener method is this:
public void listener(FileUploadEvent event) throws Exception {
upFile = event.getUploadedFile();
System.out.println("listener: " + upFile.getName());
}
Whenever I try to upload a file (or files), the file(s) are uploaded properly on the component, but nothing seems to arrive at the managed bean.
I uploaded two images for more information. Picture jbtools1.png shows the IDE (Eclipse Helios SR2), the list of libs, the managed bean method, some of the startup output (server: Apache Tomcat/6.0.32, JSF implemetation: Mojarra 2.0.6). Picture jbtools2.png shows the <rich:fileUpload /> component with one file uploaded - which produced no output expected from the listener.
Please help me with debugging this!
Thanks in advance,
GTLudwig
-
jbtools2.png 21.9 KB
-
jbtools1.png 229.0 KB