Re: Calling #Macro Recursively
Daniel Dekany <[email protected]> Sat, 18 Oct 2014 21:12:56 +0200
| Newsgroups | gmane.comp.web.freemarker.user |
|---|---|
| Message-ID | <[email protected]> |
Write a macro that expects a List<HierarchyView> as argument, and walks it using #list (just the top level). Inside the #list, after printing the current item *without* its List<HierarchyView> child, the macro should call itself by passing that child list in as the argument. That's the basic idea. Each macros call has its own local scope, so they won't interfere with other ongoing macro calls. But don't forget that to set variables in the local scope, #local must be used, not #assign. (Macro arguments and the #list loop variables is always local.) Saturday, October 18, 2014, 9:42:53 AM, firoza wrote: > Hi, > I have the requirement to display the recursive objects in ftl. > I am not sure whether using macro is the right option and as per the > original thread It didn't mention that we got the solution for such kind of > requirement. > Would you please check my last post where I have mentioned my requirement > for displaying the recursive list in ftl? > > Any help would be highly appreciated. > > Thanks > > > > -- > View this message in context: > http://freemarker.624813.n4.nabble.com/Calling-Macro-Recursively-tp626735p4655295.html > Sent from the freemarker-user mailing list archive at Nabble.com. > > ------------------------------------------------------------------------------ > Comprehensive Server Monitoring with Site24x7. > Monitor 10 servers for $9/Month. > Get alerted through email, SMS, voice calls or mobile push notifications. > Take corrective actions from your mobile device. > http://p.sf.net/sfu/Zoho > _______________________________________________ > FreeMarker-user mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/freemarker-user > -- Thanks, Daniel Dekany ------------------------------------------------------------------------------ Comprehensive Server Monitoring with Site24x7. Monitor 10 servers for $9/Month. Get alerted through email, SMS, voice calls or mobile push notifications. Take corrective actions from your mobile device. http://p.sf.net/sfu/Zoho