? RichFac...">

Exhaustive list of available events for a4j: ajax?

Where can I get an exhaustive list of available events for <a4j:ajax event="..." /> ?

RichFaces doc says โ€œJavaScript event property name (click, change, etc.)โ€, but I'm definitely looking for it โ€œetc.โ€;)

Note: I am sure that this applies specifically to JavaScript event names with AFAIK, you should use selectitem , not select ...

0
java ajax events jsf richfaces
source share
2 answers

Read the link to the RichFaces component by topic (my selection):

The behavior of <a4j:ajax> allows you to add Ajax features to a component other than Ajax. The non-Ajax component must implement the ClientBehaviorHolder interface for all event attributes that support rendering behavior .

To proceed to the next step, you should study the ClientBehaviorHolder interface, especially the ClientBehaviorHolder#getEventNames() method, which

Returns a non-zero non-modifiable collection containing the names of the logical events supported by the component that implements this interface

Thus, it would not be too difficult to know the list of events that the component can execute.

Basically, as you suspected, all major JavaScript events are supported, and a set of custom ones that (as a rule) are mentioned in the component documentation (those that have the on prefix, but with a prefix omitted (for example, onlistshow in event="listshow" ).

In addition, it is worth mentioning that in JSF there are two additional "standard" event types that will display the necessary / correct HTML DOM event, depending on the component in question. These are action tags for components that implement the ActionSource interface and valueChange for components that implement EditableValueHolder .

+3
source share

The list of available events depends on which component you are working with. All operations with Mouse, Keyboard and Form must be supported (not sure about onerror, etc.), and if you work, say, <rich:select> , you get access to custom events like listclick , listdblclick , selectitem and etc. which are described in docs .

0
source share

All Articles