f

Tag event

Attributes 
NameRequiredTypeDescription
listenertruejakarta.el.MethodExpression
(signature must match public void listener(jakarta.faces.event.ComponentSystemEvent event) throws jakarta.faces.event.AbortProcessingException )

The expression must evaluate to a public method that takes a ComponentSystemEvent parameter, with a return type of void, or to a public method that takes no arguments with a return type of void. In the latter case, the method has no way of easily knowing where the event came from, but this can be useful in cases where a notification is needed that "an event happened".

typetruejakarta.el.ValueExpression
(must evaluate to java.lang.String)

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 jakarta.faces.event.PreRenderComponentEvent
preRenderView jakarta.faces.event.PreRenderViewEvent
postAddToView jakarta.faces.event.PostAddToViewEvent
preValidate jakarta.faces.event.PreValidateEvent
postValidate jakarta.faces.event.PostValidateEvent

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

Also, the @jakarta.faces.event.NamedEvent annotation may be attached to any java class that extends jakarta.faces.event.ComponentSystemEvent. This enables that event to be referenced from this attribute, as descibed in the javadocs for @NamedEvent.