Re: [Xsltforms-support] XSLTForms and REST
Brought to you by:
alain-couthures
From: COUTHURES A. <ala...@ag...> - 2011-02-12 19:16:02
|
Grégoire, Efraim, I have extended excellent Kostis' implementation of event contexts to support response headers and response code for both xforms-submit-done and xforms-submit-error. Thank you for your feedbacks! -Alain Le 11/02/2011 17:52, Grégoire COLBERT a écrit : > 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 > > > ------------------------------------------------------------------------------ > The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE: > Pinpoint memory and threading errors before they happen. > Find and fix more than 250 security defects in the development cycle. > Locate bottlenecks in serial and parallel code that limit performance. > http://p.sf.net/sfu/intel-dev2devfeb > > > _______________________________________________ > Xsltforms-support mailing list > Xsl...@li... > https://lists.sourceforge.net/lists/listinfo/xsltforms-support |