Changes for page MembershipJson
Last modified by bougault on 2022/03/18 14:34
Summary
-
Page properties (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -1,7 +1,20 @@ 1 +{{velocity output="no"}} 2 +$xwiki.ssx.use('Collaboratory.Apps.HighlightedCollabs.Code.HighlightedCollabsMacro') 3 +#set($query = $services.query.xwql("from doc.object(Collaboratory.Apps.Membership.MembershipRequest.Code.MembershipRequestClass) as req")) 4 +#set($reqs = $query.execute()) 5 +{{/velocity}} 6 + 1 1 {{velocity wiki="false"}} 2 -$response.setContentType('application/json') 3 -{ 4 -"greeting" : "Hello", 5 -"location": "World" 6 -} 8 +## If AJAX call 9 +#if("$!request.outputSyntax" != '') 10 + $response.setContentType('application/json') 11 +#end 12 +{rows:[ 13 +#foreach($req of $reqs) 14 + #set($highlight = $xwiki.getDocument($req)) 15 + { 16 + "title": "$req.getTitle()", 17 + }#if( $foreach.hasNext ), #end 18 +#end 19 +]} 7 7 {{/velocity}}