// TODO check the way we create the unique ID, is it really unique?
try {
String name = "gadget" + url.hashCode();
gadget = GadgetUtil.toGadget(name, url, false);
service.saveGadget(gadget);
uiGadget = uiForm.createUIComponent(context, UIGadget.class, null, null);
uiGadget.setState(new TransientApplicationState<org.exoplatform.portal.pom.spi.gadget.Gadget>(gadget.getName()));
} catch (Exception e) {
String aggregatorId = uiDashboard.getAggregatorId();
gadget = service.getGadget(aggregatorId);