targetAttributeName属性未定义

时间:2012-07-06 17:07:06

标签: jsf jsf-2 composite-component

为什么我的复合组件

中无法识别targetAttributeName
<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:p="http://primefaces.org/ui"
      xmlns:cc="http://java.sun.com/jsf/composite">

    <!-- INTERFACE -->
    <cc:interface componentType="myComponentExample">
      <cc:targetAttributeName..../>
    </cc:interface>
..

我看到了这一点:“组件库Composite Components没有 包含组件targetAttributeName“

我可以看到我没有targetAttributeName和clientBehaviour 属性,为什么?

我正在使用Netbeans 7.1,MyFaces 2.1.8和TomEE 1.0(主干更新)

此属性自JSF 2.1以来,但我无法使用它

的pom.xml:

<dependency>
            <groupId>org.apache.myfaces.core</groupId>
            <artifactId>myfaces-api</artifactId>
            <version>2.1.8</version>
            <scope>provided</scope>
        </dependency>

         <!--Apache MyFaces-->
        <dependency>
            <groupId>org.apache.myfaces.core</groupId>
            <artifactId>myfaces-impl</artifactId>
            <version>2.1.8</version>
            <scope>provided</scope>
        </dependency>

我只能看到这个属性:

  • 名称
  • 默认
  • 的displayName
  • 专家
  • ID
  • 方法签名
  • 优选
  • 呈现
  • renderType
  • 需要
  • SHORTDESCRIPTION
  • 目标
  • 瞬态

1 个答案:

答案 0 :(得分:0)

此标记根本不存在。您很可能会混淆<cc:attribute>属于单独标记的属性。

<cc:attribute targetAttributeName="..." />

要了解JSF 2.1中提供的所有标记(和属性!),请转到VDL documentation