【问题标题】:Myfaces Tomahawk isn't workingMyfaces 战斧不工作
【发布时间】:2012-05-31 03:31:43
【问题描述】:

我正在尝试使用 tomahawk 的 selectManyCheckbox 但它不起作用,我在我的网络应用程序中收到此消息:

警告:页面 /resources/components/tabs/abaEdicaoFuncoesFuncionario.xhtml 声明了命名空间 http://myfaces.apache.org/tomahawk 并使用标签 t:selectManyCheckbox ,但没有与命名空间关联的 TagLibrary。

我在这里使用 selectManyCheckbox:

<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:t="http://myfaces.apache.org/tomahawk">
<ui:component>
<h:panelGroup layout="block" styleClass="hrgi-div-form clearfix tamanho-aba-cadastro">
    <t:selectManyCheckbox id="selectFuncoes" value="#{funcionario.funcoes}" layoutWidth="2">
        <f:selectItems value="#{carregadorFuncoesFuncionario.itens}" />
    </t:selectManyCheckbox>
</h:panelGroup>
</ui:component>
</html>

并以这种方式配置 web.xml:

<filter>
    <filter-name>MyFacesExtensionsFilter</filter-name>
    <filter-class>org.apache.myfaces.webapp.filter.ExtensionsFilter</filter-class>
    <init-param>
        <param-name>uploadMaxFileSize</param-name>
        <param-value>20m</param-value>
    </init-param>
</filter>

<filter-mapping>
    <filter-name>MyFacesExtensionsFilter</filter-name>
    <servlet-name>Faces Servlet</servlet-name>
</filter-mapping>

<filter-mapping>
    <filter-name>MyFacesExtensionsFilter</filter-name>
    <url-pattern>/faces/myFacesExtensionResource/*</url-pattern>
</filter-mapping>

我使用的是 Tomahawk 1.1.11、myfaces 2.1.6 和 primefaces 2.1.1 我该如何解决?

【问题讨论】:

    标签: jsf-2 myfaces tomahawk


    【解决方案1】:

    确保您使用的是"Tomahawk for JSF 2.0"(而不是用于 JSF 1.2),并且所有 Tomahawk JAR 文件都放置在 /WEB-INF/lib 文件夹中,并且服务器日志中不会出现与此相关的错误/警告。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-08-15
      • 2012-08-06
      相关资源
      最近更新 更多