freemarker新手,只有
@Action(value = "findAllPostForF")
public void findAllPostForF() throws IOException {
List<Post> postList = this.postService.findPostBy(null, null, 0, null, null, currentPage, lineSize);
if (postList.isEmpty()) {
sucflag = true;
} else {
sucflag = true;
MemberT member = findSessionMember();
if (member == null) {
for (Post post : postList) {
MemberT m = this.memberTService.findMemberTById(post.getMemberId());
JSONObject json = screenPost(post, m);
json.put("flag", false);
list.add(json);
}
} else {
for (Post post : postList) {
MemberT m = this.memberTService.findMemberTById(post.getMemberId());
JSONObject json = screenPost(post, m);
if (isPoints(post, member)) {
json.put("flag", true);
} else {
json.put("flag", false);
}
list.add(json);
}
}
}
map.put("totalpage", TotalPageUtils.getTotalPage(postService.findPostBy(null, null, 0, null, null, 0, 0).size(), lineSize));
map.put("list", list);
map.put("sucflag", sucflag);
outJson(map);
}
话说freemarker页面怎么接到值啊?ftl页面和控制台怎么联系到一起的?
<#if (list??)&&(list?size>0)>
<#list list as bc>
<li class="">
${bc.content}
</li>
</#list>
</#if>
我知道页面根本接收不了,谁知道联系到一起的方法啊
雪莉酱