Re: Handling component rendered state during postback
hello, i agree with manfred. regards, gerhard 2008/10/13 Manfred Geiler <[EMAIL PROTECTED]> > My understanding of attributes with a value binding is, that the EL > expressions must ALWAYS be evaluated dynamically and must never be > cached. > The same applies for the "rendered" attribute. There is (should be) no > special handling IMHO. > Regarding "ugly problems" and performance issues: > My feeling is, that both can be avoided by having a well designed model. > Please give us an example, Simon, if you cannot agree. > > --Manfred > > > On Tue, Aug 5, 2008 at 4:27 PM, Simon Kitching <[EMAIL PROTECTED]> wrote: > > Hi, > > > > A question on the user list reminded me of something I've been puzzled > about > > for quite a while. > > > > Does the JSF spec actually say that "rendered" EL expressions should be > > re-evaluated during postback? That's what MyFaces currently does, but it > > seems to me that the true/false state should really be part of the > > component's saved state and the restored value simply used during > postback > > (and recalculated in render phase). > > > > Does anyone know why in the current myfaces implementation each component > > recomputes its "rendered" state during postback by using its EL > expression > > rather than using a value cached from the render phase? > > > > Using a cached value would avoid some ugly problems with EL expressions > > being called before updateModel, as well as being a significant > performance > > boost (rendered property tends to get queried several times during > > postback). > > > > Regards, Simon > > > > > -- http://www.irian.at Your JSF powerhouse - JSF Consulting, Development and Courses in English and German Professional Support for Apache MyFaces
Re: Handling component rendered state during postback
My understanding of attributes with a value binding is, that the EL expressions must ALWAYS be evaluated dynamically and must never be cached. The same applies for the "rendered" attribute. There is (should be) no special handling IMHO. Regarding "ugly problems" and performance issues: My feeling is, that both can be avoided by having a well designed model. Please give us an example, Simon, if you cannot agree. --Manfred On Tue, Aug 5, 2008 at 4:27 PM, Simon Kitching <[EMAIL PROTECTED]> wrote: > Hi, > > A question on the user list reminded me of something I've been puzzled about > for quite a while. > > Does the JSF spec actually say that "rendered" EL expressions should be > re-evaluated during postback? That's what MyFaces currently does, but it > seems to me that the true/false state should really be part of the > component's saved state and the restored value simply used during postback > (and recalculated in render phase). > > Does anyone know why in the current myfaces implementation each component > recomputes its "rendered" state during postback by using its EL expression > rather than using a value cached from the render phase? > > Using a cached value would avoid some ugly problems with EL expressions > being called before updateModel, as well as being a significant performance > boost (rendered property tends to get queried several times during > postback). > > Regards, Simon > >
Handling component rendered state during postback
Hi, A question on the user list reminded me of something I've been puzzled about for quite a while. Does the JSF spec actually say that "rendered" EL expressions should be re-evaluated during postback? That's what MyFaces currently does, but it seems to me that the true/false state should really be part of the component's saved state and the restored value simply used during postback (and recalculated in render phase). Does anyone know why in the current myfaces implementation each component recomputes its "rendered" state during postback by using its EL expression rather than using a value cached from the render phase? Using a cached value would avoid some ugly problems with EL expressions being called before updateModel, as well as being a significant performance boost (rendered property tends to get queried several times during postback). Regards, Simon