简体   繁体   English

如何在primefaces中使用jQuery启用/禁用复选框?

[英]how to enable/disable checkbox using jQuery in primefaces?

i am using prime faces. 我正在使用素面。 i have a data table having check box in each row. 我有一个数据表,每行都有复选框。 i want to enable/disable the check box in a particular row on some event in that row, using J Query. 我想使用J Query启用/禁用该行中某个事件的特定行中的复选框。 i want to do it on client side only. 我只想在客户端这样做。 i have already used the following code : attr('disabled', true) 我已经使用了以下代码: attr('disabled', true)
the prime faces is not allowing me to disable the check box using the above code. 素面不允许我使用上述代码禁用复选框。 can anyone suggest me the possible ways of doing it? 谁能建议我这样做的可能方法? the check box should hold the current selection but user should not be allowed to change it. 该复选框应保留当前选择,但不允许用户更改它。

we've verified through several performance tests that the traffic of HTTP requests generated by different users in the peak hour to update the server upon single checkbox selections, could impact the CPU of the application server. 我们已经通过几次性能测试验证,在单个复选框选择时,高峰时段不同用户生成的HTTP请求的流量会更新服务器,这可能会影响应用程序服务器的CPU。 Managing the single checkbox selection client-side would probably improve performance by preventing the generation of those HTTP requests. 管理单个复选框选择客户端可能会通过阻止生成这些HTTP请求来提高性能。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM