<我: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

查看:103
本文介绍了<我:FOO>标记库支持命名空间:http://java.sun.com/jsf/composite/mycomponents,但没有为name定义标记:foo的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个名为< my:foo> 的复合组件,我正在构建另一个名为< my:bar> <的复合组件/ code>。但是当我尝试在<$ c c的< cc:implementation> 中使用< my:foo> 时$ c>< my:bar> ,抛出以下异常:

I have a composite component named <my:foo> and I'm building another composite component named <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> 标签库支持命名空间: http:/ /java.sun.com/jsf/composite/mycomponents ,但没有为名称定义标签:foo

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

如何这是由于这引起的,我该如何解决呢?

How is this caused and how can I solve it?

推荐答案

这是由Mojarra 2.1.8中引入的错误引起的,继续在2.1.9,并在2.1.10中修复。此错误导致复合组件自己的XML命名空间无法在根XML元素中声明,如< ui:component> / < ui:composition> / < html> / etc如下:

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. 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:

<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>

当您尝试嵌套< my时,会导致以下异常:foo> < cc:implementation> 内。


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

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

除了降级到2.1.7并等待2.1.10发布之外,当前的解决方法是将XML名称空间声明移动到< cc:implementation>

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>.

<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>



参见:




  • Mojarra issue 2392

  • < a href =http://java.net/jira/browse/JAVASERVERFACES-2437 =nofollow> Mojarra issue 2437

  • See also:

    • Mojarra issue 2392
    • Mojarra issue 2437
    • 这篇关于&LT;我:FOO&GT;标记库支持命名空间:http://java.sun.com/jsf/composite/mycomponents,但没有为name定义标记:foo的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆