* Walk the component tree to perform any required per-component operations.
*/
private void processTree(FacesContext context, UIComponent component) {
// For correct evaluation of #{cc.XXX} binding expressions
CompositeComponentStackManager stackManager = CompositeComponentStackManager.getManager(context);
boolean pushed = false;
if (UIComponent.isCompositeComponent(component)) {
pushed = stackManager.push(component, CompositeComponentStackManager.StackType.TreeCreation);
}
// Only resetting the valid flag in the RESTORE_VIEW phase,
// not during RENDER_RESPONSE
if (!context.getRenderResponse() && component instanceof EditableValueHolder) {
((EditableValueHolder) component).setValid(true);
}
ValueExpression binding = component.getValueExpression("binding");
if (binding != null) {
binding.setValue(context.getELContext(), component);
}
Iterator<UIComponent> it = component.getFacetsAndChildren();
while (it.hasNext()) {
processTree(context, it.next());
}
if (pushed) {
stackManager.pop(CompositeComponentStackManager.StackType.TreeCreation);
}
}