@At("/index")
@GET
@Ok("beetl:project/index.html")
public String index(@Attr(scope = Scope.SESSION, value = "me") int userId ) {
Context ctx = Lang.context();
// return projectService.index(userId, ctx, null);
if ( ... )
return "beetl:project/index1.html";
else if (...)
return "beetl:project/index2.html";
else
return "beetl:project/index3.html";
}
14 回复
public String index(@Attr(scope = Scope.SESSION, value = "me") int userId , ViewModel vm) {
vm.setv(..........);
....
...
}
if (projectXList.size() == 0) {
return "beetl:project/index_none.html";
} else {
vm.setv("projectList", projectXList);
return "beetl:project/index_all.html";
}
index.html
<% for(obj in projectList){ %>
<div class="project-item">
<div class="row"><h2><a href="${base}/user/project/show?id=${obj.projectId}" class="project-name">${obj.projectName}</a></h2></div>
<%}%>
日志
>>06:50:48:变量未定义(VAR_NOT_DEFINED):projectList 位于57行 资源:project/index.html
54|
55| <% for(obj in projectList){ %>
56| <div class="project-item">
57| <div class="row"><h2><a href="${base}/user/project/show?id=${obj.projectId}" class="project-name">${obj.projectName}</a></h2></div>
58| <%}%>
59|
添加回复
请先登陆