On 5/6/05, Sylvain Vieujot <[EMAIL PROTECTED]> wrote: > I'm trying to refactor the aliasBean to use facets to add aliases, instead > of having to insert aliasBean tags one in another. > > So, it would look like : > > <x:aliasBean> > <f:facet name="aliasName1">#{expression1}</f:facet> > <f:facet name="aliasName2">#{expression2}</f:facet> > <f:facet name="aliasName3">constantString</f:facet> >
The only legal content for a facet is a single component ... so you could do something like this: <x:aliasBean> <f:facet name="aliasName1"> <h:outputText value="#{expression1}"/> </f:facet> </x:aliasBean> and then, if you had a reference to an aliasBean instance, you could say: UIOutput output = (UIOutput) aliasBean.getFacet("aliasName1"); String value = (String) output.getValue(); Craig