Re: [Xsltforms-support] XSLTForms and REST
Brought to you by:
alain-couthures
From: Grégoire C. <gco...@gm...> - 2011-02-11 16:53:16
|
Hi! Le 11/02/2011 16:58, Efraim Feinstein a écrit : > To get response codes, the XForms spec says that you should be able to > catch xf:submit-done or xf:submit-error and use the event() function > to get the response codes and reasons, as described in > http://www.w3.org/TR/xforms11/#submit . As far as I could tell, it > doesn't work in XSLTForms. Very bad news! Alain, is this something that will be implemented someday? Is it difficult to read the HTTP status code from JavaScript? > One way to work around the latter issue is to catch the error in your > server side script before it returns and send back some XML describing > the error/error code to the client, which can then handle > xforms-submit-done differently if it receives the error code (the > conditional xf:action/@if is helpful here). It's ugly, but it does work. Well, using XML error codes is what I do at the moment. But as I got a better understanding of REST <http://library.dzone.com/sites/all/files/refcardz/rc129-010d-rest_1.pdf>, I want to make my server RESTful level 2 and this requires the use of HTTP status codes. Thank you for your answer Efraim! Best regards, Grégoire |