On 3/22/07, Simon Kitching <[EMAIL PROTECTED]> wrote:
First, please read: http://www.nabble.com/How-to-reply-to-emails-tf3182877.html#a8833555
Sorry. Good rule.
The rendered state of a component depends upon the rendered state of all its parent components, so the rendered property of many components in the page would need to be evaluated.
But if you determine that the parent is not rendered, you can skip the rest of that branch, right?
And in some cases evaluating a rendered EL expression can have side-effects; yes it is poor style to do so but it's not uncommon.
Really? I'm fairly certain I've seen (in my logs, debugging, etc.) most of the EL expressions in a page get evaluated multiple times. Does the spec not say anything about EL being consistent? Relying on EL being evaluated only once seems like it has to violate some aspect of the spec. I always assumed that my expression would be evaluated multiple times and cached appropriately (i.e. when it involved a DB hit or whatever) for this very reason. Most of my experience is with Facelets, does JSP do it differently? At the very least, if the spec doesn't say that the EL for rendered must not be evaluated more than once, relying on that behavior seems like it might not be a good idea. But I can't find the relevant portion of the spec right now.