if(isRequestSource(context)) {
String eventName = context.getExternalContext().getRequestParameterMap().get(Constants.PARTIAL_BEHAVIOR_EVENT_PARAM);
if(eventName != null && eventName.equals("close")) {
setVisible(false);
CloseEvent closeEvent = new CloseEvent(this, ((AjaxBehaviorEvent) event).getBehavior());
closeEvent.setPhaseId(PhaseId.APPLY_REQUEST_VALUES);
super.queueEvent(closeEvent);
context.renderResponse(); //just process the close event and skip to response
}
} else {
super.queueEvent(event);