funcion AJAX para interceptar errores en peticiones AJAX (no funciona).
This commit is contained in:
@@ -25,6 +25,10 @@
|
|||||||
function startLogin() {
|
function startLogin() {
|
||||||
PF('btnLogin').disable();
|
PF('btnLogin').disable();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function onAjaxError() {
|
||||||
|
alert('Ajax error');
|
||||||
|
}
|
||||||
</h:outputScript>
|
</h:outputScript>
|
||||||
<h:body>
|
<h:body>
|
||||||
<p:growl id="messages" globalOnly="true" sticky="false" showDetail="true" life="15000" />
|
<p:growl id="messages" globalOnly="true" sticky="false" showDetail="true" life="15000" />
|
||||||
@@ -33,12 +37,12 @@
|
|||||||
<h:graphicImage library="images" name="logo-small.png" />
|
<h:graphicImage library="images" name="logo-small.png" />
|
||||||
</div>
|
</div>
|
||||||
<div id="menuDiv" style="margin-bottom: 10px;">
|
<div id="menuDiv" style="margin-bottom: 10px;">
|
||||||
<p:ajaxStatus style="width:32px; height:32px; position:fixed; right:32px; bottom:32px">
|
<p:ajaxStatus style="width:32px; height:32px; position:fixed; right:32px; bottom:32px" onerror="onAjaxError()">
|
||||||
<f:facet name="start">
|
<f:facet name="start">
|
||||||
<i id="loginSpin" class="pi pi-spin pi-spinner" style="font-size: 3em"></i>
|
<i id="loginSpin" class="pi pi-spin pi-spinner" style="font-size: 3em"></i>
|
||||||
</f:facet>
|
</f:facet>
|
||||||
|
|
||||||
<f:facet name="error">Se ha producido un error!</f:facet>
|
<f:facet name="error">Error!</f:facet>
|
||||||
</p:ajaxStatus>
|
</p:ajaxStatus>
|
||||||
|
|
||||||
<h:form id="frmLogin">
|
<h:form id="frmLogin">
|
||||||
|
|||||||
Reference in New Issue
Block a user