You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by "l.penet@senat.fr" <l....@senat.fr> on 2012/06/14 10:52:30 UTC
el expression parameter of a composite component
Dear all,
I am experiencing a strange behaviour with a composite component.
It seems to me that attributes values specified as el expressions are
computed only once, and very early, when the composite component
declaration specifies a componentType.
I published an example on
http://stackoverflow.com/questions/11020297/updatable-composite-component .
What is our opinion on this problem ? Is it a myfaces specific bug ?
I am using :
* Tomcat 6.0.33 (with unmodified el lib) ; ;
* MyFaces 2.1.7
* CODI 1.0.5
* OWB 1.1.3
Thanks in advance.
Ludovic
|
| AVANT D'IMPRIMER, PENSEZ A L'ENVIRONNEMENT.
|
Re: el expression parameter of a composite component
Posted by "l.penet@senat.fr" <l....@senat.fr>.
On 14/06/2012 12:40, Leonardo Uribe wrote:
> Hi
>
> I have checked the problem and what you need to do is implement your
> properties into your component class using StateHelper methods,
> otherwise the properties will not be saved and restored.
>
> Take a look at:
>
> http://svn.apache.org/repos/asf/myfaces/core/trunk/api/src/main/java/javax/faces/component/UIOutput.java
>
> There, you'll see how to do it. But I think in your case there is no
> need to implement augmentedSen property into the component at all, and
> instead use the stored ValueExpression to find the right bean. If
> "augementedSen" is an "attached object" of the composite component,
> similar to converters or validators or behaviors, it has sense to
> implement it into the component class.
Thanks a lot for your answer.
I will take a closer look at it in July, as it is seems to be the right
things to do.
Being in a hurry, I had to quickly and dirtily retrive the parameter
bean by name in the backend bean for now... :-|
Thanks again.
Ludovic
|
| AVANT D'IMPRIMER, PENSEZ A L'ENVIRONNEMENT.
|
Re: el expression parameter of a composite component
Posted by Leonardo Uribe <lu...@gmail.com>.
Hi
I have checked the problem and what you need to do is implement your
properties into your component class using StateHelper methods,
otherwise the properties will not be saved and restored.
Take a look at:
http://svn.apache.org/repos/asf/myfaces/core/trunk/api/src/main/java/javax/faces/component/UIOutput.java
There, you'll see how to do it. But I think in your case there is no
need to implement augmentedSen property into the component at all, and
instead use the stored ValueExpression to find the right bean. If
"augementedSen" is an "attached object" of the composite component,
similar to converters or validators or behaviors, it has sense to
implement it into the component class.
regards,
Leonardo Uribe
2012/6/14 l.penet@senat.fr <l....@senat.fr>:
> Dear all,
>
> I am experiencing a strange behaviour with a composite component.
>
> It seems to me that attributes values specified as el expressions are
> computed only once, and very early, when the composite component declaration
> specifies a componentType.
>
> I published an example on
> http://stackoverflow.com/questions/11020297/updatable-composite-component .
>
> What is our opinion on this problem ? Is it a myfaces specific bug ?
>
> I am using :
> * Tomcat 6.0.33 (with unmodified el lib) ; ;
> * MyFaces 2.1.7
> * CODI 1.0.5
> * OWB 1.1.3
>
> Thanks in advance.
>
> Ludovic
>
> |
> | AVANT D'IMPRIMER, PENSEZ A L'ENVIRONNEMENT.
> |
>