Map rqMap = exCtx.getRequestParameterMap();
Object clnId = rqMap.get(component.getClientId(context));
if (clnId == null) {
clnId = rqMap.get(component.getClientId(context) + ":hidden");
}
UIMenuItem menuItem = (UIMenuItem) component;
if (clnId != null) {
// enqueue event here for this component or for component with Id
// taken from forId attribute
String mode = resolveSubmitMode(menuItem);
if (!MenuComponent.MODE_NONE.equalsIgnoreCase(mode)) {
ActionEvent actionEvent = new ActionEvent(menuItem);
if(MenuComponent.MODE_AJAX.equalsIgnoreCase(mode)){
new AjaxEvent(menuItem).queue();
if (AjaxRendererUtils.isAjaxRequest(context)) {
AjaxContext.getCurrentInstance(context)
.addAreasToProcessFromComponent(context, menuItem);
}
}
if (menuItem.isImmediate()) {
actionEvent.setPhaseId(PhaseId.APPLY_REQUEST_VALUES);
} else {
actionEvent.setPhaseId(PhaseId.INVOKE_APPLICATION);
}
menuItem.queueEvent(actionEvent);
}
}
}