java - JSF 2 事件列表?

标签 java jakarta-ee jsf-2

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

<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 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.

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

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

相关文章:

java - Ebean 中仍然存在多级级联

java - 构建更好的 ArrayList

jsf-2 - jsf2 ViewScoped bean初始化

java - Eclipse 插件可以在 Java EE 中编辑 web.xml 吗?

JSF 的采用和流行

jsf - :commandButton can NOT submit parameters to backing bean

java - 在不影响布局大小的情况下在Linearlayout上设置背景png

java - 如何在游戏中对高分板的分数进行排序

jakarta-ee - 调试卡住的 Web 应用程序

java - Wildfly ContextService 并发 securityIdentity 为 null