Primefaces how to update content in a dialog and keep the dialog centered?
问题 I have a dialog that contains no content on page load and I'm dynamically setting the content of a dialog box based on the link that a user clicks on. <p:dialog widgetVar="dlg" modal="true" id="dialog"> <p:panel id="fullArticle"> <h:outputText value="#{content.newsArticle}" escape="false" /> </p:panel> </p:dialog> ... ... <p:commandLink value="Read more" actionListener="#{content.getFullArticle}" onclick='dlg.show();' update=":fullArticle"> <f:attribute name="contentId" value="#{news