gpt4 book ai didi

java - JSF 2 事件列表?

转载 作者:太空狗 更新时间:2023-10-29 22:33:00 24 4
gpt4 key购买 nike

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

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

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

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

谢谢。

最佳答案

来自tag library document 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 methodpreRenderComponent                    javax.faces.event.PreRenderComponentEventpreRenderView                         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.

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

关于java - JSF 2 事件列表?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8177288/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com