【问题标题】:Jsf composite component not workingJsf复合组件不起作用
【发布时间】:2013-05-03 17:26:28
【问题描述】:

我收到“/pages/addressBook.xhtml @171,105 标签库支持命名空间:http://java.sun.com/jsf/composite/compositeComponents,但没有为名称定义标签:mailInputText”错误。

这是我的 xhtml;

  <html xmlns="http://www.w3.org/1999/xhtml"
  xmlns:h="http://java.sun.com/jsf/html"
  xmlns:p="http://primefaces.org/ui"
  xmlns:bzn="http://java.sun.com/jsf/composite/compositeComponents"
  xmlns:f="http://java.sun.com/jsf/core">

 //some stuff  

 <bzn:mailInputText id="mailInputId"                                           
                                       value="#{addressBookController.selectedContact.electronicMail}"/>

这是我的复合组件:

<html xmlns="http://www.w3.org/1999/xhtml"
  xmlns:composite="http://java.sun.com/jsf/composite"
  xmlns:h="http://java.sun.com/jsf/html"
  xmlns:p="http://primefaces.org/ui"      
  xmlns:f="http://java.sun.com/jsf/core">
<composite:interface>       

    <composite:attribute name="id"/>
    <composite:attribute name="value"/>
    <composite:attribute name="required" required="false" default="false"/>

</composite:interface>

<composite:implementation>

    <p:inputText id="#{cc.attrs.id}"
                 value="#{cc.attrs.value}"
                 required="#{cc.attrs.required}">
        <f:validateRegex
            pattern="^[_A-Za-z0-9-\+]+(\.[_A-Za-z0-9-]+)*@[A-Za-z0-9-]+(\.[A-Za-z0-9]+)*(\.[A-Za-z]{2,})$" />
    </p:inputText>

</composite:implementation>

【问题讨论】:

  • 定义复合组件的文件名是什么?

标签: jsf jsf-2 primefaces composite-component mojarra


【解决方案1】:

Saxon.jar 导致了这个问题。我从库中删除了它,现在它工作得很好。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2013-02-02
    • 2013-06-07
    • 2012-08-14
    • 2011-06-27
    • 2013-03-23
    • 2013-04-22
    • 2011-06-04
    相关资源
    最近更新 更多