1 当使用left join左连连接,sql语句为

select t from SecondPage t left join t.rightNavbar n where 1=1

页面中出现了部分空行的情况,上述语句返回的list集合为

DataGrid dataGrid = new DataGrid();
List<SecondPage> list=secondPageDao.find(model, paging); dataGrid.setRows(list);
dataGrid.setTotal(secondPageDao.count(model));
return dataGrid;

遍历list的值,发现list里边的每一项都是有值的,我就没有理解,为什么直接把listset到row中,页面上就是有空格存在,但是我加了下面代码后解决了这个问题,如果有经验的朋友欢迎提供说明

    DataGrid dataGrid = new DataGrid();

    List<SecondPage> list=secondPageDao.find(model, paging);
Iterator<SecondPage> it = list.iterator(); /**解决空格的问题,前台取不到值**/
List<SecondPage> listCopy = new ArrayList<SecondPage>();
while (it.hasNext()) {
SecondPage s = (SecondPage) it.next();
SecondPage copy = new SecondPage();
BeanUtils.copyProperties(s, copy);
listCopy.add(copy);
}
/**结束**/ dataGrid.setRows(list);
dataGrid.setTotal(secondPageDao.count(model));
return dataGrid;

最新文章

  1. 多线程的通信和同步(Java并发编程的艺术--笔记)
  2. php安装程序
  3. windows2003 iis php 配置后无法执行php页面
  4. Codeforces Round #381 (Div. 2) A B C 水 构造
  5. [SLAM] 02 Some algorithms of 3D reconstruction
  6. 命令行bash的基础操作
  7. UESTC_Little Deer and Blue Cat CDOJ 1025
  8. Easyui登陆页面制作
  9. ThinkPHP - 独立分组项目搭建
  10. Ubuntu下编译Android JNI最靠谱的方法...
  11. FastDFS的学习与使用(大量帖子)
  12. php数据分页显示基础
  13. 本地mysql无法连接原来是这里有问题啊。。。。。。
  14. MySQL中UTF8编码的数据在cmd下乱码
  15. Fiddler--Composer
  16. not compiled to use: SSE4.1 SSE4.2 AVX AVX2 FMA
  17. C#中e.Cancel,e.Handled的区别与应用
  18. 深入JAVA注解之属性注解
  19. html注释快捷键
  20. 转: Photon 3.4 Changed Logs ..

热门文章

  1. mysql将多条结果拼接成一条结果
  2. [技术博客] win10下vagrant+centos7 rails虚拟开发机配置流程
  3. elasticsearch-py 解决 too_long_frame_exception 问题
  4. el-select获取选中的value和label
  5. C#实现图像拖拽以及锚点缩放功能
  6. 阿里云OSS设置跨域访问 H5的时候
  7. 【转】CAD 二次开发--属性块 Block和BlockReference
  8. 安装 create-react-app@latest 失败,错误代码:243
  9. django学习问题集
  10. 报错:pymysql.err.InternalError: (1054, &quot;Unknown column &#39;AType&#39; in &#39;field list&#39;&quot;)