Score
0
Watch 3.3K Star 7.8K Fork 3.6K

卓源软件 / JeeSite 4.xJavaAGPL-3.0

前台界面的if判断语法不对,请问怎么写

Open
wanglong  Opened this issue

该问题是怎么引起的?

<% if(row.elementKind!='资源'){ %>
actions.push('<a href="${ctx}/aa/coursemanage/courseManager/form?parentCode='+row.id+'" class="btnList" title="${text("新增下级目录")}"> ');
<% } %>

重现步骤

报错信息

02:11:43:表达式值为空(NULL):row.elementKind 位于116行 资源:/modules/aa/coursemanage/courseManagerList.html
空指针
113| <% if(hasPermi('aa:coursemanage:courseManager:edit')){ %>
114| actions.push('<a href="${ctx}/aa/coursemanage/courseManager/form?elementCode='+row.elementCode+'" class="btnList" title="${text("编辑")}"> ');
115| actions.push('<a href="${ctx}/aa/coursemanage/courseManager/delete?elementCode='+row.elementCode+'" class="btnList" title="${text("删除")}" data-confirm="${text("确认要删除该目录及所有子目录吗?")}" data-deltreenode="'+row.id+'"> ');
116| <% if(row.elementKind!='资源'){ %>
117| actions.push('<a href="${ctx}/aa/coursemanage/courseManager/form?parentCode='+row.id+'" class="btnList" title="${text("新增下级目录")}"> ');
118| <% } %>
119| <% } %>

total 2 participants

Comments (1)

adminZDY 2020-03-13 17:58

你先打印一下row对象出来,看看有没有elementKind这个属性

Sign in to comment

Assignees
Labels
Not set
Projects
Milestones
Branches
Planed to start
Not set
Planed to end
Not set
Top level
Priority
Java
1
https://gitee.com/thinkgem/jeesite4.git
git@gitee.com:thinkgem/jeesite4.git
thinkgem
jeesite4
JeeSite 4.x

Help Search

220309 7019f5b6 1899542 220318 4015cbb9 1899542