performance - Avoid unnecessary function calls in JSF -


how can avoid calling function on bean more once if have several html elements call function in rendered attribute?

<h:outputtext value="1" rendered="#{mybean.myfunc() eq 70}"/>  <h:outputtext value="2" rendered="#{mybean.myfunc() eq 42}"/> 

here, second outputtext unnecessarily call myfunc() again. possible avoid behavior?

this answer balusc provides nice way set , reuse variables in jsf.


Comments

Popular posts from this blog

java - Oracle EBS .ClassNotFoundException: oracle.apps.fnd.formsClient.FormsLauncher.class ERROR -

c# - how to use buttonedit in devexpress gridcontrol -

nvd3.js - angularjs-nvd3-directives setting color in legend as well as in chart elements -