Icefaces 和 ActiveXObject
我正在尝试使用 Icefaces JSF 库创建一个 panelPopup。
我使用 Netbeans 和 Glassfish。我正确安装了 Icefaces Netbeans 集成插件,并在 Netbeans 上创建了一个小型测试项目作为 Icefaces 项目。
测试时,弹出对话框并未真正从页面中弹出(它嵌入在页面中)
Firebug(在 FF 上测试时)报告为“ActiveXObject 未定义”。
但输出在 FF、IE、Chrome 和 Opera(所有最新版本)中都是恒定的
页面代码如下:
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:icecore="http://www.icefaces.org/icefaces/core"
xmlns:ace="http://www.icefaces.org/icefaces/components"
xmlns:ice="http://www.icesoft.com/icefaces/component">
<h:head>
<title>ICEfaces 2</title>
<link rel="stylesheet" type="text/css" href="./xmlhttp/css/rime/rime.css"/>
</h:head>
<h:body styleClass="ice-skin-rime">
<h:form id="form">
<ice:panelPopup rendered="true" visible="true">
<f:facet name="header">
popup header contents
</f:facet>
<f:facet name="body">
popup body contents
</f:facet>
</ice:panelPopup>
</h:form>
</h:body>
<h:outputStylesheet library="org.icefaces.component.skins" name="rime.css" />
</html>
请任何人告诉我这是什么。
I am trying to create a panelPopup with Icefaces JSF library.
I use Netbeans and Glassfish. I properly installed the Icefaces Netbeans integration plug-in and created the small test project as an Icefaces project on Netbeans.
When tested, the popup dialog is not really pop out of the page (it is embedded on the page)
The Firebug (when tested on FF) reports as "ActiveXObject not defined".
But the output is constant across FF, IE, Chrome and Opera (all latest versions)
The page code as follows:
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:icecore="http://www.icefaces.org/icefaces/core"
xmlns:ace="http://www.icefaces.org/icefaces/components"
xmlns:ice="http://www.icesoft.com/icefaces/component">
<h:head>
<title>ICEfaces 2</title>
<link rel="stylesheet" type="text/css" href="./xmlhttp/css/rime/rime.css"/>
</h:head>
<h:body styleClass="ice-skin-rime">
<h:form id="form">
<ice:panelPopup rendered="true" visible="true">
<f:facet name="header">
popup header contents
</f:facet>
<f:facet name="body">
popup body contents
</f:facet>
</ice:panelPopup>
</h:form>
</h:body>
<h:outputStylesheet library="org.icefaces.component.skins" name="rime.css" />
</html>
Please anyone advice me what is this.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
ActiveXObject
是 MSIE 专有的 JavaScript 对象。该错误似乎出现在 Firefox 中,我敢打赌,所涉及的 JavaScript 代码错误地使用了浏览器检测而不是功能检测,并且以某种方式检测到您的 Firefox 浏览器是 MSIE 浏览器,并且不小心尝试分配ActiveXObject 实例。
或者,更糟糕的是,JavaScript 代码依赖于所有目标 Web 浏览器都支持 ActiveXObject,并且在没有进行任何浏览器或功能检测的情况下粗心地使用它。这种浏览器范围的支持实际上是不真实的,它只是由微软创建的支持。
这就是目前所提供的信息所能说的全部内容。您必须运行 JavaScript 调试器(Firebug?Venkman? 等)并确定 JavaScript 代码中的罪魁祸首,最终回溯到服务器端代码,然后相应地修复它或举报给负责的维护人员。
ActiveXObject
is a MSIE proprietary JavaScript object. That the error seems to appear in Firefox, I'd bet that the involved JavaScript code is incorrectly using browser detection instead of feature detection and somehow detected your Firefox browser as being a MSIE browser and carelessly attempted to allocate anActiveXObject
instance.Or, more worse, the JavaScript code is relying that the
ActiveXObject
is supported by all target webbrowsers and is using it carelessly without doing any browser or feature detection. This browser-wide support is actually untrue, it's only supported by the creation of Microsoft.That's all what can be said on the information provided as far. You've to run a JavaScript debugger (Firebug? Venkman? etc) and nail down the culprit in the JavaScript code, eventually backtrack it to the server side code and then fix it accordingly or report it to the responsible maintainer.