-
1. rich:fileUpload uploadcomplete event fired only once
ppitonak May 23, 2011 10:41 AM (in response to farkyss)Hi Mark,
I tried similar use-case in my application and it works (at least it fires Ajax request the second time). However, in your case, two Ajax requests are fired for each uploaded file which is probably not what you want.
You can try to put image preview box inside auto-rendered a4j:outputPanel:
<rich:fileUpload id="uploadls" acceptedTypes="jpg,bmp,gif,png" fileUploadListener="#{surveyForm.bannerlsListener}" styleClass="fu"/>
<a4j:outputPanel ajaxRendered="true">
your image preview box will go here
</a4j:outputPanel>
Regards,
Palo
-
2. rich:fileUpload uploadcomplete event fired only once
farkyss May 23, 2011 11:34 AM (in response to ppitonak)Thanks for the response, Pavol.
While using <a4j:outputPanel> is useful, and removes the need to list every item that gets updated on an Ajax call, putting the image preview box inside it produces identical results to before - on the first upload, the uploadListener is called, and the preview is rerendered. On the second upload, the uploadListener is called, but the preview is NOT rerendered.
-
3. rich:fileUpload uploadcomplete event fired only once
ppitonak May 23, 2011 11:48 AM (in response to farkyss)Which version of RichFaces and Mojarra/MyFaces are you using?
-
4. rich:fileUpload uploadcomplete event fired only once
farkyss May 23, 2011 11:57 AM (in response to ppitonak)Richfaces 4, Mojarra 2.1.0