<
From version < 3.14 >
edited by Thomas Mortagne
on 2014/11/12
To version < 4.1 >
edited by Thomas Mortagne
on 2014/11/12
>
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -171,8 +171,10 @@
171 171  
172 172  = For Developers =
173 173  
174 -== Velocity macros to display users and groups ==
174 +== Velocity improvements ==
175 175  
176 +=== Velocity macros to display users and groups ===
177 +
176 176  We extracted the code that displays in view mode a property of type 'List of Users' and 'List of Groups' from the corresponding custom displayers (found in ##displayer_users.vm## and ##displayer_groups.vm##) into two Velocity macros that can be used to display arbitrary users and groups, even when you don't have an object. Here's how you can use them:
177 177  
178 178  {{code language="none"}}
... ... @@ -210,13 +210,13 @@
210 210  {{/velocity}}
211 211  {{/code}}
212 212  
213 -== New Velocity Tools ==
215 +=== New Velocity Tools ===
214 214  
215 215  * New URL Tool ##$urltool##: A [[new tool>>extensions:Extension.Velocity Module||anchor="HVelocityTools"]] has been added with one method to parse query string from the URL ##$urltool.parseQuery(String)##. The value returned by this is method is a ##Map<String, List<String>>## which maps parameter names to (possibly multiple) values, and can be passed e.g. directly into ##$escapetool.url(Map<String, ?>)## to convert it back to a string. This is useful e.g. in cases where one want to pass a complete query string around between requests, as it happend for the PDF export; the ##$urltool## allows for a sane deserialization of the value passed around.
216 216  * New Exception Tool ##$exceptiontool##: A [[new tool>>extensions:Extension.Velocity Module||anchor="HVelocityTools"]] to manipulate Java Exceptions (get root cause, convert into String, etc).
217 217  * ##$stringtool## moved from ##org.apache.commons.lang3.StringUtils## to ##org.xwiki.text.StringUtils## which extends the first one and add new stuff
218 218  
219 -== Ability to catch Exceptions from Velocity ==
221 +=== Ability to catch Exceptions from Velocity ===
220 220  
221 221  A new Velocity Directive has been added to catch Exceptions from Velocity. In addition a new ###displayUnhandledException()## velocity macro has also been added to nicely display an exception to the user.
222 222  
... ... @@ -255,7 +255,7 @@
255 255  
256 256  {{image reference="ReleaseNotesXWiki63M1@renderingerror.png"/}}
257 257  
258 -== New #displayException macro ==
260 +=== New #displayException macro ===
259 259  
260 260  Displays an error message with a title that can be clicked and expands to display an exception.
261 261  

Get Connected