IE-8 Compatible issue with Primefaces?

雨燕双飞 提交于 2019-12-12 03:11:48

问题


Hi i am having a problem with IE -8 because when i execute my code in Chrome and mozilla it is good ! but in IE-8 it is not executing properly. saying that dialog.show is not defined

<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}"/>

showing Errors . When i click on the Date Calendar the Date in the Schedule is getting displayed. but in IE-8 when i click on the date the Calendar and Schedule are vanishing, when i refresh the page i see that my Selected date has been selected and i also found an error saying as above..(Sorry about the Question if anything is Wrong in Explaining neatly :))


回答1:


try adding widgetVar="myschedule" to <p:schedule and change

oncomplete="dialog.show()" 

into

oncomplete="myschedule.update();" 



回答2:


I had a lot of issues with IE and primefaces components not working until I had a fix that solved everything in one go. I realised that if i put the below code to be the first line in the head everything worked like a charm.

<?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>



回答3:


Try putting this in the first line of the file xhtml.

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


来源:https://stackoverflow.com/questions/10380954/ie-8-compatible-issue-with-primefaces

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!