View Source

h2. Overview
_Since 3.1_

The _icecore:setEventPhase_ component allows the application to specify the JSF lifecycle-phase that specified events will be broadcast in, for events originating from components in its child hierarchy.

{note:title=Note:}Some iterative containers, such as UIRepeat, UIData and its sub-classes, will wrap events inside another event type that records source row information, so if the iterative container is in-between setEventPhase and the intended source component, in the child/parent component hierarchy, that will interfere with setEventPhase's ability to alter events by their class name. Only selecting all events by specifying an events value of "FacesEvent" would work.

h2. Getting Started
To use the _icecore:setEventPhase_ component, first declare the core namespace:

{code:html|borderStyle=dashed}<html ... xmlns:icecore="">
{panel}Then add the _icecore:setEventPhase_ component to your page markup, as the parent of a UIInput, UICommand, or other component that queues events. You must specify a value for the *events* and *phase* properties, or else nothing will happen. In this example, the inputText's ValueChangeEvent will broadcasted during INVOKE_APPLICATION.
{panel}{code:xml|borderStyle=dashed}<icecore:setEventPhase events="ValueChangeEvent" phase="INVOKE_APPLICATION">
<h:inputText value="#{bean.text}" valueChangeListener="#{bean.textChanged}"/>

h2. Attributes
{tip:title=TagLib Documentation}This section covers attributes involved in the typical use-cases for this component. For reference, the complete taglib documentation for this component is available [here|].{tip}

* *disabled* - Turn this component's functionality on or off.
* *events* - Space delimited list of class names of events that should be changed to be broadcasted in the specified phase. Default is for no events to be affected. For event classes in the _javax.faces.event_ package, the class name without the leading package name portion may be used.
* *phase* - The phase for the specified events to be broadcasted in. One of: ANY, APPLY_REQUEST_VALUES, PROCESS_VALIDATIONS, UPDATE_MODEL_VALUES, INVOKE_APPLICATION.