// TODO review windowId for eXoWidget and eXoApplication
UIComponent component = null;
if (ApplicationType.GADGET.equals(appType))
{
UIGadget uiGadget = uiPage.createUIComponent(event.getRequestContext(), UIGadget.class, null, null);
uiGadget.setState(new TransientApplicationState<Gadget>(portletName));
// Set Properties For gadget
int posX = (int)(Math.random() * 400);