String id = event.getRequestContext().getRequestParameter(UIComponent.OBJECTID);
UIComponent uiComponent = event.getSource();
UIPortalComponent uiParent = (UIPortalComponent)uiComponent.getParent();
UIComponent uiRemoveComponent = uiParent.findComponentById(id);
UIPortalApplication uiApp = Util.getUIPortalApplication();
if (uiRemoveComponent.findFirstComponentOfType(UIPageBody.class) != null)
{
uiApp.addMessage(new ApplicationMessage("UIPortalApplication.msg.deletePageBody", new Object[]{},
ApplicationMessage.WARNING));
return;
}