Struts2 tree 使用很简单,下面是我用的静态树的,用了freemarker模版,全都是struts2的标签.代码如下:
运行效果如图:
[img]http://www.iteye.com/upload/attachment/44014/7bb60cb6-d4a5-3a7a-b0fc-200b78fdca2c-thumb.jpg?1224638667[/img]
但是我想在菜单前添加自己想添加的图片,,这样的效果,如图
[img]http://www.iteye.com/upload/attachment/44018/3a3e1e7a-6995-3e3d-b16a-9e09c338561c.bmp[/img]
没有找到对应的属性,弄了好久都没有进展,我该怎么样添加呢???谢谢大家
<#assign s=JspTaglibs["/WEB-INF/struts-tags.tld"]/>
<html>
<head>
<title>Tree标签的例子 - 静态树的例子</title>
<@s.head theme="ajax" debug="true" />
</head>
<body>
<div style="float:left; margin-right: 50px;">
<@s.tree label="管理系统" id="parentId" theme="ajax"
templateCssPath="/struts/tree.css"
showRootGrid="true" showGrid="true">
<@s.treenode theme="ajax" label="用户管理" id="user">
<@s.treenode theme="ajax" label="<a href='view.action'>登录</a>" id="login" />
<@s.treenode theme="ajax" label="<a href='listUser.action'>查看用户信息</a>" id="userinfo" />
</@s.treenode>
</@s.tree>
</div>
</body>
</html>
运行效果如图:
[img]http://www.iteye.com/upload/attachment/44014/7bb60cb6-d4a5-3a7a-b0fc-200b78fdca2c-thumb.jpg?1224638667[/img]
但是我想在菜单前添加自己想添加的图片,,这样的效果,如图
[img]http://www.iteye.com/upload/attachment/44018/3a3e1e7a-6995-3e3d-b16a-9e09c338561c.bmp[/img]
没有找到对应的属性,弄了好久都没有进展,我该怎么样添加呢???谢谢大家