Top Description Inners Fields Constructors Methods
javax.faces.component.html

public Class HtmlCommandScript

extends UICommand
Class Inheritance
Imports
java.io.IOException, java.util.ArrayList, .Arrays, .List, javax.faces.context.FacesContext, javax.el.MethodExpression, .ValueExpression

Represents an HTML script element 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 rendererType property must be set to "javax.faces.Script". This value can be changed by calling the setRendererType() method.

Nested and Inner Type Summary

Modifier and TypeClass and Description
protected static enum

Field Summary

Modifier and TypeField and Description
public static final String
COMPONENT_TYPE

Hides javax.faces.component.UICommand.COMPONENT_TYPE.

The standard component type for this component.

private static final String
Inherited from javax.faces.component.UICommand:
COMPONENT_FAMILY

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public String

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.

getExecute
()

Return the value of the execute property.

public String

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".

getName
()

Return the value of the name property.

public String

Returns:

the property value

Contents: The name of the JavaScript function that will handle errors.

getOnerror
()

Return the value of the onerror property.

public String

Returns:

the property value

Contents: The name of the JavaScript function that will handle UI events.

getOnevent
()

Return the value of the onevent property.

public String

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.

getRender
()

Return the value of the render property.

public Boolean

Returns:

the property value

Contents: Reset specific input values. Interpret the value of the render attribute as a space separated list of client identifiers suitable for passing directly to UIViewRoot.resetValues(). The implementation must cause an ActionListener to be attached to the ActionSource component in which this tag is nested that calls UIViewRoot.resetValues() passing the value of the render attribute as the argument.

getResetValues
()

Return the value of the resetValues property.

private void
public boolean

Returns:

the property value

Contents: Whether to execute declared JavaScript function during load event of the window. Defaults to false.

isAutorun
()

Return the value of the autorun property.

public void
setAutorun(boolean
the new property value
autorun
)

Set the value of the autorun property.

public void
setExecute(String
the new property value
execute
)

Set the value of the execute property.

public void
setName(String
the new property value
name
)

Set the value of the name property.

public void
setOnerror(String
the new property value
onerror
)

Set the value of the onerror property.

public void
setOnevent(String
the new property value
onevent
)

Set the value of the onevent property.

public void
setRender(String
the new property value
render
)

Set the value of the render property.

public void
setResetValues(Boolean
the new property value
resetValues
)

Set the value of the resetValues property.

Inherited from javax.faces.component.UICommand:
addActionListenerbroadcastgetActiongetActionExpressiongetActionListenergetActionListenersgetFamilygetValueisImmediatequeueEventremoveActionListenersetActionsetActionExpressionsetActionListenersetImmediatesetValue

Field Detail

COMPONENT_TYPEback to summary
public static final String COMPONENT_TYPE

Hides javax.faces.component.UICommand.COMPONENT_TYPE.

The standard component type for this component.

OPTIMIZED_PACKAGEback to summary
private static final String OPTIMIZED_PACKAGE

Constructor Detail

HtmlCommandScriptback to summary
public HtmlCommandScript()

Method Detail

getExecuteback to summary
public String getExecute()

Return the value of the execute property.

Returns:String

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.

getNameback to summary
public String getName()

Return the value of the name property.

Returns:String

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".

getOnerrorback to summary
public String getOnerror()

Return the value of the onerror property.

Returns:String

the property value

Contents: The name of the JavaScript function that will handle errors.

getOneventback to summary
public String getOnevent()

Return the value of the onevent property.

Returns:String

the property value

Contents: The name of the JavaScript function that will handle UI events.

getRenderback to summary
public String getRender()

Return the value of the render property.

Returns:String

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.

getResetValuesback to summary
public Boolean getResetValues()

Return the value of the resetValues property.

Returns:Boolean

the property value

Contents: Reset specific input values. Interpret the value of the render attribute as a space separated list of client identifiers suitable for passing directly to UIViewRoot.resetValues(). The implementation must cause an ActionListener to be attached to the ActionSource component in which this tag is nested that calls UIViewRoot.resetValues() passing the value of the render attribute as the argument.

handleAttributeback to summary
private void handleAttribute(String name, Object value)
isAutorunback to summary
public boolean isAutorun()

Return the value of the autorun property.

Returns:boolean

the property value

Contents: Whether to execute declared JavaScript function during load event of the window. Defaults to false.

setAutorunback to summary
public void setAutorun(boolean autorun)

Set the value of the autorun property.

Parameters
autorun:boolean

the new property value

setExecuteback to summary
public void setExecute(String execute)

Set the value of the execute property.

Parameters
execute:String

the new property value

setNameback to summary
public void setName(String name)

Set the value of the name property.

Parameters
name:String

the new property value

setOnerrorback to summary
public void setOnerror(String onerror)

Set the value of the onerror property.

Parameters
onerror:String

the new property value

setOneventback to summary
public void setOnevent(String onevent)

Set the value of the onevent property.

Parameters
onevent:String

the new property value

setRenderback to summary
public void setRender(String render)

Set the value of the render property.

Parameters
render:String

the new property value

setResetValuesback to summary
public void setResetValues(Boolean resetValues)

Set the value of the resetValues property.

Parameters
resetValues:Boolean

the new property value

javax.faces.component.html back to summary

protected final Enum HtmlCommandScript.PropertyKeys

extends Enum<HtmlCommandScript.PropertyKeys>
Class Inheritance

Field Summary

Modifier and TypeField and Description
public static final HtmlCommandScript.PropertyKeys
public static final HtmlCommandScript.PropertyKeys
public static final HtmlCommandScript.PropertyKeys
public static final HtmlCommandScript.PropertyKeys
public static final HtmlCommandScript.PropertyKeys
public static final HtmlCommandScript.PropertyKeys
public static final HtmlCommandScript.PropertyKeys
pack-priv String

Constructor Summary

AccessConstructor and Description
private
PropertyKeys(String toString)

private

Method Summary

Modifier and TypeMethod and Description
public String
toString()

Overrides java.lang.Enum.toString.

Returns the name of this enum constant, as contained in the declaration.
public static HtmlCommandScript.PropertyKeys
public static HtmlCommandScript.PropertyKeys[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinalvalueOf

Field Detail

autorunback to summary
public static final HtmlCommandScript.PropertyKeys autorun
executeback to summary
public static final HtmlCommandScript.PropertyKeys execute
nameback to summary
public static final HtmlCommandScript.PropertyKeys name

Hides java.lang.Enum.name.

onerrorback to summary
public static final HtmlCommandScript.PropertyKeys onerror
oneventback to summary
public static final HtmlCommandScript.PropertyKeys onevent
renderback to summary
public static final HtmlCommandScript.PropertyKeys render
resetValuesback to summary
public static final HtmlCommandScript.PropertyKeys resetValues
toStringback to summary
pack-priv String toString

Constructor Detail

PropertyKeysback to summary
private PropertyKeys(String toString)
PropertyKeysback to summary
private PropertyKeys()

Method Detail

toStringback to summary
public String toString()

Overrides java.lang.Enum.toString.

Doc from java.lang.Enum.toString.

Returns the name of this enum constant, as contained in the declaration. This method may be overridden, though it typically isn't necessary or desirable. An enum class should override this method when a more "programmer-friendly" string form exists.

Returns:String

the name of this enum constant

valueOfback to summary
public static HtmlCommandScript.PropertyKeys valueOf(String name)
valuesback to summary
public static HtmlCommandScript.PropertyKeys[] values()