Javascript PrimeFaces时间线组件不适用于IE8
我在一个项目中使用了一个时间轴组件(pe:timeline),它在Chrome上运行良好,但在IE8上不起作用 我一直坚持的问题是,在IE8上,组件根本没有渲染。 我正在使用的代码: Javascript:Javascript PrimeFaces时间线组件不适用于IE8,javascript,jsf,primefaces,internet-explorer-8,timeline,Javascript,Jsf,Primefaces,Internet Explorer 8,Timeline,我在一个项目中使用了一个时间轴组件(pe:timeline),它在Chrome上运行良好,但在IE8上不起作用 我一直坚持的问题是,在IE8上,组件根本没有渲染。 我正在使用的代码: Javascript: function showContent() { $('#textArea').val(PF('timelineWdgt').getSelectedEvent().content); } xhtml: <h:body> <f:event id=
function showContent() {
$('#textArea').val(PF('timelineWdgt').getSelectedEvent().content);
}
xhtml:
<h:body>
<f:event id="postConstructorEvent"
type="javax.faces.event.PreRenderComponentEvent"
listener="#{acervoBean.inicializaPaginaAcervo}" />
<p:growl id="growl" showSummary="true" showDetail="true" autoUpdate="true"/>
<h:form id="searchMultimidia">
<h:panelGroup class="nav">
<h:panelGrid columns="2" class="grid" style="width:90%">
<pe:timeline id="timeline" locale="pt_BR" value="#{acervoBean.model}"
editable="true" showButtonNew="false"
showNavigation="true" zoomMin="1500000000"
timeZone="#{acervoBean.timeZone}"
widgetVar="timelineWdgt" style="margin-top:10px;">
<pe:javascript event="select" execute="showContent()"/>
<p:ajax event="delete" update="@none" onstart="timelineWdgt.cancelDelete()"/>
<p:ajax event="add" update="@none" onstart="timelineWdgt.cancelAdd()"/>
</pe:timeline>
...
...
我正在使用
Mojarra 2.1.17,
Primefaces 3.5和
ApacheTomcat 7.0.56
谢谢。检查IE是否在兼容模式下运行……不应该检查。它没有在兼容模式下运行@你有JS错误吗?就我所记得的,pe:timeline有一个问题,它调用
console.log
,即使IE没有定义它,如果你没有打开开发者工具。
@PostConstruct
public void postContruct() {
model = new TimelineModel();
Calendar cal = Calendar.getInstance(TimeZone.getTimeZone("UTC"));
cal.set(Calendar.HOUR_OF_DAY, 0);
cal.set(Calendar.MINUTE, 0);
model.add(new TimelineEvent("Dia inicial", cal.getTime()));
cal.add(Calendar.WEEK_OF_MONTH, 1);
model.add(new TimelineEvent("Dia final", cal.getTime()));
}
...
...