richfaces 的脚本冲突问题(prototype.js)

richfaces 的脚本冲突问题(prototype.js)
在页面中使用了richfaces和prototype,结果在IE下一直报错,后来发现richfaces的文档中已经标注了此问题:

1.74. Why does Java Script conflict?

Richfaces 3.1.3 uses 1.6.0 version of prototype.js script instead of 1.5.1 that's been used for earlier versions. There are 2 prototype versions included (the first included implicitly as a dependency of toggle panel components and the second one included explicitly as a link). Versions conflict is the cause of the problem.

RichFaces 3.1.3 is bundled with the same ones as Prototype 1.6.0, Scriptaculous 1.8.0

Example in web.xml::


...

<context-param>

    <param-name>org.richfaces.ExcludeScripts</param-name>

    <param-value>Prototype,Scriptaculous</param-value>

</context-param>

...

RichFaces components use Prototype very hard. In particular, some patches has been removed that are already included into 1.6.0. Adding feature with exclusion makes it possible to use Prototype with version less than 1.6.0. This will break some of the components.



你可能感兴趣的:(richfaces 的脚本冲突问题(prototype.js))