public interface ComponentProcessor<T>
processComponent
is
called, the component instance is guaranteed to be in the correct context.
Instances of this interface are parameterized by the type of the callbackContext the implementor
expects. The typical usage is that the implementor creates and instance of the desired context
and calls a helper method on a different object (for example
UIXComponent.processComponent
with the desired ComponentProcessor and context
instances to actually perform the iteration.
Because the ComponentProcessor can't look ahead, more complex iteration tasks, such as laying out and rendering components based on the number of components to render may require multiple-passes--one to collect the layout information into the callbackContext using one ComponentProcessor implementation and a second pass using a different ComponentProcessor to actually perform the layout using the information calculated in the first pass.
FlattenedComponent
,
UIXComponent.processFlattenedChildren(FacesContext, ComponentProcessor, UIComponent, Object)
,
UIXComponent.processFlattenedChildren(FacesContext, ComponentProcessor, Iterable, Object)
,
UIXComponent.processFlattenedChildren(FacesContext, ComponentProcessingContext, ComponentProcessor, UIComponent, Object)
,
UIXComponent.processFlattenedChildren(FacesContext, ComponentProcessingContext, ComponentProcessor, Iterable, Object)
Modifier and Type | Method and Description |
---|---|
void |
processComponent(javax.faces.context.FacesContext context,
ComponentProcessingContext cpContext,
javax.faces.component.UIComponent component,
T callbackContext)
Processes a component
|
void processComponent(javax.faces.context.FacesContext context, ComponentProcessingContext cpContext, javax.faces.component.UIComponent component, T callbackContext) throws IOException
context
- The current FacesContextcpContext
- context represtinging the current component iteration statecomponent
- Component to process on this iterationcallbackContext
- ComponentProcessor-specific contextIOException
- if processing resulted in an IOExceptionCopyright © 2001-2017 The Apache Software Foundation. All Rights Reserved.