a4j的可用事件的详尽清单:ajax? [英] Exhaustive list of available events for a4j:ajax?

查看:148
本文介绍了a4j的可用事件的详尽清单:ajax?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在哪里可以获得< a4j:ajax event =.../>

RichFaces的文档说>JavaScript事件属性的名称(点击,更改等),但我正在寻找这个等。;

RichFaces's doc says "name of JavaScript event property (click, change, etc.)", but I'm precisely looking for this "etc." ;)

旁注:我注意到,它完全是指 JavaScript事件名称因为AFAIK,你必须使用 selectitem 而不是选择 ...

Side note: I'm note sure it refers exactly to the JavaScript events names since AFAIK, you have to use selectitem rather than select...

推荐答案

要背诵 RichFaces组件参考


< a4j:ajax> 行为允许将Ajax功能添加到非Ajax组件。非Ajax组件必须为支持行为呈现的所有事件属性实现ClientBehaviorHolder接口

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()方法

To proceed one step further one should look into ClientBehaviorHolder interface, especially the ClientBehaviorHolder#getEventNames() method that


返回一个非空的不可修改的集合,其中包含实现此接口的组件支持的逻辑事件的名称

Returns a non-null, unmodifiable Collection containing the names of the logical events supported by the component implementing this interface

以这种方式找出组件可以触发的事件列表并不难。

This way it would not be too tough to find out the list of events the component can fire.

基本上如您所怀疑的那样,支持所有基本的JavaScript事件,并且在组件的文档(通常是前缀),但是省略前缀(如 onlistshow 将变成 event =listshow)。

Basically, as you suspected, all basic JavaScript events are supported and a set of custom ones that are (typically) mentioned in component's documentation (those with on prefix), but with prefix omitted (like onlistshow would turn into event="listshow").

另外值得一提的是,在JSF中还有两个额外的标准事件类型将会呈现必要/正确的HTML DOM事件,这取决于该组件有问题。对于实现 ActionSource 接口和 valueChange 的组件,那些是 action 用于实现 EditableValueHolder 的组件。

Also, it is worth mentioning that there are two additional 'standard' event types in JSF that will render the necessary/right HTML DOM event, depending on the component in question. Those are action for components that implement ActionSource interface and valueChange for components that implement EditableValueHolder.

这篇关于a4j的可用事件的详尽清单:ajax?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆