Changes for page Best Practices
Last modified by Vincent Massol on 2017/09/05
To version 8.4
edited by Denis Gervalle
on 2015/12/13
on 2015/12/13
Change comment:
fix code error in sample for error handling
Summary
-
Page properties (2 modified, 0 added, 0 removed)
Details
- Page properties
-
- Author
-
... ... @@ -1,1 +1,1 @@ 1 -XWiki. VincentMassol1 +XWiki.dgervalle - Content
-
... ... @@ -65,7 +65,7 @@ 65 65 ## No-JavaScript here. What now!? Redirect? 66 66 #handleErrorHere($request.xredirect) 67 67 #end 68 -#e lse68 +#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.