- java.lang.Object
-
- javax.faces.component.behavior.ClientBehaviorContext
-
public abstract class ClientBehaviorContext extends Object
ClientBehaviorContext provides context information that may be useful to
ClientBehavior.getScript(javax.faces.component.behavior.ClientBehaviorContext)
implementations.- Since:
- 2.0
-
-
Nested Class Summary
Nested Classes Modifier and Type Class and Description 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
Constructors Constructor and Description ClientBehaviorContext()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method and Description static ClientBehaviorContext
createClientBehaviorContext(FacesContext context, UIComponent component, String eventName, String sourceId, Collection<ClientBehaviorContext.Parameter> parameters)
Creates a ClientBehaviorContext instance.
abstract UIComponent
getComponent()
Returns the
UIComponent
that is requesting theClientBehavior
script.abstract String
getEventName()
Returns the name of the behavior event for which the ClientBehavior script is being requested.
abstract FacesContext
getFacesContext()
Returns the
FacesContext
for the current request.abstract Collection<ClientBehaviorContext.Parameter>
getParameters()
Returns parameters that "submitting"
ClientBehavior
implementations should include when posting back data into the Faces lifecycle.abstract String
getSourceId()
Returns an id for use as the
ClientBehavior
source.
-
-
-
Method Detail
-
createClientBehaviorContext
public static ClientBehaviorContext createClientBehaviorContext(FacesContext context, UIComponent component, String eventName, String sourceId, Collection<ClientBehaviorContext.Parameter> parameters)
Creates a ClientBehaviorContext instance.
- Parameters:
context
- theFacesContext
for the current request.component
- the component instance to which theClientBehavior
is attached.eventName
- the name of the behavior event to which theClientBehavior
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.- Returns:
- a
ClientBehaviorContext
instance configured with the provided values. - Throws:
NullPointerException
- ifcontext
,component
oreventName
isnull
- Since:
- 2.0
-
getFacesContext
public abstract FacesContext getFacesContext()
Returns the
FacesContext
for the current request.- Since:
- 2.0
-
getComponent
public abstract UIComponent getComponent()
Returns the
UIComponent
that is requesting theClientBehavior
script.- Since:
- 2.0
-
getEventName
public abstract String getEventName()
Returns the name of the behavior event for which the ClientBehavior script is being requested.
- Since:
- 2.0
-
getSourceId
public abstract 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 thejavax.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. ThegetSourceId()
method allows the component to pass this information into theClientBehavior.getScript(javax.faces.component.behavior.ClientBehaviorContext)
implementation.- Returns:
- the id for the behavior's script to use as the "source", or null if the Behavior's script can identify the source from the DOM.
- Since:
- 2.0
-
getParameters
public abstract 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.- Since:
- 2.0
-
-
Deutsche Übersetzung
Sie haben gebeten, diese Seite auf Deutsch zu besuchen. Momentan ist nur die Oberfläche übersetzt, aber noch nicht der gesamte Inhalt.Wenn Sie mir bei Übersetzungen helfen wollen, ist Ihr Beitrag willkommen. Alles, was Sie tun müssen, ist, sich auf der Website zu registrieren und mir eine Nachricht zu schicken, in der Sie gebeten werden, Sie der Gruppe der Übersetzer hinzuzufügen, die Ihnen die Möglichkeit gibt, die gewünschten Seiten zu übersetzen. Ein Link am Ende jeder übersetzten Seite zeigt an, dass Sie der Übersetzer sind und einen Link zu Ihrem Profil haben.
Vielen Dank im Voraus.
Dokument erstellt 11/06/2005, zuletzt geändert 18/08/2025
Quelle des gedruckten Dokuments:https://www.gaudry.be/de/java-api-javaee-rf-javax/faces/component/behavior/ClientBehaviorContext.html
Die Infobro ist eine persönliche Seite, deren Inhalt in meiner alleinigen Verantwortung liegt. Der Text ist unter der CreativeCommons-Lizenz (BY-NC-SA) verfügbar. Weitere Informationen auf die Nutzungsbedingungen und dem Autor.
Referenzen
Diese Verweise und Links verweisen auf Dokumente, die während des Schreibens dieser Seite konsultiert wurden, oder die zusätzliche Informationen liefern können, aber die Autoren dieser Quellen können nicht für den Inhalt dieser Seite verantwortlich gemacht werden.
Der Autor dieser Website ist allein dafür verantwortlich, wie die verschiedenen Konzepte und Freiheiten, die mit den Nachschlagewerken gemacht werden, hier dargestellt werden. Denken Sie daran, dass Sie mehrere Quellinformationen austauschen müssen, um das Risiko von Fehlern zu reduzieren.