到目前为止我只知道和看到
<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.PostValidateEventIn 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/