if(isSelfRequest(context)) {
AjaxBehaviorEvent behaviorEvent = (AjaxBehaviorEvent) event;
if(eventName.equals("toggle")) {
boolean collapsed = Boolean.valueOf(params.get(clientId + "_collapsed"));
Visibility visibility = collapsed ? Visibility.HIDDEN : Visibility.VISIBLE;
super.queueEvent(new ToggleEvent(this, behaviorEvent.getBehavior(), visibility));
} else if(eventName.equals("close")) {
super.queueEvent(new CloseEvent(this, behaviorEvent.getBehavior()));