public Component getFellowIfAny(String compId) { if (this instanceof IdSpace) return _auxinf.spaceInfo.fellows.get(compId); final IdSpace idspace = getSpaceOwner(); return idspace == null ? null : idspace.getFellowIfAny(compId); }
public Collection<Component> getFellows() { if (this instanceof IdSpace) return Collections.unmodifiableCollection(_auxinf.spaceInfo.fellows.values()); final IdSpace idspace = getSpaceOwner(); if (idspace != null) return idspace.getFellows(); return Collections.emptyList(); }
public boolean hasFellow(String compId) { if (this instanceof IdSpace) return _auxinf.spaceInfo.fellows.containsKey(compId); final IdSpace idspace = getSpaceOwner(); return idspace != null && idspace.hasFellow(compId); }
public Component getFellow(String compId) throws ComponentNotFoundException { if (this instanceof IdSpace) { final Component comp = _auxinf.spaceInfo.fellows.get(compId); if (comp == null) throw new ComponentNotFoundException("Fellow component not found: " + compId); return comp; } final IdSpace idspace = getSpaceOwner(); if (idspace == null) throw new ComponentNotFoundException("This component doesn't belong to any ID space: " + this); return idspace.getFellow(compId); }
public Component getFellowIfAny(String compId, boolean recurse) { if (!recurse) return getFellowIfAny(compId); for (IdSpace idspace = getSpaceOwner(); idspace != null;) { Component f = idspace.getFellowIfAny(compId); if (f != null) return f; idspace = Components.getParentIdSpace(idspace); } return null; }
public void onEvent(Event event) { final ForwardInfo info = _auxinf.forwards.get(_orgEvent); if (info != null) for (TargetInfo ti : new ArrayList<TargetInfo>(info.targets)) { Component target = resolveForwardTarget(ti.target); if (target == null) { final IdSpace owner = getSpaceOwner(); if (owner instanceof Component) { target = (Component) owner; } else { //Use the root component instead for (target = AbstractComponent.this;;) { final Component p = target.getParent(); if (p == null) break; target = p; } } } //bug #2790393 Forward event listener shall be called immediately //(since 3.6.2) change from postEvent to sendEvent to //make forward event deterministic Events.sendEvent(new ForwardEvent(ti.event, target, event, ti.data)); } }
if (this instanceof IdSpace) return getAttributes(); final IdSpace idspace = getSpaceOwner(); if (idspace != null) return idspace.getAttributes();