I want to build a Composite handling a Bean with 2 members internally:
Bean with Bigdecimal value and String unit
as Attribute for the Composite:
<composite:interface>
<composite:attribute name="id" required="true"/>
<composite:attribute name="bean" required="true" type="a.x.Y"/>
</composite:interface>
<composite:implementation>
<span id="#{cc.clientId}">
<h:outputText value="#{cc.attrs.bean.value}" id="value"/>
<span><h:outputText value="#{cc.attrs.bean.unit}" id="unit"/></span>
</span>
</composite:implementation>
This works fine for calling it like
<my:compOut id="beanId" bean="#{bean}"/>
Now I want to specify formatting, which works within the Composite like
<h:outputText value="#{cc.attrs.bean.value}" id="value">
<f:convertNumber pattern="#,##0.00" locale="de"/>
</h:outputText>
but I want to set it within the calling Facelet:
<my:compOut id="beanId" bean="#{bean}">
<f:convertNumber pattern="#,##0.00" locale="de"/>
</my:compOut>
which does not work. I assume this is since I have no editableValueHolder to
refer to.
In the following there schould be an accordingly Input implementation with 2
InputTexts <my:compIn>.
Is there any solution to this (for output and/or input) or ist that combination
with composites simply not possible (and must be coded in a Java-Component)?
Martin Gruschi