private static void removeFellow(Component comp, IdSpace owner) { if (owner instanceof Component) ((AbstractComponent) owner).unbindFromIdSpace(comp.getId()); else if (owner instanceof Page) ((AbstractPage) owner).removeFellow(comp); if (owner == null && comp instanceof ShadowElement) removeFromShadowIdMap(comp); }
/** Removes from the ID spaces, if any, when ID is changed. */ private static void removeFromIdSpaces(final Component comp) { final String compId = comp.getId(); if (comp instanceof NonFellow || isAutoId(compId)) return; //nothing to do if (comp instanceof IdSpace) ((AbstractComponent) comp).unbindFromIdSpace(compId); removeFellow(comp, getSpaceOwnerOfParent(comp)); }