【问题标题】:Can't run primefaces 1.1 with JSF 1.2无法使用 JSF 1.2 运行 primefaces 1.1
【发布时间】:2013-06-01 09:03:55
【问题描述】:

我正在尝试将 primefaces 1.1JSF 1.2 一起使用 通过将 jars 添加到类路径,因为 primefaces 不需要任何配置,我的 jsp 页面如下:

<?xml version="1.0" encoding="UTF-8"?>
<jsp:root version="1.2"
          xmlns:f="http://java.sun.com/jsf/core"
          xmlns:h="http://java.sun.com/jsf/html"
          xmlns:jsp="http://java.sun.com/JSP/Page"
          xmlns:ui="http://www.sun.com/web/ui"
          xmlns:p="http://primefaces.prime.com.tr/ui">
    <jsp:directive.page contentType="text/html;charset=UTF-8" isELIgnored="false" pageEncoding="UTF-8"/>
    <f:view>
        <ui:page id="page1">
            <ui:html id="html1">

           <body id="body1">
                <ui:form binding="#{MyBean.gform}">
              <p:commandButton id="basic" value="Basic" onclick="dlg1.show();" type="button" /> 

                        <p:dialog id="basicDialog" header="Basic Dialog" widgetVar="dlg1">
                            <h:outputText value="Resistance to PrimeFaces is futile!" />
                        </p:dialog> 

但我收到'PrimeFaces' is undefined 的脚本错误 请问有什么问题。

编辑:

当尝试仅使用组件 &lt;p:spinner /&gt; 进行测试时,如入门中所述 我得到了错误:

The value of the property 'jQuery' is null or undefined, not a Function object 

【问题讨论】:

    标签: jsf primefaces jsf-1.2


    【解决方案1】:

    如果您希望 PrimeFaces 包含他的 JavaScript 和 CSS 文件,您需要将 &lt;p:resources /&gt; 添加到 head

    【讨论】:

    • 所以我只添加 标签?
    • @MahmoudSaleh 我已经完成了搜索,看起来是的,但我还没有测试过。
    猜你喜欢
    • 2013-01-27
    • 2013-03-28
    • 2013-02-27
    • 2021-08-21
    • 1970-01-01
    • 2014-09-14
    • 2011-07-17
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多