问题描述
我正在尝试在我的Primefaces(2.2.1)Web应用程序上使用其他主题,但是却遇到了奇怪的行为.我应该在哪里得到(primefaces.org展示柜):
I'm trying to use a different theme on my primefaces (2.2.1) web application but I'm experiencing a strange behavior. Where I should get this (primefaces.org showcase) :
我得到这个:
我正在使用与演示相同的代码,减去事件处理程序和主题滚动条.可以在以下位置找到该演示: http://www.primefaces.org/showcase/ui /layoutComplex.jsf 页面的源代码在底部链接.
I'm using the same code as the demo, minus the event handlers and theme roller. The demo can be found there : http://www.primefaces.org/showcase/ui/layoutComplex.jsf the source code of the page is linked in the bottom.
我尝试了另一个主题,结果也相似.
I've tried another theme and I have a similar result.
我做了什么:
我添加了
<link type="text/css" rel="stylesheet" href="theme/primefaces-sunny/theme.css" />
在头部
我添加了
<context-param>
<param-name>primefaces.skin</param-name>
<param-value>none</param-value>
</context-param>
到web.xml文件
我不了解CSS,我真的不知道可能出了什么问题.感谢您的任何帮助.
I have no knowledge of css, I really don't know what could have gone wrong. Any help is appreciated, thanks in advance.
推荐答案
您需要删除链接标记并将主题名称设置为上下文参数值.更多信息;
You need to remove link tag and set theme name as the context param value. More info;
http://www.primefaces.org/themes.html
这篇关于primefaces主题已损坏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!