下面这段文字是在#livetable的在线文档中的示例描述:
参见:http://extensions.xwiki.org/xwiki/bin/view/Extension/Livetable+Macro#HFilterorganizationsbydomain
Filter organizations by domain
The organization class in the example below has two properties: an org_name of type String and an org_domain of type StaticList. The organization domain can have values like Software or Hardware, which will be used in the live table as filter options.
#set($columnsProperties = {
"org_name" : { "type" : "text" , " size" : 20, "link" : "view"},
"org_domain" : { "type" : "list", "class": "MySpace.OrganizationClass"}
})
#set($options = {
"resultPage":"MySpace.ListOrganizationJSON",
"translationPrefix" : "",
"rowCount": 10
})
#livetable("organization_directory" $columns $columnsProperties $options)
The content of MySpace.ListOrganizationJSON (using syntax 2.0):
{{ velocity }}
#gridresultwithfilter("MySpace.OrganizationClass" $request.collist.split(",") "" " and doc.name<>'OrganizationSheet' and doc.name<>'OrganizationTemplate'")
{{ / velocity }}
{{velocity}}
#gridresultwithfilter("XWiki.DanJuSummaryClass" $request.collist.split(",") " ,StringProperty as sp" " and sp.name='version' and sp.value='V7.0' and obj.id=sp.id")
{{/velocity}}
本文介绍XWiki中LiveTable宏如何通过特定属性过滤文档,包括配置示例和实现逻辑,适用于需要定制化表格展示的应用场景。
390

被折叠的 条评论
为什么被折叠?



