Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jsf-2/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Jsf 禁用icefaces数据表的onscroll事件_Jsf_Jsf 2_Icefaces - Fatal编程技术网

Jsf 禁用icefaces数据表的onscroll事件

Jsf 禁用icefaces数据表的onscroll事件,jsf,jsf-2,icefaces,Jsf,Jsf 2,Icefaces,我使用了一个ice:dataTable组件来显示数据,不知何故,目标div中有一个默认的onscroll事件,这对我来说没有任何意义,它给页面中的其他float元素带来了一些定位问题。我想禁用此操作,但我没有找到任何方法来控制此操作 它调用了下面的函数: var input = document.getElementById('targetId'); clearTimeout(ice.pid); ice.pid = setTimeout(function() { input.valu

我使用了一个ice:dataTable组件来显示数据,不知何故,目标div中有一个默认的onscroll事件,这对我来说没有任何意义,它给页面中的其他float元素带来了一些定位问题。我想禁用此操作,但我没有找到任何方法来控制此操作

它调用了下面的函数:

var input = document.getElementById('targetId'); clearTimeout(ice.pid); 
ice.pid = setTimeout(function() { 
    input.value =   
    document.getElementById('targetId_scroll').scrollTop;    
    window.iceSubmitPartial(null, input, event); 
}, 400); 

我对ICEFaces也有类似的问题,当我们升级JSF和ICEFaces版本时,最好的解决方案是更改标记: ice:dataTable标记到ace:dataTable,以及从ice:columnace:column的内部列

但是,如果您没有升级ICEFaces版本,我想您可以在代码的某个地方使用JavaScript或jQuery来删除onscroll属性,例如:

document._getElementsByXPath("//div[contains(@onscroll,'scroll')]")[0].removeAttribute("onscroll")
这不是一个好的例子,只是一个例子,因为您可以从其他表中删除scroll

jQuery('.myClass div[id$="_scroll"]')[0].removeAttribute("onscroll")