Hi,
if you have a code like this:
<h:dataTable value=”#{bean.texts}” rendered=”false”/>
and your Bean.java as
public List getTexts(){
System.out.println(“getTexts getter called”);
return new ArrayList();
}
the getter is still called even if the datatable is not rendered. This does not happen in inputText or outputText etc.
I have to learn taht in JSF I can never trust the getters 😉
Advertisements
I also noticed this and I don’t think this is expected behaviour.
It doesn’t make sense the getter gets called.
EL of components shouldn’t be evaluated whenever rendered attribute is set to false. Just my 2 cents …
I don’t get the idea also.
maybe they will fix it in next release 😉
I wonder if it happens also in myfaces. I saw it in mojarra because.
Are you also working with facelets?
yes, I have tested it on JSF 2.0 btw
Hmm, I’m also using facelets + SpringBeanFacesELResolver.
Hello,
Is getter called in RENDER_RESPONSE phase? All getters get called in RESTORE_VIEW phase because view has to be restored at first and the “rendered” attribute can not be yet evaluated in this phase.