aspose file tools*
The moose likes Struts and the fly likes getters and setters in JSF Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "getters and setters in JSF" Watch "getters and setters in JSF" New topic
Author

getters and setters in JSF

Varun Khanna
Ranch Hand

Joined: May 30, 2002
Posts: 1400
Hey there,

How can I indentify how many times the geter/setter methods of the backing bean would be called during a normal request life cycle. I would expects each of the gettet/setter to be called once , i.e.:
Getter - While rendering the response
Setter - While updating the model bean in the Update Model phase,

But I normally don't see any trend. For a same component, like datatable, in one page the getter/setter method (the method reference by the binding of "value" attribute of datatable)of the backing bean is called once whereas in the another page having datatable, the getter method is called twice.


- Varun
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: getters and setters in JSF