Display Static List Elements

Last modified by Guido Kracke on 2021/04/21 19:20

cogDisplays nicely elements of a static list
TypeSnippet
Category
Developed by

Oana Florea

Rating
0 Votes
LicenseGNU Lesser General Public License 2.1

Table of contents

Description

The Static List elements are usually defined as: 0=Zero|1=One|2=Two. This snippet helps display nicely the elements of the list.

#set($class = $xwiki.getDocument("MySpace.MyClass").getxWikiClass())
#set($list = '')
#set($list = $class.get("myColumnName").getListValues())
#set($map = $class.get("myColumnName").getMapValues())
#foreach($listitem in $list)
 * value: $listitem displayed value: $map.get($listitem).getValue()
#end

Get Connected