主题 : 大神,想请教后台页面的<@p.table等标签怎么用的
级别: 童生
UID: 61728
积分:42 加为好友
威望: 0 精华: 0
主题:6 回复:6
注册时间:2014-05-10
在线时长:0
1#   发表于:2014-05-21 21:22:56  IP:180.45.*.*
1. <@p.table value=list;cmsGuestbookCtg,i,has_next><#rt/>
类似这样的。这个@P的标签哪里定义?

2. 想在guestbook\list.html里面添加一个根据ctgId过滤的功能,
于是在方法里面写了一个model.addAttribute("ctgList", ctgList);
可是在html里面不知道怎么遍历这个ctgList,这里面又不能用jstl的标签。。。
想请教怎么用。
        [#list ctgList as a]
               [#if a_has_next]
                <OPTION value='${a.id}'>${a.name}</OPTION>
                [/#if]
        [/#list]
我这样写,直接报错:
Expression a is undefined on line 55, column 34 in jeecms_sys/guestbook/list.html.
The problematic instruction:
----------
==> ${a.id} [on line 55, column 32 in jeecms_sys/guestbook/list.html]
级别: 状元
UID: 33380
积分:50625 加为好友
威望: 21 精华: 3
主题:88 回复:30687
注册时间:2012-05-07
在线时长:0
2#   发表于:2014-05-22 09:27:50  IP:182.10.*.*
<@p.table 这个是系统自定义的标签,在red/ftl文件夹里定义的
功成由勤,业精于勤。
级别: 童生
UID: 61728
积分:42 加为好友
威望: 0 精华: 0
主题:6 回复:6
注册时间:2014-05-10
在线时长:0
3#   发表于:2014-05-22 15:48:23  IP:58.14.*.*
还有第二个问题呢?
级别: 状元
UID: 33380
积分:50625 加为好友
威望: 21 精华: 3
主题:88 回复:30687
注册时间:2012-05-07
在线时长:0
4#   发表于:2014-05-22 15:51:28  IP:182.10.*.*
第二个是报你那id取不到值,你那过滤是怎么写的?
功成由勤,业精于勤。
级别: 童生
UID: 61728
积分:42 加为好友
威望: 0 精华: 0
主题:6 回复:6
注册时间:2014-05-10
在线时长:0
5#   发表于:2014-05-22 20:18:10  IP:114.250.*.*
List<CmsGuestbookCtg> ctgList = cmsGuestbookCtgMng
.getList(site.getId());
model.addAttribute("ctgList", ctgList);  //这里我看了ctgList,里面确实有值。

在guestbook/list.html里面添加:
 [#list ctgList as a] 
               [#if a_has_next] 
                <OPTION value='${a.id}'>${a.name}</OPTION> 
                [/#if] 
        [/#list] 
报上面的错。
1 共1页