2012-03-16 26 views
4

プロジェクト内の他のコンポーネント内でコンポジットコンポーネントを使用しています。すべてはJBossの7.1.0にうまく動作しますが、JBossの7.1.1に我々はこのようなエラーが出る:JBoss 7.1.1でネストされたコンポジットコンポーネントが破損しました

No handlers found for exception javax.faces.view.facelets.TagException: 
/resources/components/my/bigComponent.xhtml @21,47 <my:nestedComponent> 
Tag Library supports namespace: http://java.sun.com/jsf/composite/components/my, 
but no tag was defined for name: nestedComponent 

我々はthis JBoss community threadで提案された解決策を試してみましたが、それは(縫い目我々の問題には何も変わっていません私たちはthe only one in this caseではなく、テンプレートファイルのui:defineタグにも含まれているため、解決策が機能しない可能性があります。

ここで我々の2つのコンポーネント:

営巣:

<!DOCTYPE html PUBLIC ...> 
<html xmlns="http://www.w3.org/1999/xhtml" 
    xmlns:h="http://java.sun.com/jsf/html" 
    xmlns:cc="http://java.sun.com/jsf/composite" 
    xmlns:my="http://java.sun.com/jsf/composite/components/my" > 

<cc:interface componentType="..."> 
    <h:panelGroup> 
     <cc:attribute name="someAttribute" /> 
    </h:panelGroup> 
</cc:interface> 

<cc:implementation> 
    <my:nestedComponent content="a text" /> 
</cc:implementation> 
</html> 

ネストされた:

<!DOCTYPE html PUBLIC ...> 
<html xmlns="http://www.w3.org/1999/xhtml" 
    xmlns:h="http://java.sun.com/jsf/html" 
    xmlns:cc="http://java.sun.com/jsf/composite"> 

<cc:interface> 
    <cc:attribute name="content" /> 
</cc:interface> 

<cc:implementation> 
    <h:outputText value="#{cc.attrs.content}" /> 
</cc:implementation> 

</html> 

はそれが回帰ですか?私たちは何か間違っているのですか?第一のリンクでは、提案された解決策は、ネストコンポーネントにこのような何かを暗示:任意のcomposite:renderFacetせず、これはcomposite:facet何ですか

<composite:interface> 
    <composite:facet name="greet1"/> 
    <composite:facet name="greet2"/> 
</composite:interface> 
<composite:implementation> 
    <lib:greet1 name="Stan" /> 
    <lib:greet2 name="Silvert" /> 
</composite:implementation> 

のため?

+0

あなたはJSFの実装を使用しているのxmlnsを移動? MyFaces 2.1.6/2.0.12複合コンポーネントには、ライブラリ名にスラッシュを含めることはできないので注意してください。あなたのライブラリ名は 'components/my'ですが無効です。詳細については、[MYFACES-3454](https://issues.apache.org/jira/browse/MYFACES-3454)を参照してください。 – lu4242

+0

私たちはPrimeface 3.2とJBoss 7.1.1が提供するMojarraバージョンを使用しています。私たちは、最後のJBoss版まで、この種のライブラリ名を問題なく使用していました。 –

答えて

9

バレンタインthis threadで回避策が見つかりました。

アイデアはとても

<!DOCTYPE html PUBLIC ...> 
<html xmlns="http://www.w3.org/1999/xhtml" 
    xmlns:h="http://java.sun.com/jsf/html" 
    xmlns:cc="http://java.sun.com/jsf/composite" 
    xmlns:my="http://java.sun.com/jsf/composite/components/my" > 
<cc:interface /> 
<cc:implementation> 
    <my:nestedComponent content="a text" /> 
</cc:implementation> 
</html> 

<!DOCTYPE html PUBLIC ...> 
<html xmlns="http://www.w3.org/1999/xhtml" 
    xmlns:h="http://java.sun.com/jsf/html" 
    xmlns:cc="http://java.sun.com/jsf/composite" > 
<cc:interface /> 
<cc:implementation xmlns:my="http://java.sun.com/jsf/composite/components/my"> 
    <my:nestedComponent content="a text" /> 
</cc:implementation> 
</html> 

これは同じように動作し

<cc:implementation xmlns:my="http://java.sun.com/jsf/composite/components/my">タグに気づく)となり、<composite:implementation>自体に障害のある名前空間宣言を置くことですチャーム!

+0

ありがとう!情報については、バグレポート:https://issues.jboss.org/browse/AS7-4366 –

+0

バグレポートをありがとう、私はそれを自分自身で済ませたはずです:) –

+1

うわー、刺激的ですが、情報に感謝します。助けて、私はカップルの日を失ってしまいました。 –

0

回答のためにザビエルに感謝します。私はコメントを追加したいが、担当者はいない。それをする。私の場合は

、問題は、テンプレート上のエラー(ではない複合材中:実装)で、ほとんど差である、と私は< CC含まれていません解決策が見つかりました:実装>を...代わりに

、 <HTML>からコンテナにテンプレート内layoutComp( 'div要素' と 'スパン' の両方が働いていた):

<span xmlns:layoutComp="http://java.sun.com/jsf/composite/layoutComp"> 
     <layoutComp:navigation /> 
</span> 
関連する問題