主题 : 急,求解
级别: 状元
UID: 33380
积分:50625 加为好友
威望: 21 精华: 3
主题:88 回复:30687
注册时间:2012-05-07
在线时长:0
21#   发表于:2012-05-24 10:32:52  IP:115.171.*.*
你得先获取ContentText对象,然后获取他的属性
功成由勤,业精于勤。
级别: 举人
UID: 33959
积分:176 加为好友
威望: 0 精华: 0
主题:12 回复:59
注册时间:2012-05-17
在线时长:0
22#   发表于:2012-05-24 10:39:46  IP:116.62.*.*
有点不明白,title也在表jc_content_ext里面 能够通过content.title获取。
*类Content里面
public String getTitle() {
ContentExt ext = getContentExt();
if (ext != null) {
return ext.getTitle();
} else {
return null;
}
}

public String getOrigin() {
ContentExt ext = getContentExt();
if (ext != null) {
return ext.getOrigin();
} else {
return null;
}
}
级别: 总版主
UID: 10736
积分:149787 加为好友
威望: 212 精华: 42
主题:297 回复:127674
注册时间:2010-09-08
在线时长:90.1
23#   发表于:2012-05-24 10:49:52  IP:115.171.*.*
${content.origin}  origin属性值为空没有找到所以报错。改成${content.origin!}  
路漫漫其修远兮,吾将上下而求索!
级别: 总版主
UID: 10736
积分:149787 加为好友
威望: 212 精华: 42
主题:297 回复:127674
注册时间:2010-09-08
在线时长:90.1
24#   发表于:2012-05-24 10:50:50  IP:115.171.*.*
我建你多去看看FreeMarker
路漫漫其修远兮,吾将上下而求索!
级别: 举人
UID: 33959
积分:176 加为好友
威望: 0 精华: 0
主题:12 回复:59
注册时间:2012-05-17
在线时长:0
25#   发表于:2012-05-24 10:52:34  IP:116.62.*.*
<input type='checkbox' name='ids' value='${content.id}'/><#t/>
</@p.column><#t/>
<@p.column title="ID">${content.id}</@p.column><#t/>
<@p.column code="content.title">
<#if content.topLevel gt 0><span style="color:red">[<@s.m "content.topLevel.short"/>${content.topLevel}]</span></#if>
<#if content.recommend><span style="color:red">[<@s.m "content.recommend.short"/>]</span></#if>
<strong>[${content.channel.name}]</strong>
<a href="${content.url}" target="_blank"><@text_cut s=content.title?html len=25 append="..."/></a>
<#if content.checkOpinion??>
<br/><span style="color:red">${content.checkOpinion}</span>
</#if>
</@p.column><#t/>
<@p.column code="content.type" align="center">${content.type.name}</@p.column><#t/>


怎么在这个里面 获取ContentText对象呢
级别: 总版主
UID: 10736
积分:149787 加为好友
威望: 212 精华: 42
主题:297 回复:127674
注册时间:2010-09-08
在线时长:90.1
26#   发表于:2012-05-24 10:56:27  IP:115.171.*.*
${content.origin}  origin属性值为空没有找到所以报错。改成${content.origin!}   
我建你多去看看FreeMarker
路漫漫其修远兮,吾将上下而求索!
|< < 1 2 3 共3页