我在一个Eclipse应用程序中遇到了primefaces渲染问题,但在另一个Eclipse应用程序中没有。我比较了web.xml和pom,并试图使它们相同,至少就可能影响primefaces呈现的依赖性而言。我已经清理了违规项目,更新了Maven下的项目,检查了项目方面等,但仍然无法让一个应用程序按照他们在其他应用程序或展示中查看的方式渲染primefaces组件。两个(有点)相同的Eclipse JSF/Primefaces应用程序中的相同页面呈现不同
我减少了一页到其最简单的情况下使用两个primefaces按钮和相同的模板没有额外的CSS文件。这里的每个应用程序是如何呈现的按钮:
差呈现,用指针悬停在顶部的按钮
良好的渲染,这种适当的悬停亮点和圆角
按钮显示间距也不同。在恶劣的渲染似乎也有一些额外的边框勾勒出整个画布(白色内容区)
的facelet:
<h:body>
<ui:composition template="/WEB-INF/templates/hmmcommonLayout.xhtml">
<ui:define name="title">title</ui:define>
<ui:define name="content">
<h:form>
<p:button outcome="hr" value="With Icon" icon="ui-icon-star">
<f:param name="productId" value="24" />
</p:button>
</h:form>
<h:form>
<p:button outcome="hr" icon="ui-icon-star" title="Icon Only">
</p:button>
</h:form>
<br></br>
</ui:define>
</ui:composition>
</h:body>
</html>
模板:
<?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:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:p="http://primefaces.org/ui" xmlns:o="http://omnifaces.org/ui"
xmlns:of="http://omnifaces.org/functions">
<h:head>
<title><ui:insert name="title">template title</ui:insert></title>
</h:head>
<h:body>
<div class="logoText">template logo text</div>
<ui:insert name="content"></ui:insert>
</h:body>
</html>
生成的HTML是基本相同。我还能检查什么?
您是否检查了主题?他们是同一个版本吗? – 2014-12-04 22:31:41