JSF 2 事件列表?

发布于 2024-12-16 13:03:04 字数 267 浏览 0 评论 0原文

到目前为止,我只知道和看到过

<f:event type="preRenderView" listener="#{situationHelper.load}"/>

,我想知道在哪里可以找到除 preRenderView 之外的其他页面(或视图)事件的列表?

特别是,我正在寻找在绑定过程之前触发的事件(preRenderView 在组件绑定后运行)

谢谢。

So far I have only known and seen

<f:event type="preRenderView" listener="#{situationHelper.load}"/>

and I wonder where I can find a list of other page (or view) events other than preRenderView?

Particularly, I'm looking for a event which is triggered before the binding proccess, (preRenderView runs after components are bound)

Thanks.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

冰雪梦之恋 2024-12-23 13:03:04

来自 JSF 2.1 的 标签库文档

要为其安装侦听器的事件的名称。下表
列出该属性的有效值以及相应的事件
为其注册侦听器操作的类型。

“type”标签属性的值 发送到侦听器方法的事件类型
preRenderComponent javax.faces.event.PreRenderComponentEvent
preRenderView javax.faces.event.PreRenderViewEvent 
postAddToView javax.faces.event.PostAddToViewEvent 
预验证 javax.faces.event.PreValidateEvent 
postValidate javax.faces.event.PostValidateEvent


  
  

除了这些值之外,任何扩展 javax.faces.event.ComponentSystemEvent 的 java 类的完全限定类名都可以用作“type”属性的值。

因此,除了上面列出的值之外,您还可以使用 javax.faces.event.ComponentSystemEvent 的直接已知子类的完全限定类名作为 type< /code> 标签属性
,可以在 Java 文档。

From the tag library document of JSF 2.1

Name of the event for which to install a listener. The following table
lists the valid values for this attribute, and the corresponding event
type for which the listener action is registered.

value for "type" tag attribute        Type of event sent to listener method
preRenderComponent                    javax.faces.event.PreRenderComponentEvent
preRenderView                         javax.faces.event.PreRenderViewEvent 
postAddToView                         javax.faces.event.PostAddToViewEvent 
preValidate                           javax.faces.event.PreValidateEvent 
postValidate                          javax.faces.event.PostValidateEvent

In addition to these values, the fully qualified class name of any java class that extends javax.faces.event.ComponentSystemEvent may be used as the value of the "type" attribute.

So , beside the values listed above , you can also use the fully qualified class name of direct known subclasses of javax.faces.event.ComponentSystemEvent for the type tag attribute
, which can be found in the Java docs .

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文