// If the event is of type ActionEvent, throw a HDIV event to handle it later
// This verification is needed because JSF 2.0 can generate other type
// (AjaxBehaviorEvent) of events due to the use of Ajax and we don't want
// to generate two HDIV events.
if (event instanceof ActionEvent) {
HDIVFacesEvent hdivevent = new HDIVFacesEvent(this);
if (this.isImmediate()) {
hdivevent.setPhaseId(PhaseId.APPLY_REQUEST_VALUES);
} else {
hdivevent.setPhaseId(PhaseId.PROCESS_VALIDATIONS);
}
super.queueEvent(hdivevent);
}
// Throw ActionEvent to handle it in a standar way