在entity中是有typeid这个字段的,但是在前台显示的时候,一直报这个错误:
Property 'typeid' not found on type java.lang.String
后台:
request.setAttribute("productTypes", qr.getResultList());前台显示:
<c:forEach items="productTypes" var="type">
${type.typeid } ${type.name } ${type.note } <c:if test="${!empty type.parent }">${type.parent.name }</c:if>
</c:forEach>将items="productTypes"修改为items="${productTypes }"解决问题。
本文详细描述了在处理entity中的typeid字段时遇到的问题,以及如何通过将items参数修改为${productTypes}
507

被折叠的 条评论
为什么被折叠?



