Hi,
It depend...
First,  what are displayed for $ddlProductFamily (your page in view mode)?
{{velocity}}
$ddlProductFamily
{{/velocity}}
Something like ['value1,'value2'] or xwikixxwith random number or
$ddlProductFamily ?
If you want display value from any page:
http://platform.xwiki.org/xwiki/bin/view/DevGuide/APIGuide#HAccessobjectsin…
or if you want display values in your page with your Class object you can use "custom
display" when your editing your Class
http://www.xwiki.org/xwiki/bin/view/FAQ/Bindings+available+inside+the+Custo…
Pascal B
--------------------------------------------
En date de : Jeu 23.6.16, D R <rir.ceg(a)gmail.com> a écrit :
 Objet: [xwiki-users] [Velocity] get items of static list
 À: "XWiki Users" <users(a)xwiki.org>
 Date: Jeudi 23 juin 2016, 16h32
 Hi,
 I am currently implementing my first XWiki application and
 starting to
 learn velocity. There is one thing that makes me mad.
 There is a static list field with code "ddlProductFamily".
 I try to display the items in this list in a nice way (one
 below the other).
 Different approaches including googling didn't lead to any
 outcome.
 #foreach ($prodFam in $ddlProductFamily)
   $prodFam\\
 #end
 #foreach ($prodFam in $doc.display('ddlProductFamily'))
   $prodFam\\
 #end
 On the frontend it's always empty. Other #foreach loops work
 fine.
 I'm sure I just misunderstand something but I can't find the
 fault myself.
 Can somebody please help me?
 Thanks in advance,
 Dennis
 _______________________________________________
 users mailing list
 users(a)xwiki.org
 
http://lists.xwiki.org/mailman/listinfo/users