Thanks Craig,

So I guess I should better change my format for something like :

<aliasBeanScope>
    <aliasBean name="#{aliasName1}" value="#{expression1}"/>
    <aliasBean name="#{aliasName2}" value="#{expression2}"/>
   
    ...

</aliasBeanScope>

What do you think ?

On Fri, 2005-05-06 at 11:00 -0700, Craig McClanahan wrote:
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

Reply via email to