【发布时间】:2012-10-18 12:14:42
【问题描述】:
我正在尝试使用 PrimeFaces 3.2。我正在使用 Eclipse Indigo SR2。我正在使用 PrimeFaces 标签创建一个 JSP 页面。标准的<h:commandButton> 有效,但<p:commandButton> 无效。
<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>
<%@ taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
<%@ taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html xmlns:p="http://primefaces.org/ui">
<head>
</head>
<body>
<f:view>
<h:form>
<h:commandButton value="Click"></h:commandButton>
<p:commandButton value="shfgldjfkl"></p:commandButton>
</h:form>
</f:view>
</body>
</html>
我的输出是这样的:
当我在 Indigo Service Release 2 中获取 JSF XHTML 页面时,我的代码没有运行我的页面是空白的。
如何使用 PrimeFaces 3.2?
【问题讨论】:
-
看看这个:mkyong.com/jsf2/primefaces/primefaces-hello-world-example 你可以将 jars 放在你的 lib 文件夹中而不是 maven 并将它们添加到你的构建路径中
-
截屏时,请尽量只裁剪出相关部分。您的问题中的唯一按钮周围有一个巨大的空白区域,这很荒谬。
标签: eclipse jsf-2 primefaces