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
|
createClientBehaviorContextprivate 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()
ClientBehaviorContextReturns the FacesContext for
the current request.
getFacesContext in class ClientBehaviorContextpublic UIComponent getComponent()
ClientBehaviorContextReturns the UIComponent that is
requesting the ClientBehavior script.
getComponent in class ClientBehaviorContextpublic java.lang.String getEventName()
ClientBehaviorContextReturns the name of the behavior event for which the ClientBehavior script is being requested.
getEventName in class ClientBehaviorContextpublic java.lang.String getSourceId()
ClientBehaviorContextReturns 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 ClientBehaviorContextpublic java.util.Collection<ClientBehaviorContext.Parameter> getParameters()
ClientBehaviorContextReturns 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