- 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
 
 public abstract class ScriptFamily extends UIComponentBase Base class which is to be shared between all components of the Script family.- Author:
- Bauke Scholtz
 
- 
- 
Field SummaryFields Modifier and Type Field Description static StringCOMPONENT_FAMILYThe standard component family.- 
Fields inherited from class jakarta.faces.component.UIComponentATTRS_WITH_DECLARED_DEFAULT_VALUES, BEANINFO_KEY, bindings, COMPOSITE_COMPONENT_TYPE_KEY, COMPOSITE_FACET_NAME, CURRENT_COMPONENT, CURRENT_COMPOSITE_COMPONENT, FACETS_KEY, HONOR_CURRENT_COMPONENT_ATTRIBUTES_PARAM_NAME, VIEW_LOCATION_KEY
 
- 
 - 
Constructor SummaryConstructors Constructor Description ScriptFamily()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidencodeBegin(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.StringgetFamily()ReturnsCOMPONENT_FAMILY.booleangetRendersChildren()Returnstrue.protected booleanmoveToBody(ComponentSystemEvent event)Move this ScriptFamily component to end of body and returnstrueif done so.- 
Methods inherited from class jakarta.faces.component.UIComponentBaseaddClientBehavior, addFacesListener, broadcast, clearInitialState, decode, encodeChildren, findComponent, getAttributes, getChildCount, getChildren, getClientBehaviors, getClientId, getDefaultEventName, getEventNames, getFacesContext, getFacesListeners, getFacet, getFacetCount, getFacets, getFacetsAndChildren, getId, getListenersForEventClass, getParent, getPassThroughAttributes, getRenderer, getRendererType, getValueBinding, invokeOnComponent, isRendered, isTransient, markInitialState, processDecodes, processRestoreState, processSaveState, processUpdates, processValidators, queueEvent, removeFacesListener, restoreAttachedState, restoreState, saveAttachedState, saveState, setId, setParent, setRendered, setRendererType, setTransient, setValueBinding, subscribeToEvent, unsubscribeFromEvent
 - 
Methods inherited from class jakarta.faces.component.UIComponentencodeAll, getClientId, getCompositeComponentParent, getContainerClientId, getCurrentComponent, getCurrentCompositeComponent, getNamingContainer, getPassThroughAttributes, getResourceBundleMap, getStateHelper, getStateHelper, getTransientStateHelper, getTransientStateHelper, getValueExpression, initialStateMarked, isCompositeComponent, isInView, isVisitable, popComponentFromEL, processEvent, pushComponentToEL, restoreTransientState, saveTransientState, setInView, setValueExpression, visitTree
 
- 
 
- 
- 
- 
Field Detail- 
COMPONENT_FAMILYpublic static final String COMPONENT_FAMILY The standard component family.- See Also:
- Constant Field Values
 
 
- 
 - 
Method Detail- 
getFamilypublic String getFamily() ReturnsCOMPONENT_FAMILY.- Specified by:
- getFamilyin class- UIComponent
 
 - 
getRendersChildrenpublic boolean getRendersChildren() Returnstrue.- Overrides:
- getRendersChildrenin class- UIComponentBase
 
 - 
encodeBeginpublic void encodeBegin(FacesContext context) throws IOException If this component is rendered, then start the<script>element.- Overrides:
- encodeBeginin class- UIComponentBase
- Throws:
- IOException
 
 - 
encodeEndpublic void encodeEnd(FacesContext context) throws IOException If this component is rendered, then end the<script>element.- Overrides:
- encodeEndin class- UIComponentBase
- Throws:
- IOException
 
 - 
moveToBodyprotected boolean moveToBody(ComponentSystemEvent event) 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 either- PostAddToViewEventor- PostRestoreStateEvent.
- Returns:
- trueif the move has taken place.
 
 
- 
 
-