|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.faces.component.behavior.ClientBehaviorContext
public abstract class ClientBehaviorContext
ClientBehaviorContext
provides context information that may be useful to
ClientBehavior.getScript(javax.faces.component.behavior.ClientBehaviorContext)
implementations.
Nested Class Summary | |
---|---|
static class |
ClientBehaviorContext.Parameter
Parameter instances represent name/value pairs that "submitting" ClientBehavior implementations should include when posting back into the Faces lifecycle. |
Constructor Summary | |
---|---|
ClientBehaviorContext()
|
Method Summary | |
---|---|
static ClientBehaviorContext |
createClientBehaviorContext(FacesContext context,
UIComponent component,
java.lang.String eventName,
java.lang.String sourceId,
java.util.Collection<ClientBehaviorContext.Parameter> parameters)
Creates a ClientBehaviorContext instance. |
abstract UIComponent |
getComponent()
Returns the |
abstract java.lang.String |
getEventName()
Returns the name of the behavior event for which the ClientBehavior script is being requested. |
abstract FacesContext |
getFacesContext()
Returns the |
abstract java.util.Collection<ClientBehaviorContext.Parameter> |
getParameters()
Returns parameters that "submitting"
|
abstract java.lang.String |
getSourceId()
Returns an id for use as the
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ClientBehaviorContext()
Method Detail |
---|
public static ClientBehaviorContext createClientBehaviorContext(FacesContext context, UIComponent component, java.lang.String eventName, java.lang.String sourceId, java.util.Collection<ClientBehaviorContext.Parameter> parameters)
Creates a ClientBehaviorContext instance.
context
- the FacesContext
for the current request.component
- the component instance to which the
ClientBehavior
is attached.eventName
- the name of the behavior event to which the
ClientBehavior
is attached.sourceId
- the id to use as the ClientBehavior's "source".parameters
- the collection of parameters for submitting
ClientBehaviors to include in the request.
ClientBehaviorContext
instance configured with the
provided values.
java.lang.NullPointerException
- if context
,
component
or eventName
is null
public abstract FacesContext getFacesContext()
Returns the FacesContext
for
the current request.
public abstract UIComponent getComponent()
Returns the UIComponent
that is
requesting the ClientBehavior
script.
public abstract java.lang.String getEventName()
Returns the name of the behavior event for which the ClientBehavior script is being requested.
public abstract java.lang.String getSourceId()
Returns an id for use as the
ClientBehavior
source. ClientBehavior implementations that submit back
to the Faces lifecycle are required to identify which component
triggered the ClientBehavior-initiated request via the
javax.faces.source
request parameter. In
most cases, th source id can be trivially derived from the element
to which the behavior's client-side script is attached - ie. the
source id is typically the id of this element. However, in components
which produce more complex content, the behavior script may not be able to
determine the correct id to use for the javax.faces.source
value. The getSourceId()
method allows the component
to pass this information into the ClientBehavior.getScript(javax.faces.component.behavior.ClientBehaviorContext)
implementation.
public abstract java.util.Collection<ClientBehaviorContext.Parameter> getParameters()
Returns parameters that "submitting"
ClientBehavior
implementations should include when posting back data
into the Faces lifecycle. If no parameters are specified, this method
returns an empty (non-null) collection.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |