在哪里可以获得 <a4j:ajax event="..." />
可用事件的详尽列表?
RichFaces's doc说“JavaScript 事件属性的名称(点击、更改等)”,但我正是在寻找这个“等”;)
旁注:我确信它指的是 JavaScript events names因为据我所知,你必须使用 selectitem
而不是select
...
最佳答案
背诵RichFaces component reference关于这个主题(强调我的):
The
<a4j:ajax>
behavior allows Ajax capability to be added to a non-Ajax component. The non-Ajax component must implement the ClientBehaviorHolder interface for all the event attributes that support behavior rendering.
要更进一步,应该查看 ClientBehaviorHolder
界面,尤其是 ClientBehaviorHolder#getEventNames()
方法
Returns a non-null, unmodifiable Collection containing the names of the logical events supported by the component implementing this interface
这样,找出组件可以触发的事件列表就不会太困难。
基本上,正如您所怀疑的,所有基本的 JavaScript 事件都受支持,并且组件文档中(通常)提到了一组自定义事件(带有 on
前缀的事件),但省略了前缀(例如 onlistshow
将变成进入 event="listshow"
)。
另外,值得一提的是,JSF 中有两个额外的“标准”事件类型,它们将呈现必要/正确的 HTML DOM 事件,具体取决于相关组件。这些是action
对于实现 ActionSource
的组件接口(interface)和valueChange
对于实现 EditableValueHolder
的组件.
关于java - a4j :ajax? 可用事件的详细列表,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17680418/