我是 JSF primefaces 的新手。
我想知道如何为饼图配置 web.xml 和 faces-config.xml。包含这 2 个 xml 文件的任何示例代码对我也很有帮助。
我是 JSF primefaces 的新手。
我想知道如何为饼图配置 web.xml 和 faces-config.xml。包含这 2 个 xml 文件的任何示例代码对我也很有帮助。
如果您使用的是 Primeface 最新的稳定版本 2.2.1,请执行以下操作:
将 Primefaces jar 文件和您喜欢的主题的 jar 文件放在项目类路径中。
将以下内容添加到您的web.xml并将<param-value>
内容替换为您选择的主题的名称:
<context-param>
<param-name>primefaces.THEME</param-name>
<param-value>cupertino</param-value>
</context-param>
将以下内容添加到所有html
使用 primefaces 组件的 facelets 标记中:
xmlns:p="http://primefaces.prime.com.tr/ui"
例如:
<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.prime.com.tr/ui">
无需更改faces-config.xml。
如果您应该使用旧版本的 primefaces,则过程会有所不同。