java.lang.Object
jakarta.faces.component.UIComponent
jakarta.faces.component.UIComponentBase
org.omnifaces.component.script.ScriptFamily
- All Implemented Interfaces:
PartialStateHolder,StateHolder,TransientStateHolder,ComponentSystemEventListener,FacesListener,SystemEventListenerHolder,EventListener
- Direct Known Subclasses:
DeferredScript,OnloadScript,Socket
Base class which is to be shared between all components of the Script family.
- Author:
- Bauke Scholtz
-
Field Summary
FieldsFields 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 TypeMethodDescriptionvoidencodeBegin(FacesContext context) If this component is rendered, then start the<script>element.voidencodeEnd(FacesContext context) If this component is rendered, then end the<script>element.ReturnsCOMPONENT_FAMILY.booleanReturnstrue.protected booleanmoveToBody(ComponentSystemEvent event) Move this ScriptFamily component to end of body and returnstrueif done so.Methods inherited from class jakarta.faces.component.UIComponentBase
addClientBehavior, addFacesListener, broadcast, clearInitialState, decode, encodeAll, encodeChildren, 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, processEvent, pushComponentToEL, restoreTransientState, saveTransientState, setInView, setValueExpression, subscribeToEvent, unsubscribeFromEvent
-
Field Details
-
COMPONENT_FAMILY
The standard component family.- See Also:
-
-
Constructor Details
-
ScriptFamily
public ScriptFamily()
-
-
Method Details
-
getFamily
ReturnsCOMPONENT_FAMILY.- Specified by:
getFamilyin classUIComponent
-
getRendersChildren
public boolean getRendersChildren()Returnstrue.- Overrides:
getRendersChildrenin classUIComponentBase
-
encodeBegin
If this component is rendered, then start the<script>element.- Overrides:
encodeBeginin classUIComponentBase- Throws:
IOException
-
encodeEnd
If this component is rendered, then end the<script>element.- Overrides:
encodeEndin classUIComponentBase- Throws:
IOException
-
moveToBody
Move this ScriptFamily component to end of body and returnstrueif done so. This method needs to be called fromUIComponent.processEvent(ComponentSystemEvent)duringPostAddToViewEventorPostRestoreStateEvent. This has basically the same effect as settingtarget="body"on a component resource.- Parameters:
event- The involved event, which can be eitherPostAddToViewEventorPostRestoreStateEvent.- Returns:
trueif the move has taken place.
-