Property 'typeid' not found on type java.lang.String

来源:互联网 发布:顶级域名网站有哪些 编辑:程序博客网 时间:2024/05/29 06:54

前提是:

获取数据:

List<ProductType> childtypes = productTypeService.getScrollData(ProductType.class, jpqltypes.toString(), typeparams.toArray()).getResultList();
  for(ProductType type : childtypes){
   System.out.println("----------type name is: " + type.getName());
  }
  request.setAttribute("childtypes", childtypes);

 

 

前台显示:

 

<c:forEach items="childtypes" var="entry">
      <li><a  href="<html:rewrite action="/product/list"/>?sort=sellpriceasc&typeid=${entry.typeid}&sex=${param.sex }&brandid=${param.brandid}&style=${param.style}">${entry.name }</a></li>
     </c:forEach>

 

 

并且在ProductType类里是有typeid属性的,

结果还是报这个错!

 

解决方案:

<c:forEach items="childtypes" var="entry">

改为:

<c:forEach items="${childtypes}" var="entry">

原创粉丝点击