Class UIScript
- java.lang.Object
-
- jakarta.faces.component.UIComponent
-
- jakarta.faces.component.UIComponentBase
-
- org.apache.myfaces.tobago.internal.component.AbstractUIScript
-
- org.apache.myfaces.tobago.component.UIScript
-
- All Implemented Interfaces:
jakarta.faces.component.PartialStateHolder
,jakarta.faces.component.StateHolder
,jakarta.faces.component.TransientStateHolder
,jakarta.faces.event.ComponentSystemEventListener
,jakarta.faces.event.FacesListener
,jakarta.faces.event.SystemEventListenerHolder
,EventListener
@Generated("component.stg") public class UIScript extends AbstractUIScript
This tag adds script files to include into the rendered page.
Some features are deprecated (because of CSP): This tag adds client side script to the rendered page. UIComponent class, generated from templatecomponent.stg
with classScriptTagDeclaration
.
-
-
Field Summary
Fields Modifier and Type Field Description static String
COMPONENT_FAMILY
static String
COMPONENT_TYPE
-
Constructor Summary
Constructors Constructor Description UIScript()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getFamily()
String
getFile()
File name to include into the rendered page.String
getType()
Type of the script.void
restoreState(jakarta.faces.context.FacesContext context, Object state)
void
setFile(String file)
void
setType(String type)
-
Methods inherited from class org.apache.myfaces.tobago.internal.component.AbstractUIScript
processEvent
-
Methods 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, getRendersChildren, invokeOnComponent, isRendered, isTransient, markInitialState, processDecodes, processRestoreState, processSaveState, processUpdates, processValidators, queueEvent, removeFacesListener, restoreAttachedState, saveAttachedState, saveState, setId, setParent, setRendered, setRendererType, setTransient, visitTree
-
Methods 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 Detail
-
COMPONENT_TYPE
public static final String COMPONENT_TYPE
-
COMPONENT_FAMILY
public static final String COMPONENT_FAMILY
- See Also:
- Constant Field Values
-
-
Method Detail
-
getFamily
public String getFamily()
- Specified by:
getFamily
in classjakarta.faces.component.UIComponent
-
getFile
public String getFile()
File name to include into the rendered page. The name must be full qualified, or relative. If using a complete path from root, you'll need to add the contextPath from the web application. This can be done with the EL #{request.contextPath}.- Specified by:
getFile
in classAbstractUIScript
-
setFile
public void setFile(String file)
- Specified by:
setFile
in classAbstractUIScript
-
getType
public String getType()
Type of the script.
Default:text/javascript
- Specified by:
getType
in classAbstractUIScript
-
setType
public void setType(String type)
- Specified by:
setType
in classAbstractUIScript
-
restoreState
public void restoreState(jakarta.faces.context.FacesContext context, Object state)
- Specified by:
restoreState
in interfacejakarta.faces.component.StateHolder
- Overrides:
restoreState
in classjakarta.faces.component.UIComponentBase
-
-