当前位置: 代码迷 >> J2EE >> El怎么获得对象集合中对象的属性
  详细解决方案

El怎么获得对象集合中对象的属性

热度:191   发布时间:2016-04-22 02:35:18.0
El如何获得对象集合中对象的属性
CmsCategoryCollection CmsCategoryColl = cmsCategoryService.GetListPagerBy(OrderBy, pageIndex, pageSize);
request.setAttribute("CmsCategoryList", CmsCategoryColl);

对象属性有id1,id2,id3,我如何中jsp页面中通过EL表达式获得对象的id2,还忘高手指点。


------解决方案--------------------
外面嵌套个循环接收CmsCategoryList
然后定义个别名,比如entity
用${entity.id2}得到值

------解决方案--------------------
${CmsCategoryList.id1}
  相关解决方案