Class HtmlCommandScript
- java.lang.Object
- 
- jakarta.faces.component.UIComponent
- 
- jakarta.faces.component.UIComponentBase
- 
- jakarta.faces.component.UICommand
- 
- jakarta.faces.component.html.HtmlCommandScript
 
 
 
 
- 
- All Implemented Interfaces:
- ActionSource,- ActionSource2,- PartialStateHolder,- StateHolder,- TransientStateHolder,- ComponentSystemEventListener,- FacesListener,- SystemEventListenerHolder,- EventListener
 
 public class HtmlCommandScript extends UICommand Represents an HTML scriptelement for a function that acts like an ajax form submit. This component must be placed inside a form, and requires JavaScript to be enabled in the client.By default, the rendererTypeproperty must be set to "jakarta.faces.Script". This value can be changed by calling thesetRendererType()method.
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description protected static classHtmlCommandScript.PropertyKeysThe property keys.
 - 
Field SummaryFields Modifier and Type Field Description static StringCOMPONENT_TYPEThe standard component type for this component.- 
Fields inherited from class jakarta.faces.component.UICommandCOMPONENT_FAMILY
 - 
Fields inherited from class jakarta.faces.component.UIComponentATTRS_WITH_DECLARED_DEFAULT_VALUES, BEANINFO_KEY, bindings, COMPOSITE_COMPONENT_TYPE_KEY, COMPOSITE_FACET_NAME, FACETS_KEY, VIEW_LOCATION_KEY
 
- 
 - 
Constructor SummaryConstructors Constructor Description HtmlCommandScript()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetExecute()Return the value of theexecuteproperty.StringgetName()Return the value of thenameproperty.StringgetOnerror()Return the value of theonerrorproperty.StringgetOnevent()Return the value of theoneventproperty.StringgetRender()Return the value of therenderproperty.BooleangetResetValues()Return the value of theresetValuesproperty.booleanisAutorun()Return the value of theautorunproperty.voidsetAutorun(boolean autorun)Set the value of theautorunproperty.voidsetExecute(String execute)Set the value of theexecuteproperty.voidsetName(String name)Set the value of thenameproperty.voidsetOnerror(String onerror)Set the value of theonerrorproperty.voidsetOnevent(String onevent)Set the value of theoneventproperty.voidsetRender(String render)Set the value of therenderproperty.voidsetResetValues(Boolean resetValues)Set the value of theresetValuesproperty.- 
Methods inherited from class jakarta.faces.component.UICommandaddActionListener, broadcast, getActionExpression, getActionListeners, getFamily, getValue, isImmediate, queueEvent, removeActionListener, setActionExpression, setImmediate, setValue
 - 
Methods inherited from class jakarta.faces.component.UIComponentBaseaddClientBehavior, addFacesListener, clearInitialState, decode, encodeBegin, encodeChildren, encodeEnd, findComponent, getAttributes, getChildCount, getChildren, getClientBehaviors, getClientId, getDefaultEventName, getEventNames, getFacesContext, getFacesListeners, getFacet, getFacetCount, getFacets, getFacetsAndChildren, getId, getListenersForEventClass, getParent, getPassThroughAttributes, getRenderer, getRendererType, getRendersChildren, invokeOnComponent, isRendered, isTransient, markInitialState, processDecodes, processRestoreState, processSaveState, processUpdates, processValidators, removeFacesListener, restoreAttachedState, restoreState, saveAttachedState, saveState, setId, setParent, setRendered, setRendererType, setTransient, 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_TYPEpublic static final String COMPONENT_TYPE The standard component type for this component. - See Also:
- Constant Field Values
 
 
- 
 - 
Method Detail- 
isAutorunpublic boolean isAutorun() Return the value of the autorunproperty.- Returns:
- the property value
 Contents: Whether to execute declared JavaScript function during loadevent of thewindow. Defaults tofalse.
 
 - 
setAutorunpublic void setAutorun(boolean autorun) Set the value of the autorunproperty.- Parameters:
- autorun- the new property value
 
 - 
getExecutepublic String getExecute() Return the value of the executeproperty.- Returns:
- the property value
 Contents: This is a space separated list of client identifiers of components that will participate in the "execute" portion of the Request Processing Lifecycle. If a literal is specified the identifiers must be space delimited. Any of the keywords "@this", "@form", "@all", "@none" may be specified in the identifier list. If not specified, the default value of "@this" is assumed. For example, @this clientIdOne clientIdTwo.
 
 - 
setExecutepublic void setExecute(String execute) Set the value of the executeproperty.- Parameters:
- execute- the new property value
 
 - 
getNamepublic String getName() Return the value of the nameproperty.- Returns:
- the property value
 Contents: Name of JavaScript function to be declared, e.g. name="functionName". This can be a namespaced function name, e.g.name="ez.functionName".
 
 - 
setNamepublic void setName(String name) Set the value of the nameproperty.- Parameters:
- name- the new property value
 
 - 
getOnerrorpublic String getOnerror() Return the value of the onerrorproperty.- Returns:
- the property value
 Contents: The name of the JavaScript function that will handle errors. 
 
 - 
setOnerrorpublic void setOnerror(String onerror) Set the value of the onerrorproperty.- Parameters:
- onerror- the new property value
 
 - 
getOneventpublic String getOnevent() Return the value of the oneventproperty.- Returns:
- the property value
 Contents: The name of the JavaScript function that will handle UI events. 
 
 - 
setOneventpublic void setOnevent(String onevent) Set the value of the oneventproperty.- Parameters:
- onevent- the new property value
 
 - 
getRenderpublic String getRender() Return the value of the renderproperty.- Returns:
- the property value
 Contents: This is a space separated list of client identifiers of components that will participate in the "render" portion of the Request Processing Lifecycle. If a literal is specified the identifiers must be space delimited. Any of the keywords "@this", "@form", "@all", "@none" may be specified in the identifier list. If not specified, the default value of "@none" is assumed. For example, @this clientIdOne clientIdTwo.
 
 - 
setRenderpublic void setRender(String render) Set the value of the renderproperty.- Parameters:
- render- the new property value
 
 - 
getResetValuespublic Boolean getResetValues() Return the value of the resetValuesproperty.- Returns:
- the property value
 Contents: Reset specific input values. Interpret the value of the renderattribute as a space separated list of client identifiers suitable for passing directly toUIViewRoot.resetValues(). The implementation must cause anActionListenerto be attached to theActionSourcecomponent in which this tag is nested that callsUIViewRoot.resetValues()passing the value of therenderattribute as the argument.
 
 - 
setResetValuespublic void setResetValues(Boolean resetValues) Set the value of the resetValuesproperty.- Parameters:
- resetValues- the new property value
 
 
- 
 
-