简体   繁体   English

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”

I'm using Netbeans 7.4 on Linux Mint 13 Maya. 我在Linux Mint 13 Maya上使用Netbeans 7.4。 I learn how to write a simple JSF composite component. 我学习了如何编写一个简单的JSF复合组件。 But I have some errors: 但是我有一些错误:

when I try to launch my app: 当我尝试启动我的应用程序时:

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

and when I try to use my component: 当我尝试使用我的组件时:

“No library found for namespace http://java.sun.com/jsf/composite/my_composite_component”

Heres the structure of directories in my Netbeans project: 这是我的Netbeans项目中目录的结构:

在此处输入图片说明

and the code: 和代码:

register.xhtml - my composite component register.xhtml-我的复合组件

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"   
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:composite="http://java.sun.com/jsf/composite"
      >

    <composite:interface>

        <composite:attribute name="nameLable" />
        <composite:attribute name="nameValue" />
        <composite:attribute name="emailLable" />
        <composite:attribute name="emailValue" />

        <composite:attribute name="registerButtonText" />
        <composite:attribute name="registerButtonAction" 
                             method-signature="java.lang.String action()" />

    </composite:interface>

    <composite:implementation>

        <h:form>

            <h:message for="textPanel" style="color:red;" />

            <h:panelGrid columns="2" id="textPanel">

                #{cc.attrs.nameLable} : 
                <h:inputText id="name" value="#{cc.attrs.nameValue}" />

                #{cc.attrs.emailLable} : 
                <h:inputText id="email" value="#{cc.attrs.emailValue}" />

            </h:panelGrid>

            <h:commandButton action="#{cc.attrs.registerButtonAction}" 
                             value="#{cc.attrs.registerButtonText}"
                             />

        </h:form>

    </composite:implementation>

</html>

and index.xhtml where I try to use my component: index.xhtml ,我尝试在其中使用组件:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"   
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:my_composite_component="http://java.sun.com/jsf/composite/my_composite_component"
      >

    <h:body>

        <h1>Composite Components in JSF 2.0</h1>

    <my_composite_component:register 
        nameLable="Name" 
        nameValue="#{user.name}" 
        emailLable="E-mail" 
        emailValue="#{user.email}"

        registerButtonText="Register" 
        registerButtonAction="#{user.registerAction}"
     />

    </h:body>

</html>

我使用的是jsf 2.2,而不是java.sun.com/jsf,我将其用作命名空间:

xmlns:my_composite_component="http://xmlns.jcp.org/jsf/composite/my_composite_component

暂无
暂无

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

相关问题 <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 <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> Eclipse xmlns:h =“ http://java.sun.com/jsf/html”无法识别? - Eclipse xmlns:h=“http://java.sun.com/jsf/html” not recognized? 无法找到XML模式名称空间的Spring NamespaceHandler [http://java.sun.com/xml/ns/javaee] - Unable to locate Spring NamespaceHandler for XML schema namespace [http://java.sun.com/xml/ns/javaee]
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM