I'm trying to understand what a JSF snippet does. It goes something like this
<composite:interface>
<composite:attribute name="field" />
<composite:attribute name="value" default=""/>
[...]
</composite:interface>
<composite:implementation>
<ui:fragment rendered="some_logic_here">
<h:outputText value="#{cc.attrs.value}">
<f:attribute name="value" value="#{cc.attrs.field.value}"/>
</h:outputText>
</ui:fragment>
</composite:implementation>
The field
attribute refers to a bean
member that has getValue() / setValue()
accessors (for a string).
The value
attribute is a string that comes from elsewhere.
From what I understand, the output
's value is initially set to the (static) value
attribute: value="#{cc.attrs.value}"
, then the <f:attribute>
tag sets something to the "dynamic" value retrieved from the "field" bean.
How does this work out? Does the "dynamic" value override the static one? Always?