PrimeFaces 标签未呈现 [英] PrimeFaces tags not rendered
本文介绍了PrimeFaces 标签未呈现的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试使用 PrimeFaces Mobile 制作我的第一个页面,但未呈现标签.
I am trying to make my first page using PrimeFaces Mobile, but the tags are not rendered.
我的 xhtml 文件如下所示:
My xhtml file looks like this:
<?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:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:p="http://primefaces.org/ui"
xmlns:pm="http://primefaces.org/mobile">
<f:view>
<f:loadBundle basename="test.Labels"
var="labels" />
<h:head>
<title>#{labels.PageTitle}</title>
<meta http-equiv="Content-Type"
content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" type="text/css" href="css/styles.css" />
<script type="text/javascript" src="js/global.js"></script>
</h:head>
<h:body>
<pm:page title="Hello World">
<pm:view id="main">
<pm:header title="Header" />
<pm:content>Content</pm:content>
<pm:buttonGroup orientation="horizontal">
<p:commandButton value="Yes" />
<p:commandButton value="No" />
</pm:buttonGroup>
</pm:view>
</pm:page>
</h:body>
</f:view>
</html>
我正在使用:
- jsf 2.0
- 嵌入式码头
- primefaces-3.3.jar
- primefaces-mobile-0.9.3.jar
我也尝试添加:
<application>
<default-render-kit-id>PRIMEFACES_MOBILE</default-render-kit-id>
</application>
但是发生了异常:找不到PRIMEFACES_MOBILE"的 RenderKit.没有这个,PrimeFaces 标签不会被渲染.
But an exception occurred: Could not find a RenderKit for "PRIMEFACES_MOBILE". Without this, the PrimeFaces tags are not rendered.
谢谢,非常感谢任何帮助.
Thanks and any help is strongly appreciated.
推荐答案
问题现已解决.
PrimeFaces jar(在我的例子中是 primefaces-3.3.jar)必须在运行时位于文件夹/WEB-INF/lib 中
The PrimeFaces jar (primefaces-3.3.jar in my case) has to be available in the folder /WEB-INF/lib at runtime
我的大错.
这篇关于PrimeFaces 标签未呈现的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文