简体   繁体   English

<my:foo>标记库支持命名空间:http://java.sun.com/jsf/composite/mycomponents,但没有为name定义标记:foo

[英]<my:foo> Tag Library supports namespace: http://java.sun.com/jsf/composite/mycomponents, but no tag was defined for name: foo

I have a composite component named <my:foo> and I'm building another composite component named <my:bar> . 我有一个名为<my:foo>的复合组件,我正在构建另一个名为<my:bar>复合组件。 But when I attempt to use <my:foo> inside the <cc:implementation> of <my:bar> , the following exception is been thrown: 但是当我尝试在<my:foo><cc:implementation>中使用<my:foo> <my:bar> ,抛出了以下异常:

<my:foo> Tag Library supports namespace: http://java.sun.com/jsf/composite/mycomponents , but no tag was defined for name: foo <my:foo>标记库支持命名空间: http//java.sun.com/jsf/composite/mycomponents ,但没有为name定义标记:foo

How is this caused and how can I solve it? 这是怎么造成的,我该如何解决?

This is caused by a bug which was introduced in Mojarra 2.1.8, continued in 2.1.9 and is fixed in 2.1.10. 这是由Mojarra 2.1.8中引入的错误引起的,在2.1.9中继续,并在2.1.10中修复。 This bug causes that composite component's own XML namespace cannot be declared in a root XML element like <ui:component> / <ui:composition> / <html> /etc as follows: 此错误导致复合组件自己的XML命名空间无法在<ui:component> / <ui:composition> / <html> / etc等根XML元素中声明,如下所示:

<ui:component 
    xmlns="http://www.w3.org/1999/xhtml"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:cc="http://java.sun.com/jsf/composite"
    xmlns:my="http://java.sun.com/jsf/composite/mycomponents"
>
    <cc:interface>
        ...
    </cc:interface>
    <cc:implementation>
        <my:foo />
    </cc:implementation>
</ui:component>

This would result in the following exception when you attempt to nest <my:foo> inside the <cc:implementation> . 当您尝试在<cc:implementation>嵌套<my:foo>时,这将导致以下异常。

<my:foo> Tag Library supports namespace: http://java.sun.com/jsf/composite/mycomponents , but no tag was defined for name: foo <my:foo>标记库支持命名空间: http//java.sun.com/jsf/composite/mycomponents ,但没有为name定义标记:foo

The current workaround, apart from downgrading to 2.1.7 and waiting for 2.1.10 to be released, is to move the XML namespace declaration into the <cc:implementation> . 除了降级到2.1.7并等待2.1.10发布之外,当前的解决方法是将XML名称空间声明移动到<cc:implementation>

<ui:component 
    xmlns="http://www.w3.org/1999/xhtml"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:cc="http://java.sun.com/jsf/composite"
>
    <cc:interface>
        ...
    </cc:interface>
    <cc:implementation xmlns:my="http://java.sun.com/jsf/composite/mycomponents">
        <my:foo />
    </cc:implementation>
</ui:component>

See also: 也可以看看:

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 NETBEANS 7.4:“未为名称定义任何标记:注册” +“未为命名空间http://java.sun.com/jsf/composite/my_composite_component找到库” - NETBEANS 7.4: “no tag was defined for name: register” + “No library found for namespace http://java.sun.com/jsf/composite/my_composite_component” <h:outputtext>标签库支持命名空间:http://java.sun.com/jsf/html,但没有为名称定义标签:outputtext - <h:outputtext> Tag Library supports namespace: http://java.sun.com/jsf/html, but no tag was defined for name: outputtext Eclipse - 找不到 uri http://java.sun.com/jsf/html 的 facelet 标签库 - Eclipse - Can't find facelet tag library for uri http://java.sun.com/jsf/html 找不到为http://java.sun.com/jsp/jstl/core描述的标签或库 - Can't find tag or library described for http://java.sun.com/jsp/jstl/core JSP错误“找不到“ http://java.sun.com/jsp/jstl/core”的标记库描述符 - JSP error “Can not find the tag library descriptor for ”http://java.sun.com/jsp/jstl/core" 找不到“http://java.sun.com/jsp/jstl/core”的标签库描述符 - Can not find the tag library descriptor for “http://java.sun.com/jsp/jstl/core” 找不到“http://java.sun.com/jsp/jstl/core”的标签库描述符 - Can not find the tag library descriptor for “http://java.sun.com/jsp/jstl/core” 找不到JSF 2.1.13自定义组件:标签库支持命名空间: <namsepace> 但没有为名称定义标签: <compositecomponent> - JSF 2.1.13 custom component not found: Tag Library supports namespace: <namsepace> but no tag was defined for name: <compositecomponent> <p:lineChart>标记库支持名称空间:http://primefaces.org/ui,但未为名称定义任何标记:lineChart - <p:lineChart> Tag Library supports namespace: http://primefaces.org/ui, but no tag was defined for name: lineChart Eclipse xmlns:h =“ http://java.sun.com/jsf/html”无法识别? - Eclipse xmlns:h=“http://java.sun.com/jsf/html” not recognized?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM