1

我需要禁用richfaces extendedDataTable组件的列拖放功能。Demo源码足以看出它具有列排序的功能,但是由于一些设计原因,我们不希望允许用户操作列的顺序。

有没有办法通过 CSS 或覆盖 Richfaces 的 JS 函数调用来禁用此功能?

编辑: Richfaces 版本是 4.3.4

4

1 回答 1

6

Figured out the solution by peeking in richfaces javascript functions. Posting it here: Paste below javascript call at the end of page using extendedDataTable. This should disable column ordering functionality.

<script type="text/javascript">
    RichFaces.ui.ExtendedDataTable.prototype.reorder = function (event) {};
    RichFaces.ui.ExtendedDataTable.prototype.beginReorder = function (event) {};
    RichFaces.ui.ExtendedDataTable.prototype.overReorder= function(event) {};
    RichFaces.ui.ExtendedDataTable.prototype.outReorder= function(event) {};
    RichFaces.ui.ExtendedDataTable.prototype.endReorder= function(event) {};
    RichFaces.ui.ExtendedDataTable.prototype.cancelReorder= function(event) {}; 
</script>
于 2013-10-04T06:03:42.743 回答