This content has been marked as final.
Show 5 replies
-
1. Re: onuploadcomplete don't execute if page with rich:fileUpl
jobb Jul 10, 2008 4:20 AM (in response to jobb)I've forgot to add, testet also with :
<a4j:form id="mainForm" > <a4j:include viewId="/jsf/prodcat/test/fileUpload2.jsf"/> </a4j:form>
and got the same behavior. -
2. Re: onuploadcomplete don't execute if page with rich:fileUpl
andrei_exadel Jul 10, 2008 5:52 AM (in response to jobb)It works for me fine. I tried with <a4j:include>.
Please post more info. -
3. Re: onuploadcomplete don't execute if page with rich:fileUpl
jobb Jul 11, 2008 2:58 AM (in response to jobb)More info here:
Running with richfaces-ui-3.2.2-20080603.044112-2.jar
Start page is as follow:<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%> <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%> <%@ taglib uri="http://richfaces.org/a4j" prefix="a4j"%> <%@ taglib uri="http://richfaces.org/rich" prefix="rich"%> <f:view> <a4j:page> <html> <head> <% String contextPath = request.getContextPath(); %> <link rel="stylesheet" type="text/css" href="<%= contextPath %>/css/theCore.css" /> <link rel="stylesheet" type="text/css" href="<%= contextPath %>/css/infoland.css" /> </head> <body> <a4j:form id="mainForm" > <a4j:include viewId="/jsf/prodcat/test/fileUpload2.jsf"/> </a4j:form> </body> </html> </a4j:page> </f:view>
And /jsf/prodcat/test/fileUpload2.jsf :<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%> <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%> <%@ taglib uri="http://richfaces.org/a4j" prefix="a4j"%> <%@ taglib uri="http://richfaces.org/rich" prefix="rich"%> <h:panelGrid id="urlExampleFil" columns="4" > <h:outputText value="URL eksempel 1" styleClass="labelFormatted"/> <h:inputText value="#{testMBean.url}" styleClass="wInputXLarge left"/> <h:outputText value="pcaUrl" styleClass="labelFormatted right"/> <h:inputText value="#{testMBean.pcaUrl}" style="width: 160px;"/> </h:panelGrid> <h:panelGrid id="fileUploadGrid" > <rich:fileUpload fileUploadListener="#{testMBean.fileUploaded}" > <a4j:support event="onuploadcomplete" reRender="urlExampleFil" actionListener="#{testMBean.getStoredUrl}"/> </rich:fileUpload> </h:panelGrid>
fileUploadListener is fired ok, but onuploadcomplete is not execute at all. -
4. Re: onuploadcomplete don't execute if page with rich:fileUpl
ronanker Jul 15, 2008 5:01 AM (in response to jobb)maybe you can try a jsfunction...
here is a part of our code :<rich:fileUpload id="rich_fileUpload" fileUploadListener="#{upload_handler.uploader.listener}" ... onuploadcomplete='pv_reRenderUploadZone();#{(upload_handler.uploader.maxFiles == 1 )? "closePopupUpload()":""}'> </rich:fileUpload>
<a4j:jsFunction id="reRenderUpload" name="pv_reRenderUploadZone" reRender="rich_fileUpload, _modifForm, #{upload_handler.uploader.uploadZone}"> </a4j:jsFunction>
-
5. Re: onuploadcomplete don't execute if page with rich:fileUpl
daswidanja Jul 15, 2008 5:17 AM (in response to jobb)Yes, it works. Thank you for your tips.