|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ComponentProcessor<T>
Interface implemented to apply the visitor pattern to a set of components where the
components are not necessarily siblings of each other. When 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)
Method Summary | |
---|---|
void |
processComponent(javax.faces.context.FacesContext context,
ComponentProcessingContext cpContext,
javax.faces.component.UIComponent component,
T callbackContext)
Processes a component |
Method Detail |
---|
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 context
IOException
- if processing resulted in an IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |