Hello Sebastien,
Sorry for the late answer, I was actually browsing about regions because I failed to have Facelets work easily with data bindings and found this thread. Actually, Trinidad does support regions (not sure how functional it is either), but it's a secret feature that's flagged experimental, undomcumented and deprecated. Actually it's more than deprecated, it's not officially supported at all and, because of that, might get dumped at any time without any notice. It's so mainly because Trinidad has native Facelets support, which is superior and has community acknowledgment, whereas regions remains marginal. You can use the equivalent of region using the following (can be found in Trinidad demo code):
In your page
<tr:componentRef id="reg1" componentType="org.apache.myfaces.trinidaddemo.region.stock"
value="Watch this stock">
<f:attribute name="symbol" value="XYZ"/>
<f:attribute name="company" value="XYZ Incorp"/>
<f:attribute name="amount" value="13.66"/>
<f:facet name="action">
<tr:commandButton text="Buy" disabled="true"/>
</f:facet>
</tr:componentRef>
In WEB-INF/region-metadata.xml:
<faces-config>
<component>
<component-type>org.apache.myfaces.trinidaddemo.region.stock</component-type>
<component-class>
org.apache.myfaces.trinidad.component.UIXRegion
</component-class>
<component-extension>
<region-jsp-ui-def>/components/regions/stock.jspx</region-jsp-ui-def>
</component-extension>
<attribute>
<attribute-name>symbol</attribute-name>
<attribute-class>java.lang.String</attribute-class>
<attribute-extension>
<required>true</required>
</attribute-extension>
</attribute>
<attribute>
<attribute-name>amount</attribute-name>
<attribute-class>float</attribute-class>
<default-value>0</default-value>
</attribute>
<attribute>
<attribute-name>company</attribute-name>
<attribute-class>java.lang.String</attribute-class>
<default-value>Default Company</default-value>
</attribute>
<attribute>
<attribute-name>description</attribute-name>
<attribute-class>java.lang.String</attribute-class>
<default-value>Default Description</default-value>
</attribute>
</component>
</faces-config>
In the region page (here /components/regions/stock.jspx):
<tr:componentDef var="stuff">
<tr:panelBox text="Symbol:#{stuff.symbol} Company:#{stuff.company}">
<tr:outputText value="#{stuff.description}"/>
<tr:outputFormatted
value="<br>Current Value:<b>$#{stuff.amount}</b>"/>
<tr:outputFormatted rendered="#{not empty bindings}"
value="<br>Value attribute is:#{bindings}"/>
<tr:facetRef facetName="action"/>
</tr:panelBox>
</tr:componentDef>
For now it's part of the JAR, so it's available. It's far from the best solution, but it'll most likely provide what you need for a first migration phase. Moving to either Facelets or 11g templates is probably going to be mandatory in the future but, who knows, if you're lucky enough, that future could be far enough for some templating standard to emerge, possibly with JSF 2.0, see
https://javaserverfaces-spec-public.dev.java.net/proposals/JSF-2_0-draft.html.
Regards,
~ Simon