rich:fileUpload problem
amayen Apr 12, 2008 3:15 PMHi!
I have the following problem, I'm trying to use the rich:fileUpload component to upload files.
When I try to upload a file I get the following message:
15:06:30,218 WARN [lifecycle] /upload/uploadAttachment.xhtml @18,82 fileUploadL istener="#{uploadManager.listener}": Method not found: UploadManagerAction:2c1n7 1n-7zmqne-fey50gkn-1-fey7c0s8-1p.listener(org.richfaces.event.UploadEvent) javax.faces.el.MethodNotFoundException: /upload/uploadAttachment.xhtml @18,82 fi leUploadListener="#{uploadManager.listener}": Method not found: UploadManagerAct ion:2c1n71n-7zmqne-fey50gkn-1-fey7c0s8-1p.listener(org.richfaces.event.UploadEve nt) at com.sun.facelets.el.LegacyMethodBinding.invoke(LegacyMethodBinding.ja va:71) at org.richfaces.component.UIFileUpload.broadcast(UIFileUpload.java:160) at org.ajax4jsf.component.AjaxViewRoot.processEvents(AjaxViewRoot.java:3 16) at org.ajax4jsf.component.AjaxViewRoot.broadcastEvents(AjaxViewRoot.java :289) at org.ajax4jsf.component.AjaxViewRoot.processPhase(AjaxViewRoot.java:24 8) at org.ajax4jsf.component.AjaxViewRoot.processDecodes(AjaxViewRoot.java: 404) at com.sun.faces.lifecycle.ApplyRequestValuesPhase.execute(ApplyRequestV aluesPhase.java:101) at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251) at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:117) at javax.faces.webapp.FacesServlet.service(FacesServlet.java:244) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl icationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF ilterChain.java:206) at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter .java:83) at org.jboss.seam.web.CharacterEncodingFilter.doFilter(CharacterEncoding Filter.java:42) at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter
It is complaining about the method UploadManagerAction.listener method which it apparently doesn't find.
UploadManagerAction implements UploadManager which looks like this:
public interface UploadManager { public int getMaxFilesQuantity(); public void listener(org.richfaces.event.UploadEvent event); public List<Attachment> getAllAttachments(); public void remove(); }
And in the view part I have:
<ui:composition template="/modalTemplate.xhtml"> <ui:define name="modalBody"> <h:form> <s:validateAll> <rich:fileUpload fileUploadListener="#{uploadManager.listener}" maxFilesQuantity="#{uploadManager.maxFilesQuantity}" immediateUpload="true"/> <ui:insert name="buttons">Insert Buttons here</ui:insert> </s:validateAll> </h:form> </ui:define> </ui:composition>
I'm not sure whether this is actually an richfaces, jboss or something other error.
Any comments appreciated.
Thanks in advance
P.S.: I'm using SEAM 2.0.1.GA and richfaces 3.2.0.GA