Is there any way to get the events list supported by an p:ajax
inside a component in Primefaces ?
Thank you
Asked
Active
Viewed 1,477 times
0

Raziel
- 444
- 6
- 22
1 Answers
1
First you should see in Primefaces docs, for every component there is a "Ajax Behavior Events" section.
If you want to know from java code the list of events check the getEventNames() method.
From the docs of ClientBehaviorHolder:
getEventNames(): Returns a non-null, unmodifiable Collection containing the names of the logical events supported by the component implementing this interface.
For example, for InputText you have:
private static final Collection<String> EVENT_NAMES = Collections.unmodifiableCollection(Arrays.asList("blur","change","valueChange","click","dblclick","focus","keydown","keypress","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","select"));
public Collection<String> getEventNames() {
return EVENT_NAMES;
}
The EVENT_NAMES
collection is a list of all events supported by InputText
. This method could be inherited from parent class, for InputText
it's inherited from javax.faces.component.HtmlInputText
.

SiMag
- 586
- 2
- 8