// broadcast the ANY_PHASE events first
if (null != eventsForPhaseId) {
// We cannot use an Iterator because we will get
// ConcurrentModificationException errors, so fake it
while (!eventsForPhaseId.isEmpty()) {
FacesEvent event =
eventsForPhaseId.get(0);
UIComponent source = event.getComponent();
try {
source.broadcast(event);
} catch (AbortProcessingException e) {
if (LOGGER.isLoggable(Level.SEVERE)) {
UIComponent component = event.getComponent();
String id = "";
if (component != null) {
id = component.getId();
if (id == null) {
id = component.getClientId(context);
}
}
LOGGER.log(Level.SEVERE,
"error.component.abortprocessing_thrown",
new Object[]{event.getClass().getName(),
phaseId.toString(),
id});
LOGGER.log(Level.SEVERE, e.toString(), e);
}
}
eventsForPhaseId.remove(0); // Stay at current position
}
}
// then broadcast the events for this phase.
if (null != (eventsForPhaseId = events.get(phaseId.getOrdinal()))) {
// We cannot use an Iterator because we will get
// ConcurrentModificationException errors, so fake it
while (!eventsForPhaseId.isEmpty()) {
FacesEvent event = eventsForPhaseId.get(0);
UIComponent source = event.getComponent();
try {
source.broadcast(event);
} catch (AbortProcessingException e) {
; // A "return" here would abort remaining events too
}