Wiki source code of LiveTable
Last modified by Ecaterina Valica on 2010/01/12 11:12
Show last authors
author | version | line-number | content |
---|---|---|---|
1 | = Live Table | ||
2 | |||
3 | == Code | ||
4 | |||
5 | {{code}} | ||
6 | {{velocity}} | ||
7 | #set($columns = ["_avatar", "first_name", "last_name", "email", "doc.creationDate", "_actions"]) | ||
8 | #set($columnsProperties = { | ||
9 | "_avatar" : { "type" : "none", "link" : "none", "html" : "true", "sortable":false }, | ||
10 | "first_name" : { "type" : "text" , "size" : 20, "link" : "view"}, | ||
11 | "last_name" : { "type" : "text", "link" : "view"}, | ||
12 | "email" : { "type" : "text" } | ||
13 | }) | ||
14 | #set($options = { | ||
15 | "className":"XWiki.XWikiUsers", | ||
16 | "translationPrefix" : "xe.index.users.", | ||
17 | "tagCloud" : true, | ||
18 | "rowCount": 10 | ||
19 | }) | ||
20 | #livetable("userdirectory" $columns $columnsProperties $options) | ||
21 | {{/velocity}} | ||
22 | {{/code}} | ||
23 | |||
24 | == Result | ||
25 | |||
26 | {{velocity}} | ||
27 | #template("macros.vm") | ||
28 | #set($columns = ["_avatar", "first_name", "last_name", "email", "doc.creationDate", "_actions"]) | ||
29 | #set($columnsProperties = { | ||
30 | "_avatar" : { "type" : "none", "link" : "none", "html" : "true", "sortable":false }, | ||
31 | "first_name" : { "type" : "text" , "size" : 20, "link" : "view"}, | ||
32 | "last_name" : { "type" : "text", "link" : "view"}, | ||
33 | "email" : { "type" : "text" } | ||
34 | }) | ||
35 | #set($options = { | ||
36 | "className":"XWiki.XWikiUsers", | ||
37 | "translationPrefix" : "xe.index.users.", | ||
38 | "tagCloud" : true, | ||
39 | "rowCount": 10 | ||
40 | }) | ||
41 | #livetable("userdirectory" $columns $columnsProperties $options) | ||
42 | {{/velocity}} |