固定されていないプロパティでJSF 2 複合コンポーネントeditableValueHolder
タグを使用する方法。name
新しい複合コンポーネントでコンバーターを受け入れる必要があります。そのために、次のコードを実行しています。
outputText.xhtml
<composite:interface>
<composite:attribute name="value" required="false" />
<composite:editableValueHolder name="txtText"/>
</composite:interface>
<composite:implementation>
<h:outputText id="txtText" value="#{cc.attrs.value}" />
</composite:implementation>
example.xhtml
<cv:outputText id="txtText" value="#{bean.description}" >
<f:converter converterId="TestConverter" for="txtText"/>
</cv:outputText>
この場合、editableValueHolder の name 属性を静的に定義し、コンバーター宣言の "for" 属性で同じことを行う必要があります。f:converter タグの「for」にコピーするには、editableValueHolder の名前で指定された内容を知る必要があります。
editableValueHolder の name 属性にパラメーターを渡すなど、これを行う別の方法があるかどうかを知りたいです。