@Override public void onEnter(DragContext context) { super.onEnter(context); PortletChrome portletWidget = (PortletChrome) context.selectedWidgets.get(0); PortletSlot slot = portletWidget.getAssociatedSlot(); if (panel != slot.getParent()) { PortalLayoutConnector originalConnector = ((PortalLayoutConnector) Util.findConnectorFor(slot.getParent())); originalConnector.setOutcomingPortletCandidate(portletWidget); portalConnector.setIncomingPortletCandidate(portletWidget); } configurePostionerSlot(context, slot); }
@Override public void onDrop(DragContext context) { super.onDrop(context); PortletChrome portletWidget = (PortletChrome) context.selectedWidgets.get(0); if (positionerSlot != null) { positionerSlot.setWidget(portletWidget); } Widget contentWidget = portletWidget.getContentWidget(); ComponentConnector contentConnector = Util.findConnectorFor(contentWidget); PortalLayoutConnector originalConnector = (PortalLayoutConnector) contentConnector.getParent(); if (originalConnector != portalConnector) { portalConnector.propagateHierarchyChangesToServer(); originalConnector.propagateHierarchyChangesToServer(); } else { portalConnector.updatePortletPositionOnServer(contentConnector); } }