Collection Issue

Geeth Lochana <[email protected]>
Newsgroups gmane.comp.web.freemarker.user
Message-ID <[email protected]>
I have collection of data, record as like follows.
Class RiskSummaryRpt{
    private String name;
    private String value;

 }

Class Report{
    private Set<Abc> riskSummaryRpt;
}

i want to get following out put using freemarker template

using above collection i want to get single record.
  
this is the current template i have         
<#list report.riskSummaryRpt as param>
                <#if param.name == 'Factor'>            
                    <factor>
                        <risk>${param.riskVal!""}</risk>
                    </factor>
                <#elseif param.name == 'Stock Specific'>            
                    <specific>
                       <risk>${param.riskVal!""}</risk>
                    </specific>
                <#elseif param.name == 'Total'>            
                    <totalVariance>
                         <risk>${param.riskVal!""}</risk>
                    </totalVariance>
                </#if>
        </#list>

i need to get following output with correct order of tags.
                    <factor>
                        <risk>12.32</risk>
                    </factor>
                    <specific>
                        <risk>12.32</risk>
                    </specific>
                    <totalVariance>
                        <risk>12.32</risk>
                    </totalVariance>


but i couldn't get the order is mismatch. 
Any one have any idea to over come this issue.

------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security
threats, fraudulent activity, and more. Splunk takes this data and makes
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2dcopy2

_______________________________________________
FreeMarker-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freemarker-user
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.