myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sylvain Vieujot <svieu...@apache.org>
Subject Re: How do I get a facet's body as string
Date Fri, 06 May 2005 18:11:37 GMT
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 <svieujot@apache.org> 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

Mime
View raw message