Between a jsf page and a managed bean, why the getter method is called twice

Posted by Bariscan on Stack Overflow See other posts from Stack Overflow or by Bariscan
Published on 2010-05-07T07:10:44Z Indexed on 2010/05/07 11:38 UTC
Read the original article Hit count: 374

Filed under:
|
|

Hi,

I have a jsf page with a form has an outputtext in it. The value of outputtext component is called from a backing bean (or managed bean). I know when I code it as #{MyBean.myString} Jsf rename it and calls getMyString() method. However the wierd thing is, when I put a breakpoint to the getter method of this component, I see it is called twice during the page is being rendered. The outputtext is in a h:form, and it is the only component wich is bind to a backingbean. I mean, it is so wierd that jsf should get the value when it first come to the getter method, however it needs to go to the getter method twice. Can you explain what is the reason of this behaviour in jsf?

Any help would be appreciated, Best wishes, Baris

© Stack Overflow or respective owner

Related posts about jsf

Related posts about managed