/// String mode = ((UIDialogAction)component).getMode();
ActionEvent event;
event = new ActionEvent(component);
component.queueEvent(event);
if(component instanceof ViewIdHolder) {
component.queueEvent( new AjaxEvent(component));
// ((UIDialogWindow)component).initViewId();
// AjaxContext.getCurrentInstance(context).setViewIdHolder((ViewIdHolder)component);
// return;
}
} else {
component.queueEvent( new AjaxEvent(component));
}
} else {
/*
* Child dialog has just been closed.
* It simulates action of this component
* by AJAX request from js function closeDialog()
* Parameter 'targetViewId' is id of view
* that would be shown in dialog window if it had not
* to be closed. Now it is saved in event
* to be substituted for view root of this window.
*/
String targetViewId = (String)context.getExternalContext().getRequestParameterMap().get("targetViewId");
if(targetViewId != null) {
dialogEvent.setSourceViewId(targetViewId);
}
DialogContext parentContext = dcontext.getParentContext();
dcontext.deactivate();
if(parentContext != null) {
DialogContextManager.getInstance(context).setActiveRequest(parentContext.getDialogId());
} else if("closeall".equals(action)) {
DialogContextManager.getInstance(context).setActiveRequest(null);
} else {
DialogContextManager.getInstance(context).setActiveRequest(null);
}
component.queueEvent(new DialogWindowClosedEvent(component));
component.queueEvent( new AjaxEvent(component));
dialogEvent.setClose(true);
}
/*
* Queue event that will be processed during