jeesite
jeesite copied to clipboard
javax.el.PropertyNotFoundException: Property 'sKey' not found on type com.thinkgem.jeesite.modules.spzx.entity.TSearch
jsp页面代码如下:
<c:forEach items="${page.list}" var="tSearch">
<tr>
<td><a href="${ctx}/spzx/tSearch/form?id=${tSearch.id}">
${tSearch.sKey}
</a></td>
<td>
${tSearch.sCount}
</td>
<td>
${tSearch.keypy}
</td>
<td>
${tSearch.brandId}
</td>
<td>
${tSearch.restaurantId}
</td>
<td>
${tSearch.keyszm}
</td>
<td>
<fmt:formatDate value="${tSearch.updateDate}" pattern="yyyy-MM-dd HH:mm:ss"/>
</td>
<td>
${tSearch.remarks}
</td>
<shiro:hasPermission name="spzx:tSearch:edit"><td>
<a href="${ctx}/spzx/tSearch/form?id=${tSearch.id}">修改</a>
<a href="${ctx}/spzx/tSearch/delete?id=${tSearch.id}" onclick="return confirmx('确认要删除该搜索吗?', this.href)">删除</a>
</td></shiro:hasPermission>
</tr>
</c:forEach>
TSearch实体代码如下:
public class TSearch extends DataEntity<TSearch> {
private static final long serialVersionUID = 1L;
private String sKey; // 搜索关键字
private Integer sCount; // 搜索次数
private String keypy; // 关键字拼音
private Integer brandId; // 品牌id
private Integer restaurantId; // 餐厅id
private String keyszm; // 关键字首字母
private Integer beginSCount; // 开始 搜索次数
private Integer endSCount; // 结束 搜索次数
我的实体中分明是有sKey这个字段的,结果它还是说找不到.实在不解,
spring是调用的get方法找的,所以看一下你的sKey是否有get方法,get方法名是否为getSKey
你好,sKey属性对应的set,get方法都有,且符合预期,在jeesite的bbs中,找个这个链接,http://www.jeesite.net/forum.php?mod=viewthread&tid=269&extra=page%3D6 它提到了是这个属性的名字不符合JavaBean属性的命名规范,我注释掉sKey和sCount属性,结果就正常了,其他字段也能取到值了,原因基本上就能确定就是这个了.
#247
原来这个问题早就有人提过issue了,文档中却只字未提.等搞完这个项目,想写篇文字,“jeesite字段名的那些坑”.