primefaces 数据表 selectionMode multiple 不适用于 mojarra [英] primefaces datatable selectionMode multiple not working with mojarra

查看:53
本文介绍了primefaces 数据表 selectionMode multiple 不适用于 mojarra的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

最近我从 myfaces 切换到 mojarra,并注意到 primefaces 数据表复选框多行选择不起作用.

我已经尝试了 http://www.primefaces.org 上提供的确切示例程序/showcase/ui/datatableRowSelectionRadioCheckbox.jsf

使用 myfaces 时,单选和多选都可以使用,但使用 mojarra 时多选不起作用(setSelectedCars 方法中的 selectedCars.length 为 0)

我尝试过 mojarra 2.0.3 和 mojarra 2.1.0 with primefaces 2.2.1

解决方案

添加 'f:view contentType="text/html"' 解决了问题.

http://www.primefaces.org/faq.html 中阅读此内容>

Recently I switched to mojarra from myfaces and noticed that primefaces datatable checkbox multiple row selection is not working.

I have tried the exact sample program available at http://www.primefaces.org/showcase/ui/datatableRowSelectionRadioCheckbox.jsf

With myfaces both single and multiple selection are working ,but with mojarra multiple selection is not working(selectedCars.length is 0 in setSelectedCars method)

I have tried with mojarra 2.0.3 and mojarra 2.1.0 with primefaces 2.2.1

解决方案

Adding 'f:view contentType="text/html"' solved the problem.

Read this in http://www.primefaces.org/faq.html

这篇关于primefaces 数据表 selectionMode multiple 不适用于 mojarra的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆