alvinalexander.com | career | drupal | java | mac | mysql | perl | scala | uml | unix  
<td align="center">${I18n.getMessage("Groups.List.Edit")} <td align="center"> <td class="row2" align="center">${I18n.getMessage("Permissions")} </tr> <@listGroups node/> <#global level = level - 2> </#list> </#if> </#macro> <#-- ******************************************** --> <#-- Create a <#-- ******************************************** --> <#macro selectFieldGroups name groups parentId multiple selectedList> <select name="${name}" <#if multiple>multiple="multiple" size="4"> <#if !multiple> <option value="0">${I18n.getMessage("topLevelGroup")} </#if> <#assign len = groups.size() - 1> <#if (len > -1)> <#list 0 .. len as i> <#assign node = groups.get(i)> <#if !group?exists || node.id != group.id> <#global level = 0> <option value="${node.id}"<#if parentId == node.id || selectedList.contains(node.id)> selected="selected">${node.name} <@selectOption node, parentId/> </#if> </#list> </#if> </select> </#macro> <#-- *************************************************************** --> <#-- Create the <#-- *************************************************************** --> <#macro selectOption node parentId> <#assign len = node.size() - 1> <#if (len >= 0)> <#list 0..len as i> <#global level = level + 2> <#assign n = node.getNode(i)> <#if !group?exists || n.id != group.id> <option value="${n.id}"<#if parentId == n.id || selectedList.contains(n.id)> selected="selected"><#list 0..level as j> ${n.name} <@selectOption n, parentId/> <#global level = level - 2> </#if> </#list> </#if> </#macro>

Other jforum examples (source code examples)

Here is a short list of links related to this jforum group_macros.ftl source code file:

jforum example source code file (group_macros.ftl)

This example jforum source code file (group_macros.ftl) is included in the DevDaily.com "Java Source Code Warehouse" project. The intent of this project is to help you "Learn Java by Example" TM.

Java - jforum tags/keywords

create, create, html, html, make, make, permissions, permissions

The jforum group_macros.ftl source code

<#-- ******************************* -->
<#-- Make the HTML for group listing -->
<#-- ******************************* -->
<#macro listGroups parent>
	<#assign total = parent.size() - 1>
	
	<#if (total >= 0 )>
		<#list 0..total as i>
			<#global level = level + 2>
			<#assign node = parent.getNode(i)>
			
			<tr bgcolor="#f4f4f4">
			<td><#list 0..level as j> ${node.name}
... this post is sponsored by my books ...

#1 New Release!

FP Best Seller

 

new blog posts

 

Copyright 1998-2021 Alvin Alexander, alvinalexander.com
All Rights Reserved.

A percentage of advertising revenue from
pages under the /java/jwarehouse URI on this website is
paid back to open source projects.