void discoverPageForms(IComponent parent) { if (IForm.class.isInstance(parent)) _forms.add(parent); Iterator it = parent.getComponents().values().iterator(); while (it.hasNext()) { IComponent comp = (IComponent)it.next(); discoverPageForms(comp); } }
void discoverPageForms(IComponent parent) { if (IForm.class.isInstance(parent)) _forms.add(parent); Iterator it = parent.getComponents().values().iterator(); while (it.hasNext()) { IComponent comp = (IComponent)it.next(); discoverPageForms(comp); } }
IComponent findComponent(String id, IComponent target) { Map components = target.getComponents(); if (components == null) return null; IComponent comp = (IComponent) components.get(id); if (comp != null) return comp; Iterator children = components.values().iterator(); while (children.hasNext()) { IComponent child = (IComponent) children.next(); comp = findComponent(id, child); if (comp != null) return comp; } return null; }
IComponent findComponent(String id, IComponent target) { Map components = target.getComponents(); if (components == null) return null; IComponent comp = (IComponent) components.get(id); if (comp != null) return comp; Iterator children = components.values().iterator(); while (children.hasNext()) { IComponent child = (IComponent) children.next(); comp = findComponent(id, child); if (comp != null) return comp; } return null; }
public List getSortedComponents() { if (_sortedComponents != null) return _sortedComponents; Inspector inspector = (Inspector) getPage(); IComponent inspectedComponent = inspector.getInspectedComponent(); // Get a Map of the components and simply return null if there // are none. Map components = inspectedComponent.getComponents(); _sortedComponents = new ArrayList(components.values()); Collections.sort(_sortedComponents, new ComponentComparitor()); return _sortedComponents; }
(IComponent) container.getComponents().get(columnName + COLUMN_RENDERER_BLOCK_SUFFIX); (IComponent) container.getComponents().get(columnName + COLUMN_RENDERER_BLOCK_SUFFIX); objColumnRendererSource = (IComponent) container.getComponents().get(COLUMN_RENDERER_BLOCK_SUFFIX); (IComponent) container.getComponents().get(columnName + VALUE_RENDERER_BLOCK_SUFFIX); (IComponent) container.getComponents().get(columnName + VALUE_RENDERER_BLOCK_SUFFIX); objValueRendererSource = (IComponent) container.getComponents().get(VALUE_RENDERER_BLOCK_SUFFIX);
public void walkComponentTree(IComponent component) { // Invoke visitors for (int i = 0; i < _visitors.length; i++) { IComponentVisitor visitor = _visitors[i]; visitor.visitComponent(component); } // Recurse into the embedded components Collection components = component.getComponents().values(); if (Tapestry.size(components) == 0) return; for (Iterator it = components.iterator(); it.hasNext();) { IComponent embedded = (IComponent) it.next(); walkComponentTree(embedded); } } }
public void walkComponentTree(IComponent component) { // Invoke visitors for (int i = 0; i < _visitors.length; i++) { IComponentVisitor visitor = _visitors[i]; visitor.visitComponent(component); } // Recurse into the embedded components Collection components = component.getComponents().values(); if (Tapestry.size(components) == 0) return; for (Iterator it = components.iterator(); it.hasNext();) { IComponent embedded = (IComponent) it.next(); walkComponentTree(embedded); } } }
public Object getObject() { try { List clientIds = new ArrayList(_componentIds.length); for (int i=0; i < _componentIds.length; i++) { if (_targets[i] == null) { if (_target.getComponents().containsKey(_componentIds[i])) { _targets[i] = _target.getComponent(_componentIds[i]); } else if (_target.getPage() != null) { _targets[i] = _target.getPage().getComponent(_componentIds[i]); } // if not found we're in trouble if (_targets[i] == null) throw new ApplicationRuntimeException(BindingMessages.unknownComponent(_target, _componentIds[i]), getLocation(), null); } clientIds.add(_targets[i].getClientId()); } return clientIds; } catch (Exception ex) { throw new ApplicationRuntimeException(ex.getMessage(), getLocation(), ex); } }
public Object getObject() { try { List clientIds = new ArrayList(_componentIds.length); for (int i=0; i < _componentIds.length; i++) { if (_targets[i] == null) { if (_target.getComponents().containsKey(_componentIds[i])) { _targets[i] = _target.getComponent(_componentIds[i]); } else if (_target.getPage() != null) { _targets[i] = _target.getPage().getComponent(_componentIds[i]); } // if not found we're in trouble if (_targets[i] == null) throw new ApplicationRuntimeException(BindingMessages.unknownComponent(_target, _componentIds[i]), getLocation(), null); } clientIds.add(_targets[i].getClientId()); } return clientIds; } catch (Exception ex) { throw new ApplicationRuntimeException(ex.getMessage(), getLocation(), ex); } }