DialogContextManager.getInstance(context).setActiveRequest(null);
} else {
DialogContextManager.getInstance(context).setActiveRequest(null);
}
component.queueEvent(new DialogWindowClosedEvent(component));
component.queueEvent( new AjaxEvent(component));
dialogEvent.setClose(true);
}