Why is the getter called so many times by the rendered attribute?

前端 未结 2 1957
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-11-30 09:47

Related to a previous example, i tried to monitor my get/set methods on the server (when they are called, and how often). So, my actual been look such :

@Man         


        
2条回答
  •  迷失自我
    2020-11-30 10:23

    you can use CDI Producers methods. It will be called many times, but the result of first call is cached in scope of the bean and is efficient for getters that are computing or initializing heavy objects! See here, for more info.

提交回复
热议问题