我想为一个特定的onRowClick函数设计DataTable函数。我已经用一棵树做过了,而且已经开始工作了。在这种情况下,选择是错误的,我看不出原因。
在这里,我的简单代码:
PF('myTableWidget').onRowClick = function (event, rowElement, silent) {
//do some stuff
PrimeFaces.widget.DataTable.prototype.onRowClick.call(event, rowElement, silent);
};发布于 2022-07-13 12:22:45
我忘记将"this“作为原型方法调用中的第一个参数。
PF('myTableWidget').onRowClick = function (event, rowElement, silent) {
//do some stuff
PrimeFaces.widget.DataTable.prototype.onRowClick.call(this,event, rowElement, silent);
};https://stackoverflow.com/questions/72963766
复制相似问题