【发布时间】: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