Hello - Why do we continually call isRendered after encodeBegin()? Once the
begin tag is written out, it shouldn't matter what the body and end rendered
states are.
Facelets 1.1.11
Myfaces 1.1.5 & 1.2
So if I have <t:div rendered="#{MyBean.alerts > 0}"...
The #{MyBean.alerts method is called 5 times! and it is like this for every
EL eval on the page. I do know that EL can only bind to the FaceletsContext
and no other scopes... So are there any other options than what I have
listed below?
1. Tried to modify MyFaces src in UIComponentBase:
public boolean isRendered()
{
if(_rendered == null){
// our modification! Only compute the rendered value once, and
cache for the rest of the lifecycle.
Boolean rend = getExpressionValue("rendered", _rendered,
DEFAULT_RENDERED);
_rendered = rend.booleanValue();
}
return _rendered;
}
This didn't work :( - Something happend to A4J and we had no ideas what the
implication would be on all components.
2. Tried using Facelets <ui:param and <c:set to store the EL in a page
scoped variable, then have the variable evaluated in the rendered attribute.
This didn't work either because it is on FacesContext.
So this may just be me not fully understanding what JSF does behind the
scenes of component rendering, or some people say that the spec is screwed
up when it comes to this. I'm sure some of the pros can help me out here :).
Thx,
Wesley Hales