<
From version < 8.3 >
edited by Vincent Massol
on 2015/09/08
To version < 8.4 >
edited by Denis Gervalle
on 2015/12/13
>
Change comment: fix code error in sample for error handling

Summary

Details

Page properties
Author
... ... @@ -1,1 +1,1 @@
1 -XWiki.VincentMassol
1 +XWiki.dgervalle
Content
... ... @@ -65,7 +65,7 @@
65 65   ## No-JavaScript here. What now!? Redirect?
66 66   #handleErrorHere($request.xredirect)
67 67   #end
68 -#else
68 +#end
69 69  {{/code}}
70 70  
71 71  The idea is that you want to pass the error message to the UI but you don`t have a clear way of doing it, like you have for AJAX calls (response code and response text). A solution is to use the Session in order to pass your error message. You set the error in the service and, in the UI, you read and remove it so that it is only displayed once.

Get Connected