<%@ page contentType="text/html; charset=utf-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>

var menuItems=new Array();    

<s:iterator value="sysMenuList">
	<s:if test="%{sysOperateUrl==null}">
    	<s:if test="%{parent==null}">
    	 	var menu_folder_<s:property value="id"/>=new Ext.tree.TreeNode({ id:"root", text:"<s:property value='name'/>"});
            menuItems[menuItems.length]= new Ext.tree.TreePanel({
				title: '<s:property value="name"/>',
				xtype: 'treepanel',
				autoScroll: true,
                border: false,
				root: menu_folder_<s:property value="id"/>,
				bodyStyle: 'background:url(../resources/style/images/bg2.jpg) repeat-x #E8EAEF; padding-top:3px;', 
				rootVisible: false,
                iconCls: 'icon_<s:property value="name"/>',
                lines : true
            });
        </s:if>
        <s:else>
 			var menu_folder_<s:property value="id"/>=addFolderNode("<s:property value='name'/>",menu_folder_<s:property value="parent.id"/>);
		</s:else>
    </s:if>
    <s:else>
    	addLinkNode(menu_folder_<s:property value="parent.id"/>,"<s:property value='name' escapeHtml='false'/>","<s:property value='sysOperateUrl'/>");
    </s:else>
</s:iterator>