[JAVASERVERFACES_SPEC_PUBLIC-1013] process and encode methods: add equivalent to VisitResult Created: 29/May/11  Updated: 01/Aug/14

Status: Open
Project: javaserverfaces-spec-public
Component/s: Components/Renderers
Affects Version/s: 2.2
Fix Version/s: None

Type: New Feature Priority: Minor
Reporter: Martin Kočí Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Tags: performance


this is typical implementation of custom component's method:


if (!isRendered()) {
// do specific stuff

If MyComponent extends UIInput, then if component has ValueExpression for "rendered" (and VE resolves to true), it is evaluated 3x:

  1. MyComponent.processDecodes
  2. javax.faces.component.UIInput.processDecodes(FacesContext)
  3. javax.faces.component.UIComponentBase.processDecodes(FacesContext)

add a useful return value for execute and render lifecycle methods like visitTree has already. Then code can be optimized:


if (!super.processDecodes(context))

// do specific stuff


  • Blake's Axiom of Boolean Properties: You will regret making your property a boolean (http://www.mail-archive.com/dev@myfaces.apache.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"

Comment by Ed Burns [ 01/Aug/14 ]

Set priority to baseline ahead of JSF 2.3 triage. Priorities will be assigned accurately after this exercise.

Comment by Manfred Riem [ 01/Aug/14 ]

Setting priority to Minor

Generated at Sat Oct 22 08:04:54 UTC 2016 using JIRA 6.2.3#6260-sha1:63ef1d6dac3f4f4d7db4c1effd405ba38ccdc558.