Display Static List Elements
Last modified by Guido Kracke on 2025/02/12 12:24
![]() | Displays nicely elements of a static list |
Type | Snippet |
Category | |
Developed by | |
Rating | |
License | GNU 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