private static final class ClientBehaviorContext.ClientBehaviorContextImpl extends ClientBehaviorContext
ClientBehaviorContext.Parameter
Modifier and Type | Field and Description |
---|---|
private UIComponent |
component |
private FacesContext |
context |
private java.lang.String |
eventName |
private java.util.Collection<ClientBehaviorContext.Parameter> |
parameters |
private java.lang.String |
sourceId |
Modifier | Constructor and Description |
---|---|
private |
ClientBehaviorContextImpl(FacesContext context,
UIComponent component,
java.lang.String eventName,
java.lang.String sourceId,
java.util.Collection<ClientBehaviorContext.Parameter> parameters) |
Modifier and Type | Method and Description |
---|---|
UIComponent |
getComponent()
Returns the |
java.lang.String |
getEventName()
Returns the name of the behavior event for which the ClientBehavior script is being requested. |
FacesContext |
getFacesContext()
Returns the |
java.util.Collection<ClientBehaviorContext.Parameter> |
getParameters()
Returns parameters that "submitting"
|
java.lang.String |
getSourceId()
Returns an id for use as the
|
createClientBehaviorContext
private FacesContext context
private UIComponent component
private java.lang.String eventName
private java.lang.String sourceId
private java.util.Collection<ClientBehaviorContext.Parameter> parameters
private ClientBehaviorContextImpl(FacesContext context, UIComponent component, java.lang.String eventName, java.lang.String sourceId, java.util.Collection<ClientBehaviorContext.Parameter> parameters)
public FacesContext getFacesContext()
ClientBehaviorContext
Returns the FacesContext
for
the current request.
getFacesContext
in class ClientBehaviorContext
public UIComponent getComponent()
ClientBehaviorContext
Returns the UIComponent
that is
requesting the ClientBehavior
script.
getComponent
in class ClientBehaviorContext
public java.lang.String getEventName()
ClientBehaviorContext
Returns the name of the behavior event for which the ClientBehavior script is being requested.
getEventName
in class ClientBehaviorContext
public java.lang.String getSourceId()
ClientBehaviorContext
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 ClientBehaviorContext.getSourceId()
method allows the component
to pass this information into the ClientBehavior.getScript(javax.faces.component.behavior.ClientBehaviorContext)
implementation.
getSourceId
in class ClientBehaviorContext
public java.util.Collection<ClientBehaviorContext.Parameter> getParameters()
ClientBehaviorContext
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.
getParameters
in class ClientBehaviorContext