Wiki source code of GridExtensionSyntax2

Last modified by JeromeVelociter on 2009/04/21 00:45

Show last authors
1 = Grid Extension in Syntax 2.0 =
2
3 Sample of the Grid Extension in Syntax 2.0
4
5 {{code language=none}}
6 {{velocity}}
7 {{include document="XWiki.GridExtensionMacros2" /}}
8 ## optional GWT prop editor
9 #gwtpropeditor()
10 #set($collist = [ "first_name", "last_name","blog", "imtype", "email", "doc.creator", "_attachment", "_avatar"])
11 #set($colprops = {
12 "first_name" : { "type" : "text" , "size" : 10, "link" : "view"},
13 "last_name" : { "type" : "text" , "size" : 10, "link" : "view"},
14 "blog" : { "type" : "text" , "size" : 20, "link" : "none"},
15 "imtype" : { "type" : "list" , "size" : 1, "link" : "none"},
16 "email" : { "type" : "text" , "size" : 20, "link" : "editor"},
17 "doc.creator" : { "type" : "text" , "size" : 20, "link" : "field"},
18 "_attachment" : { "type" : "none" , "size" : 20, "link" : "none", "html" : "true" },
19 "_photolist" : { "type" : "none" , "size" : 20, "link" : "none", "html" : "true" },
20 "_avatar" : { "type" : "none" , "size" : 20, "link" : "none", "html" : "true" }
21 })
22 ## id of the div, list of columns, columns properties, default column to sort for, class name, nb of items, display or not a tag cloud
23 #grid("users" $collist $colprops "last_name" "asc" "user_" "XWiki.XWikiUsers" 4 true)
24 {{/velocity}}
25 {{/code}}
26
27 {{velocity}}
28 {{include document="XWiki.GridExtensionMacros2" /}}
29 ## optional GWT prop editor
30 #gwtpropeditor()
31 #set($collist = [ "first_name", "last_name","blog", "imtype", "email", "doc.creator", "_attachment", "_avatar"])
32 #set($colprops = {
33 "first_name" : { "type" : "text" , "size" : 10, "link" : "view"},
34 "last_name" : { "type" : "text" , "size" : 10, "link" : "view"},
35 "blog" : { "type" : "text" , "size" : 20, "link" : "none"},
36 "imtype" : { "type" : "list" , "size" : 1, "link" : "none"},
37 "email" : { "type" : "text" , "size" : 20, "link" : "editor"},
38 "doc.creator" : { "type" : "text" , "size" : 20, "link" : "field"},
39 "_attachment" : { "type" : "none" , "size" : 20, "link" : "none", "html" : "true" },
40 "_photolist" : { "type" : "none" , "size" : 20, "link" : "none", "html" : "true" },
41 "_avatar" : { "type" : "none" , "size" : 20, "link" : "none", "html" : "true" }
42 })
43 ## id of the div, list of columns, columns properties, default column to sort for, class name
44 #grid("users" $collist $colprops "last_name" "asc" "user_" "XWiki.XWikiUsers" 4 true)
45 {{/velocity}}