18

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.

hirikarate
  • 3,055
  • 4
  • 21
  • 27
  • 1
    Does this help. http://javaserverfaces.java.net/nonav/docs/2.0/javadocs/javax/faces/event/ComponentSystemEvent.html – r0ast3d Nov 18 '11 at 03:25

1 Answers1

32

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 .

Ken Chan
  • 84,777
  • 26
  • 143
  • 172
  • Thanks, you answer my question "a list of other page (or view) events other than preRenderView". However, none of them is triggered before the component being bound. – hirikarate Nov 18 '11 at 07:13
  • @hirikarate : You are welcome , besides these values , you can also use the fully qualified class name of any java class that extends `javax.faces.event.ComponentSystemEvent` for the `type` tag attribute.See my update – Ken Chan Nov 18 '11 at 08:16