I followed this excellent example Warn user of unsaved data in JSF
The results are almost perfect.
I get the prompt during submit always. How does this example turn off the message? I thought the $form.submit did that but it doesn't work for me. What did I miss?
My page submits like this:
<h:commandLink value="Save" action="#{report.saveReport}" >
<f:param name="id" value="#{report.id}"/>
<f:param name="name" value="#{report.name}"/>
</h:commandLink>