Changes for page AddObjects
Last modified by Thomas Mortagne on 2014/06/30 08:43
From version 2.1
edited by Thomas Mortagne
on 2014/06/30 08:42
on 2014/06/30 08:42
Change comment:
There is no comment for this version
To version 3.1
edited by Thomas Mortagne
on 2014/06/30 08:43
on 2014/06/30 08:43
Change comment:
There is no comment for this version
Summary
-
Page properties (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -1,14 +1,16 @@ 1 1 {{velocity}} 2 +#set($tagsDocument = $xwiki.getDocument('Test.TagsDocument')) 3 + 2 2 ## Create an object 3 -#set($obj = $ doc.newObject("XWiki.TagClass"))5 +#set($obj = $tagsDocument.newObject("XWiki.TagClass")) 4 4 $obj.set("tags", "tag0") 5 5 6 -#set($obj = $ doc.newObject("XWiki.TagClass"))8 +#set($obj = $tagsDocument.newObject("XWiki.TagClass")) 7 7 $obj.set("tags", "tag1") 8 8 9 -#set($obj = $ doc.newObject("XWiki.TagClass"))11 +#set($obj = $tagsDocument.newObject("XWiki.TagClass")) 10 10 $obj.set("tags", "tag2") 11 11 12 12 ## Save the object in the page 13 -$ doc.save()15 +$tagsDocument.save() 14 14 {{/velocity}}