Hi Ashish, 

I think your intention to use FreeMarker methods on your data structures is an 
indicator of a problematic design. The main purpose of FreeMarker templates is 
to spit out your HTML documents with variables replaced. You should avoid as 
much as you can having any logic in your templates because that would make your 
code base much harder to maintain. 

I recommend that you do any data manipulation in a groovy script or in Java and 
then handover the data you built to FreeMarker which you can just extract with 
a loop over one of the container types. If your purpose on the other hand is to 
have dynamic behavior, then the correct place to support that is in JavaScript. 

I hope that helps. 

Taher Alkhateeb 

----- Original Message -----

From: "Ashish Repal" <ashishre...@gmail.com> 
To: user@ofbiz.apache.org 
Sent: Sunday, 2 August, 2015 5:30:08 PM 
Subject: Map operation in ftl 

Hi All, 
I need to use map like data structure in ftl. I didnt find any in built 
functionality in ftl like java where we create an object hashmap and get 
access to various methods like put, remove etc. 
What i found in ftl is like we need to create a string with : separator as 
key value which requires much coding for basic add remove find operations. 
Anybody has any idea on this. Please suggest. 

Thanks 


-- 

Regards, 
Aashish Repal 
09623381664 

Reply via email to