【问题标题】:IE-8 Compatible issue with Primefaces?Primefaces 的 IE-8 兼容问题?
【发布时间】:2012-04-30 09:00:14
【问题描述】:

嗨,我遇到了 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 中,当我单击日历和日程表消失的日期时,当我刷新页面时,我看到我的选定日期已被选中,并且我还发现了一个错误,如上所示..(如果有任何问题,对不起解释清楚是错误的:))

【问题讨论】:

  • 发布您的
  • 你看到我在日程表中使用的 id..我认为这不起作用
  • 是的,我试过了,但没有用。相反,在我给出 & ..so 对于多项选择,我更改了 update="@all"
  • 不确定..但是,尝试将 widgetVar="myschedule" 添加到 p:schedule 并将 oncomplete="dialog.show()" 更改为 oncomplete="myschedule.show()" 但无论如何,你不是在寻找更新日程的方法吗?使用 oncomplete="myschedule.update();"而是
  • 我只能用我以前的代码更新日程安排......属性 oncomplete="myschedule.update()" 不起作用..我试过......我以前的代码完全是在 chrome 中很好..但在 IE 中没有,我的问题是什么..?

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


【解决方案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>

【讨论】:

    【解决方案2】:

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

    oncomplete="dialog.show()" 
    

    进入

    oncomplete="myschedule.update();" 
    

    【讨论】:

      【解决方案3】:

      试着把它放在文件 xhtml 的第一行。

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

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 2019-03-01
        • 2014-06-03
        • 1970-01-01
        • 1970-01-01
        • 2011-10-02
        • 2012-01-28
        • 2011-05-04
        相关资源
        最近更新 更多