Code source wiki de test

Version 82.1 par Jip-jan Alunkel le janvier 26, 21:23

Masquer les derniers auteurs
Jip-jan Alunkel 69.2 1 {{velocity}}
Jip-jan Alunkel 69.3 2 {{html wiki="true"}}
Jip-jan Alunkel 72.2 3
Jip-jan Alunkel 76.1 4 #set($dr = "bladibla.vinnymossel")
Jip-jan Alunkel 78.1 5 #set($docrefArray = $dr.split("\."))
Jip-jan Alunkel 75.1 6 ##set($drSpaceA = $docrefArray[0])
7 ##set($drSpaceB = $docrefArray[1])
Jip-jan Alunkel 73.2 8 #set($docref = $services.model.createDocumentReference($xcontext.mainWikiName, ['bladibla', 'vinnymossel'], 'WebHome'))
Jip-jan Alunkel 72.2 9
Jip-jan Alunkel 80.1 10 #set($chain = "")
11 #foreach($space in $docrefArray)
Jip-jan Alunkel 81.2 12 #if($foreach.count == 0)
13 #set($comma = "")
14 #else
15 #set($comma = ", ")
16 #end
17 #set($chain = "${chain}${comma}'${space}'")
Jip-jan Alunkel 80.1 18 #end
19 $chain
Jip-jan Alunkel 72.2 20
21
22
23
24
25
26
27
Jip-jan Alunkel 70.3 28 ##set($obj = $doc.getObject('test.WebHome'))
29 ##set($class = $obj.xWikiClass) ## access the class object representing SomeSpace.SomeClass
Jip-jan Alunkel 70.2 30 $doc.display("blaat")
Jip-jan Alunkel 1.1 31
Jip-jan Alunkel 54.1 32 #set ($doc=$xwiki.getDocument("cases.ear.ears fell off while biking"))
33 #set ($xobject = $doc.getObject('cases.Code.casesClass'))
Jip-jan Alunkel 55.1 34 #set ($xclass = $xobject.xWikiClass)
35 #foreach ($property in $xclass.properties)
Jip-jan Alunkel 60.1 36 $xobject.getProperty($property.name).value
37 ## $property.name
Jip-jan Alunkel 55.1 38 #end
Jip-jan Alunkel 67.1 39 $stringtool.capitalize( "fred from jupiter" )
Jip-jan Alunkel 55.1 40 #*
41 #set ($xdoc=$xwiki.getDocument($Formulier))
42 #set ($xobject = $xdoc.getObject('Main.Werkwijze.Formulieren.Code.FormulierenClass'))
Jip-jan Alunkel 54.1 43 #set ($xclass = $xobject.xWikiClass)
44 #foreach ($property in $xclass.properties)
45 $property.Name
46 $property.value
47 #end
Jip-jan Alunkel 55.1 48
49 #set ($xclass = $xobject.xWikiClass)
50 #foreach ($property in $xclass.properties)
51 $property.Name
52 $property.value
53 #end
54 *#
Jip-jan Alunkel 61.1 55
56 $xwiki.getURL('.')
Jip-jan Alunkel 53.1 57 {{/html}}
Jip-jan Alunkel 68.2 58
Jip-jan Alunkel 68.6 59 $doc.display("blaat")
Jip-jan Alunkel 71.1 60
Jip-jan Alunkel 72.1 61 $hasAdmin
Jip-jan Alunkel 47.1 62 {{/velocity}}
63