java.lang.Object
jakarta.faces.component.UIComponent
jakarta.faces.component.UIComponentBase
org.omnifaces.component.util.UtilFamily
org.omnifaces.component.util.ResolveComponent
- All Implemented Interfaces:
PartialStateHolder,StateHolder,TransientStateHolder,ComponentSystemEventListener,FacesListener,SystemEventListener,SystemEventListenerHolder,EventListener,FaceletContextConsumer
public class ResolveComponent
extends UtilFamily
implements FaceletContextConsumer, SystemEventListener
The <o:resolveComponent> component is a utility component via which a component can be looked up
by its ID and a reference to it put in either the "facelet scope" (default) or the request scope.
- Since:
- 2.0
- Author:
- Arjan Tijms
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe component type, which is "org.omnifaces.component.util.ResolveComponent".static final StringThe default scope, which is "facelet".Fields inherited from class org.omnifaces.component.util.UtilFamily
COMPONENT_FAMILYFields inherited from class jakarta.faces.component.UIComponent
ATTRS_WITH_DECLARED_DEFAULT_VALUES, BEANINFO_KEY, bindings, COMPOSITE_COMPONENT_TYPE_KEY, COMPOSITE_FACET_NAME, FACETS_KEY, VIEW_LOCATION_KEY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetFor()Returns ID of the component that will be resolved (looked-up) and if found a reference of it made available to EL.getName()Returns name under which the component will be made available to EL.getScope()Returns optional scope identifier used to set the scope in which the component reference is inserted.booleanisListenerForSource(Object source) voidprocessEvent(ComponentSystemEvent event) voidprocessEvent(SystemEvent event) voidsetFaceletContext(FaceletContext faceletContext) Sets the Facelet context.voidSets ID of the component that will be resolved (looked-up) and if found a reference of it made available to EL.voidSets name under which the component will be made available to EL, scoped to the body of the Facelets tag (default) or to the request.voidOptional scope identifier used to set the scope in which the component reference is inserted.Methods inherited from class org.omnifaces.component.util.UtilFamily
getFamily, getRendersChildrenMethods inherited from class jakarta.faces.component.UIComponentBase
addClientBehavior, addFacesListener, broadcast, clearInitialState, decode, encodeAll, encodeBegin, encodeChildren, encodeEnd, findComponent, getAttributes, getChildCount, getChildren, getClientBehaviors, getClientId, getDefaultEventName, getEventNames, getFacesContext, getFacesListeners, getFacet, getFacetCount, getFacets, getFacetsAndChildren, getId, getParent, getPassThroughAttributes, getRenderer, getRendererType, invokeOnComponent, isRendered, isTransient, markInitialState, processDecodes, processRestoreState, processSaveState, processUpdates, processValidators, queueEvent, removeFacesListener, restoreAttachedState, restoreState, saveAttachedState, saveState, setId, setParent, setRendered, setRendererType, setTransient, visitTreeMethods inherited from class jakarta.faces.component.UIComponent
getClientId, getCompositeComponentParent, getContainerClientId, getCurrentComponent, getCurrentCompositeComponent, getListenersForEventClass, getNamingContainer, getPassThroughAttributes, getResourceBundleMap, getStateHelper, getStateHelper, getTransientStateHelper, getTransientStateHelper, getValueExpression, initialStateMarked, isCompositeComponent, isInView, isVisitable, popComponentFromEL, pushComponentToEL, restoreTransientState, saveTransientState, setInView, setValueExpression, subscribeToEvent, unsubscribeFromEvent
-
Field Details
-
COMPONENT_TYPE
The component type, which is "org.omnifaces.component.util.ResolveComponent".- See Also:
-
DEFAULT_SCOPE
The default scope, which is "facelet".- See Also:
-
-
Constructor Details
-
ResolveComponent
public ResolveComponent()Constructs the component.
-
-
Method Details
-
setFaceletContext
Description copied from interface:FaceletContextConsumerSets the Facelet context.- Specified by:
setFaceletContextin interfaceFaceletContextConsumer- Parameters:
faceletContext- The involved Facelet context.
-
isListenerForSource
- Specified by:
isListenerForSourcein interfaceSystemEventListener
-
processEvent
- Specified by:
processEventin interfaceSystemEventListener
-
processEvent
- Specified by:
processEventin interfaceComponentSystemEventListener- Overrides:
processEventin classUIComponent
-
getName
Returns name under which the component will be made available to EL.- Returns:
- Name under which the component will be made available to EL.
-
setName
Sets name under which the component will be made available to EL, scoped to the body of the Facelets tag (default) or to the request.- Parameters:
nameValue- Name under which the component will be made available to EL.
-
getFor
Returns ID of the component that will be resolved (looked-up) and if found a reference of it made available to EL.- Returns:
- ID of the component that will be resolved (looked-up) and if found a reference of it made available to EL.
-
setFor
Sets ID of the component that will be resolved (looked-up) and if found a reference of it made available to EL.- Parameters:
forValue- ID of the component that will be resolved (looked-up) and if found a reference of it made available to EL.
-
getScope
Returns optional scope identifier used to set the scope in which the component reference is inserted. Default isfacelet.- Returns:
- Optional scope identifier used to set the scope in which the component reference is inserted.
-
setScope
Optional scope identifier used to set the scope in which the component reference is inserted. If no scope is specified, the default scope "facelet" will be used.Values values are "facelet" (default) and "request".
- Parameters:
scopeValue- Optional scope identifier used to set the scope in which the component reference is inserted.
-