0
我得到「/pages/addressBook.xhtml @ 171,105標記庫支持名稱空間:http://java.sun.com/jsf/composite/compositeComponents,但沒有爲名稱:mailInputText定義標記」錯誤。Jsf複合組件不起作用
這是我的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>
什麼是定義複合組件的文件名? – Arjun 2013-05-09 11:19:39