本文介绍了p:编辑器在chrome中可见,但在IE中无法正确呈现的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 29岁程序员,3月因学历无情被辞! 编辑器未在IE窗口中显示,但可以在chrome中正常工作The editor doesn't appears in my IE window while it works correctly in chrome我实现了p:layout,并且在中央layoutunit中包括了模板.xhtml使用ui:include封装在I have implemented p:layout and in the center layoutunit I am including the template.xhtml using ui:include which is enclosed in a<h:form id="centercontentpanel">请指导我进行哪些更改才能使其在IE 8中可见Kindly guide me with what corrections needs to be done to make it visible in IE 8 Template.xhtmlTemplate.xhtml<?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:body><f:view> <p:editor id="editor" value="#{editorBean.value}"/> <h:panelGrid columns="2" style="margin-top:10px"> <p:commandButton id="submitButton" value="Submit" update="display" oncomplete="editordlg.show()" icon="ui-icon-disk" /> <p:commandButton id="clearButton" type="button" value="Clear" onclick="editor.clear()" icon="ui-icon-close"/> </h:panelGrid> <p:dialog header="Content" widgetVar="editordlg" showEffect="fade" hideEffect="fade" modal="true"> <h:outputText id="display" value="#{editorBean.value}" escape="false" /> </p:dialog></f:view></h:body></html>推荐答案 (我的测试是在IE 11和Primefaces 4.0上进行的,纯编程,没有抽搐任何东西)编辑:对不起,我偶然发现了我的问题(在IE上编辑),希望它可以解决您的问题只需添加 contentType = text / html 到< f:view> 像这样< f:view contentType = text / html> 他re 是擎天柱的帖子(即使是chrome的渲染问题)I'm sorry, i just stumbled on the answear to my problem (Editing on IE), hope it fixes yoursJust add contentType="text/html" to the <f:view> like this <f:view contentType="text/html">Here is the post from Optimus (Even though it's a rendering problem for chrome) 这篇关于p:编辑器在chrome中可见,但在IE中无法正确呈现的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!
08-30 22:23