this is typical implementation of custom component's method:
If MyComponent extends UIInput, then if component has ValueExpression for "rendered" (and VE resolves to true), it is evaluated 3x:
add a useful return value for execute and render lifecycle methods like visitTree has already. Then code can be optimized:
- Blake's Axiom of Boolean Properties: You will regret making your property a boolean (http://firstname.lastname@example.org/msg52753.html). Create new Enum or reuse existing VisitResult as return value
- if change to exiting API is not possible, add new method like "UIComponent.isXYZPhaseExecutable"
- if change to API is not possible at all, find a way similar as ELContext.setPropertyResolved(boolean): a property on context "current execute/render method is executable on this component"