Hi,
I have the following code, ajax status dialog, and panelgrid in which there is a fileupload component.
In this code snippet when i upload the file the ajaxStatus dialog shows up but newer closes, besides the file is successfully uploaded.
(I think with file upload there is no need to show ajax status due to the integrated progressbar in fileupload component in advanced mode)
I figured it out that the problamatic part is update="wrapper" attribute. If i delete this attribute, everything is ok, however i need to update the component.
<p:ajaxStatus onstart="statusDialog.show();" onsuccess="statusDialog.hide();"/>
<p:dialog modal="true" widgetVar="statusDialog" header="Status" draggable="false" closable="false">
<p:graphicImage value="/images/ajaxloadingbar.gif" />
</p:dialog>
<h:panelGrid columns="1" id="wrapper">
<h:form id="imageUploadForm" rendered="#{fileUploadBean.uploadedImageUrl == null}" >
<p:fileUpload fileUploadListener="#{fileUploadBean.handleFileUpload}"
mode="advanced"
update="wrapper"
auto="true"
sizeLimit="100000"
allowTypes="/(\.|\/)(gif|jpe?g|png)$/" />
</h:form>
<h:form rendered="#{fileUploadBean.uploadedImageUrl != null}">
<p:imageCropper value="#{fileUploadBean.croppedImage}"
image="#{fileUploadBean.uploadedImageUrl}"
initialCoords="225,75,300,125" aspectRatio="1" backgroundOpacity="0.5" />
</h:form>
</h:panelGrid>
Thanks...
fileUpload and ajaxStatus
Hey ahmetcemrek,
i have exactly the same problem, and would like to know whats wrong here.
*push*
i have exactly the same problem, and would like to know whats wrong here.
*push*
PrimeFaces version:
using Primefaces 5.2.11 on a Glassfish v4.1 Server
Additional Libraries:
using PrimeFaces Extensions 3.2
using OmniFaces 2.1
Additional Books:
PrimeFaces Cookbook
using Primefaces 5.2.11 on a Glassfish v4.1 Server
Additional Libraries:
using PrimeFaces Extensions 3.2
using OmniFaces 2.1
Additional Books:
PrimeFaces Cookbook
-
- PrimeFaces Core Developer
- Posts: 3979
- Joined: 03 Dec 2010, 14:11
- Location: Bavaria, DE
- Contact:
AFAIK FileUpload does not upload with ajax. Its using an own iframe or so.
Thomas Andraschko
PrimeFaces | PrimeFaces Extensions
Apache Member | OpenWebBeans, DeltaSpike, MyFaces, BVal, TomEE
Sponsor me: https://github.com/sponsors/tandraschko
Blog: http://tandraschko.blogspot.de/
Twitter: https://twitter.com/TAndraschko
PrimeFaces | PrimeFaces Extensions
Apache Member | OpenWebBeans, DeltaSpike, MyFaces, BVal, TomEE
Sponsor me: https://github.com/sponsors/tandraschko
Blog: http://tandraschko.blogspot.de/
Twitter: https://twitter.com/TAndraschko
Reviving an old post...
I had the same problem. The p:fileUpload doesn't seem to close such a dialog per se (while I think it should).
The fix that worked for me is when using update="..." you also need
along with widgetVar="statusDialog" on the status dialog, of course.
Karsten
I had the same problem. The p:fileUpload doesn't seem to close such a dialog per se (while I think it should).
The fix that worked for me is when using update="..." you also need
Code: Select all
oncomplete="statusDialog.hide();"
Karsten
PrimeFaces 13, Mojarra 4.0, WildFly 31, Jakarta 10 + PrimeReact
- andyba
- Expert Member
- Posts: 2473
- Joined: 31 Mar 2011, 16:27
- Location: Steinfeld, near Bremen/Osnabrück, DE
- Contact:
Don't indulge in Thread Necromancy.kwutzke wrote:Reviving an old post...
I had the same problem. The p:fileUpload doesn't seem to close such a dialog per se (while I think it should).
The fix that worked for me is when using update="..." you also need
along with widgetVar="statusDialog" on the status dialog, of course.Code: Select all
oncomplete="statusDialog.hide();"
Karsten
If you have a question or problem that needs solving OR you want to share some startling revelation with us, start a new Thread. If you need to provide context, link the old thread.
The forum rules can be reached by following the link at the end of this post, read them.
PF 4.x (Elite versions), PF 5, Pf 5.1, PF 6.0
Glassfish 4.1, Mojarra 2.x, Java 8, Payara 4.1.1.
If you haven't read the forum rules read them now
Glassfish 4.1, Mojarra 2.x, Java 8, Payara 4.1.1.
If you haven't read the forum rules read them now
-
- Information
-
Who is online
Users browsing this forum: No registered users and 44 guests