Changes for page Macros

Last modified by Jip-jan Alunkel on April 15, 18:09

From version 2.163
edited by Jip-jan Alunkel
on July 14, 00:07
Change comment: Update document after refactoring.
To version 2.172
edited by Jip-jan Alunkel
on July 14, 01:06
Change comment: Update document after refactoring.

Summary

Details

Page properties
Content
... ... @@ -170,17 +170,21 @@
170 170   #elseif($O_elementData.select-json)
171 171   #if($O_elementData.select-json.keySet())
172 172  json
173 -#set($json = $O_elementData.select-json)
173 + #set($json = $O_elementData.select-json)
174 174   #else
175 175   #set ($queryString = $escapetool.url({
176 176   'xpage': 'plain',
177 177   'outputSyntax': 'plain'
178 178   }))
179 - #set ($json = $xwiki.getURL('$O_elementData.select-json', 'get', $queryString))
180 -## #set($json = $xwiki.getDocument($O_elementData.select-json).getContent())
179 +## #set ($json = $xwiki.getURL($O_elementData.select-json, 'get', $queryString))
180 + #set($json = $xwiki.getDocument($O_elementData.select-json))
181 + #set($discard = $json.setContentType('application/json'))
182 +
183 + #set($json = $jsontool.serialize($json.getContent()))
181 181  ##$jsontool.serialize($json)
185 +##$jsontool.fromString($json)
182 182  $json
183 -not json
187 +create json from page
184 184  
185 185   #end
186 186   #foreach($key in $json.keySet())