i have a strange problem with a p:message tag. On page a have a dataTable with data from my db that i can edit in a p:dialog. Once all validations succeds and the update in db is done i refresh the dataTable and add a faces message info to display the succes of the operation. In the front-end i update the form whom contains both the dataTable and the dialog. My problem is that the message is displayed but almost instantly disapears. It's like the message tag is updated with the form. I don't get it.
I have tried to move the message tag in & out of the form in didn't change anything. I have tried to tweak the remoteCommand to update just the dataTable and the dialog but it didn't work.
<p:messages autoUpdate="true" showDetail="true" severity="info,error" />
<h:form id="form">
<p:dataTable
style="width: 80%; margin-left: auto; margin-right: auto; text-align:center"
var="achievement" value="#{achievementBean.listAchievement}">
...
</p:dataTable>
<p:dialog header="#{i18n['achievement']}" widgetVar="dlg"
dynamic="true" closable="false" resizable="false" showEffect="fade"
hideEffect="fade">
<h:panelGroup id="achievementDetail">
<p:messages autoUpdate="true" severity="warn" />
...
<h:panelGrid columns="2" style="width: 100%; text-align:center">
<p:commandButton value="#{i18n['general.submit']}"
icon="fa fa-check"
actionListener="#{achievementBean.submitAchievement}"
oncomplete="if(!args.validationFailed){updateForm();}" />
<p:commandButton value="#{i18n['general.cancel']}"
icon="fa fa-close" action="#{achievementBean.submitCancel}"
oncomplete="PF('dlg').hide();" update="@form" process="@this" />
</h:panelGrid>
<p:remoteCommand name="updateForm" update="@form" />
</h:panelGroup>
</p:dialog>
</h:form>