Open cogare84 opened 2 years ago
Hello,
Jtable processes the server response for you.
If there is an infrastructure problem there will be an HTTP failure, or if jtable does not recognise the response, jtable will show an Alert with "An error occured while communicating to the server."
If your controller completes normally, but recognises it cannot perform the jtable request, it must return a json response {"Result":"ERROR","Message":"your message to your user"}
JTable will then show this message in an Alert box
Note. ERROR must be uppercase.
Goog Luck
Hola. Quisiera saber como puedo controlar cuando da algún error la carga del objeto jtable. El caso es que si se produce un error en el controlador, hago lo siguiente: $jTableResult['Result'] ='error'; pero luego como puedo controlar dicho resultado en la parte donde cargo el div que contiene el objeto jtable? Gracias de antemano y un saludo.