Hi Leonardo

This is the code of
> > src/main/java-templates/org/apache/myfaces/custom/buffer/BufferTemplate.java
> >
> > public class Buffer extends UIComponentBase{
> > {
> >     /**/private String _into = null;
> >
> >     void fill(String content, FacesContext facesContext){
> >         ValueExpression intoVB;
> >
> >         if (_into == null) {
> >             intoVB = getValueExpression("into");
> >             _into = intoVB.getExpressionString();
> >         } else {
> >             intoVB = facesContext.getApplication().
> >             getExpressionFactory().createValueExpression(
> >                     facesContext.getELContext(), _into, Object.class );
> >         }
> >
> >         intoVB.setValue(facesContext.getELContext(), content);
> >     }
> > }
>
>
I have looked at the code-snippet again - and I am really wondering what
this code is trying to achieve - the possibility to call setInto("#{
mybean.ve}"); ? that would not be very JSF-like, right? In my humble opinion
the private field can be removed, and the else-part of the clause as well,
and the code would change to the better. Usually, especially in JSF with
value-expression evaluation in the getter, component-logic should access the
data of the component just like everything else is accessing it: through the
getter!

regards,

Martin

Reply via email to