ice:setEventPhase - Overview

In the example below:

  • » Choose a Province and click Submit.

If setEventPhase is enabled, the capital City of the selected Province will automatically be set through a valueChangeListener that fires later in the JSF lifecycle because of setEventPhase. However if setEventPhase is not enabled, the City will not be updated in the view. This is because the valueChangeListener fires earlier in the JSF lifecycle, and the City it sets is overwritten by the currently selected City on the page. This process will work the same if a City is selected and Submit is clicked, except a matching Province will try to be set.


Alberta
Edmonton

Event Log
Source Code