Furer Alexander wrote:
Hi
Why getter method of managed bean called few times for particular phase ?
I have "clients" (List) property of managed bean, getter method fetchs
List from DB, how can i fetch only once ?
Below is call trace for it's getter/setter:
Thanks
BEFORE RESTORE_VIEW(1)
setClients, size: 17
AFTER RESTORE_VIEW(1)
BEFORE APPLY_REQUEST_VALUES(2)
getClients, size: 17
getClients, size: 17
getClients, size: 17
AFTER APPLY_REQUEST_VALUES(2)
BEFORE PROCESS_VALIDATIONS(3)
getClients, size: 17
getClients, size: 17
AFTER PROCESS_VALIDATIONS(3)
BEFORE UPDATE_MODEL_VALUES(4)
getClients, size: 19
getClients, size: 19
AFTER UPDATE_MODEL_VALUES(4)
BEFORE INVOKE_APPLICATION(5)
AFTER INVOKE_APPLICATION(5)
BEFORE RENDER_RESPONSE(6)
getClients, size: 19
getClients, size: 19
getClients, size: 19
getClients, size: 19
getClients, size: 19
getClients, size: 19
getClients, size: 19
AFTER RENDER_RESPONSE(6)
Hello,
it depends how many times the clients attibute is referenced in the
page, I think. Just do some chaching ;-).
Best regards
Ondrej Svetlik