{
public void execute(Event<UIPopupMessages> event) throws Exception
{
UIPopupMessages uiPopupMessage = event.getSource();
uiPopupMessage.clearMessages();
WebuiRequestContext context = event.getRequestContext();
if (uiPopupMessage.getParent() == null)
{
context.addUIComponentToUpdateByAjax(uiPopupMessage);
return;
}
if (!uiPopupMessage.isShow())
return;
UIComponent uiParent = uiPopupMessage.getParent();
context.addUIComponentToUpdateByAjax(uiParent);
Event<UIComponent> pEvent =
uiParent.createEvent("ClosePopup", event.getExecutionPhase(), event.getRequestContext());
if (pEvent != null)
pEvent.broadcast();
}