private static void addFellow(Component comp, IdSpace owner) { if (owner instanceof Component) ((AbstractComponent) owner).bindToIdSpace(comp); else if (owner instanceof Page) ((AbstractPage) owner).addFellow(comp); if (owner == null && comp instanceof ShadowElement) addToShadowIdMap(comp); }
private void cloneSpaceInfoFrom(SpaceInfo from) { //rebuild ID space by binding itself and all children if (!isAutoId(_id)) this.bindToIdSpace(this); for (AbstractComponent p = (AbstractComponent) getFirstChild(); p != null; p = p._next) addToIdSpacesDown(p, (IdSpace) this); }
/** Adds to the ID spaces, if any, when ID is changed. * Caller has to make sure the uniqueness (and not auto id). */ private static void addToIdSpaces(final Component comp) { final String compId = comp.getId(); if (comp instanceof NonFellow || isAutoId(compId)) return; //nothing to do if (comp instanceof IdSpace) ((AbstractComponent) comp).bindToIdSpace(comp); addFellow(comp, getSpaceOwnerOfParent(comp)); }
bindToIdSpace(this); for (AbstractComponent ac = (AbstractComponent) getFirstChild(); ac != null; ac = ac._next) addToIdSpacesDown(ac, (IdSpace) this);