jsf - oncomplete does not hide <p:dialog dynamic="true"> -
i have <p:dialog dynamic="true"> shown on start of <p:commandbutton>.
<h:form id="form"> <p:commandbutton value="#{bundlecomunes.guardar}" actionlistener="#{savebb.save}" onstart="pf('savedialog').show()" update="@form" oncomplete="pf('savedialog').hide()" /> <p:dialog dynamic="true" widgetvar="savedialog"> guardando<br></br> <p:graphicimage value="/img/ajaxloadingbar.gif" /> </p:dialog> </h:form> it shows dialog, never hides on complete. if remove dynamic="true", works.
<h:form> <p:commandbutton ... update="@form" /> <p:dialog dynamic="true"> ... </p:dialog> </h:form> you're updating form dynamic dialog sitting in, causing corrupted because it's after update not same dialog anymore when opened.
change update="@form" more specific not cover dialog, or, better yet, move dialog outside form, preferably bottom of body.
<h:form> <p:commandbutton ... update="@form" /> </h:form> ... <p:dialog dynamic="true"> ... </p:dialog>
Comments
Post a Comment