Re: Calling #Macro Recursively

firoza <[email protected]> Sun, 19 Oct 2014 08:16:51 -0700 (PDT)
Newsgroups gmane.comp.web.freemarker.user
Message-ID <[email protected]>
Thanks Deniel for your quick response.
I tired with the approach you suggested but it is not displaying any
information on the page.

Below is the code snipped:

HierarchyProductSearchResult{
private Integer chpd;
private Integer conf;
private String link;
private List<String> activeName = Collections.emptyList();
private List<String> inactiveName= Collections.emptyList();	
private List<HierarchyProductSearchResult> children =
Collections.emptyList();
}

I have a service method which returns list of HierarchyProductSearchResult.
That list is productSearchResultList.

In ftl I have created the macro and iterating the loop. Blow is the code in
ftl for macro:

<ul class="accordion">
							 <#macro hierarchy productSearchResultList>
							
							<#list productSearchResultList as productresult>
							
							<#assign detailViewPopUp="Y">
								<li>									
									
									
										<#if productresult.children?has_content>
											 <@liferay_ui.message key="resultview.hierarchy.click"/>
<JavaScript:void(0);>  
										
										</#if>
									
									
									
									<#include "include/resultRecordDetails.ftl" >
									
									<#if productresult.children?has_content>
											<ul>
									
											 <@hierarchy productSearchResultList=productresult.children/>
											</ul>
												
									</#if>								
								
								</li>
								
							</#list>
							</#macro>



Would you please let me know where I am making the mistake? I got stuck in
this.

Thanks





--
View this message in context: http://freemarker.624813.n4.nabble.com/Calling-Macro-Recursively-tp626735p4655297.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