A.G*_*.G. 1 css datatable richfaces jsf-2
我需要禁用richfaces extendedDataTable组件的列拖放功能。演示源代码足以证明它具有排序列的功能,但是由于某些设计原因,我们不想允许用户操纵列的顺序。
是否可以通过CSS或覆盖richfaces的JS函数调用来禁用此功能?
编辑: Richfaces版本是4.3.4
通过浏览richfaces javascript函数来找出解决方案。将其发布在此处:使用extendedDataTable在页面末尾的javascript调用下方粘贴。这将禁用列排序功能。
<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>
Run Code Online (Sandbox Code Playgroud)