UIApplication uiApplication = context.getUIApplication();
uiApplication.addMessage(new ApplicationMessage("UIDashboard.msg.ApplicationNotExisted", null));
context.setAttribute(UIDashboard.APP_NOT_EXIST, true);
return;
}
UIGadget uiGadget = event.getSource().createUIComponent(context, UIGadget.class, null, null);
uiGadget.setState(new TransientApplicationState<Gadget>(application.getApplicationName()));
UIDashboardContainer uiDashboardContainer = uiDashboard.getChild(UIDashboardContainer.class);
uiDashboardContainer.addUIGadget(uiGadget, col, row);
uiDashboardContainer.save();
context.addUIComponentToUpdateByAjax(uiDashboardContainer);
}