Ajax component updates before actionListener called?
问题 I am using PrimeFaces <p:dialog> to launch a popup html page and <p:commandButton> to close it: This is what I do when Ok button is pressed: <p:commandButton id="submitButton" value="OK" actionListener="#{MultiFileSelectMgmtBean.actionOk}" update=":formID:fileTreeID" oncomplete="dlg1.hide();"/> Problem is that fileTreeID is updated before action listener is done. How do I force actionOk() to be called first, and then fileTreeID to be updated? Edit : The problem is that popup page B (