Freemarker list in RMP expects multiple elements

15 views
Skip to first unread message

somesh.m...@gmail.com

unread,
Apr 24, 2013, 12:33:43 PM4/24/13
to runmyp...@googlegroups.com
A newbie here, I have a freemarker list snippet:

<#list P_result.GradeProgressions.GradeProgression as x>

My issue is that the list declaration fails if there is a single GradeProgression xml element under parent node GradeProgressions (which sometimes is a possibility), in the XML.

Please let me know if anybody has encountered this and the way this can be tackled. I know that there is a "size" function in freemarker using which I can possible decode the size of the collection first prior to the assignment, but trying to find out a cleaner way as ideally the code should work even if there is a single element in the collection.

Please advise! Thanks in advance!
Reply all
Reply to author
Forward
0 new messages