2012-07-06 67 views
0

爲什麼targetAttributeName是不是在我複合材料構件的認可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> 
.. 

我看到這一點:「的組件庫組合部分不 含有成分targetAttributeName」

,我可以看到我沒有targetAttributeName和clientBehaviour屬性,爲什麼?

im使用的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
  • 目標
  • 短暫

回答

0

此標記不存在的。您很可能會將<cc:attribute>的屬性混爲一個單獨的標記。

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

要了解所有標記(和屬性!)提供JSF 2.1,頭VDL documentation