I have a commandButton
in my .xhtml page:
<p:commandButton action="#{someone.doSomething()}"
ajax="true"
onerror="errorDialog.show();">
</p:commandButton>
It's simply making an Ajax call. How can I detect situations such as internet connection problem (of the client/browser), timeout, session-timeout, server-side exceptions, crashes etc in the middle of an Ajax call so as to show an informative message to the user?
Does the onerror
attribute of p:ajax
handle all of those? If not, then what? :)
What's the default timeout btw?
Any help appreciated, thanks.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…