IE-8与Primefaces的兼容问题?

时间:2012-04-30 09:00:14

标签: ajax jsf-2 internet-explorer-8 primefaces

嗨,我遇到了IE -8的问题,因为当我在Chrome和mozilla中执行我的代码时,这很好!但是在IE-8中它没有正确执行。说dialog.show没有定义

<p:calendar value="#{bean.method}" mode="inline">
<p:ajax update="@all" event="dateSelect" listener="#{Bean.method1}" oncomplete="dialog.show()" /> 

<p:schedule id="dialog" initialDate="#{Bean.method3}"/>

显示错误。 当我单击日期日历时,将显示计划中的日期。 但是在IE-8中,当我点击日历和日程表消失的日期时,当我刷新页面时,我看到我的选择日期已经被选中,我也发现了一个错误,如上所述..(对不起该问题,如果有的话)整齐地解释是错误的:))

3 个答案:

答案 0 :(得分:1)

我有很多问题IE和primefaces组件无法工作,直到我有一个解决一切的解决方案。我意识到,如果我把下面的代码放在头部的第一行,一切都像魅力一样。

<?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:h="http://java.sun.com/jsf/html"
          xmlns:p="http://primefaces.org/ui"
          xmlns:f="http://java.sun.com/jsf/core">
        <h:head>

        <f:facet name="first">
          <meta http-equiv="X-UA-Compatible" content="IE=edge" />
         <meta content="text/html; charset=UTF-8" http-equiv="content-type"/>
        </f:facet>
       // other head code goes here

       </h:head>

答案 1 :(得分:0)

尝试将widgetVar="myschedule"添加到<p:schedule并更改

oncomplete="dialog.show()" 

进入

oncomplete="myschedule.update();" 

答案 2 :(得分:0)

尝试将其放在xhtml文件的第一行。

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">