protected void cleanupAfterRender(IRequestCycle cycle) { _symbols = null; super.cleanupAfterRender(cycle); }
/** * Invokes {@link #finishLoad()}. Subclasses may overide as needed, but must invoke this * implementation. {@link BaseComponent} loads its HTML template. */ public void finishLoad(IRequestCycle cycle, IPageLoader loader, IComponentSpecification specification) { finishLoad(); }
/** @since 4.1 */ public String getSpecifiedId() { String id = getBoundId(); if (id != null) return id; return getId(); }
generateClientId(); prepareForRender(cycle); renderComponent(writer, cycle); cleanupAfterRender(cycle);
public Collection getBindingNames() { // If no conainer, i.e. a page, then no bindings. if (_container == null) return null; HashSet result = new HashSet(); // All the informal bindings go into the bindings Map. if (_bindings != null) result.addAll(_bindings.keySet()); // Now, iterate over the formal parameters and add the formal parameters // that have a binding. List names = getSpecification().getParameterNames(); int count = names.size(); for (int i = 0; i < count; i++) { String name = (String) names.get(i); if (result.contains(name)) continue; if (getBinding(name) != null) result.add(name); } return result; }
public void addComponent(IComponent component) { Defense.notNull(component, "component"); checkActiveLock(); if (_components == null) _components = new HashMap(MAP_SIZE); _components.put(component.getId(), component); }
/** * {@inheritDoc} */ public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((getClientId() == null) ? 0 : getClientId().hashCode()); result = prime * result + ((_id == null) ? 0 : _id.hashCode()); return result; }
/** * {@inheritDoc} */ public void triggerEvent(IRequestCycle cycle, BrowserEvent event) { getEventInvoker().invokeListeners(this, cycle, event); }
public String toString() { StringBuffer buffer; buffer = new StringBuffer(super.toString()); buffer.append('['); buffer.append(getExtendedId()); buffer.append(']'); return buffer.toString(); }
generateClientId(); prepareForRender(cycle); renderComponent(writer, cycle); cleanupAfterRender(cycle);
public Collection getBindingNames() { // If no conainer, i.e. a page, then no bindings. if (_container == null) return null; HashSet result = new HashSet(); // All the informal bindings go into the bindings Map. if (_bindings != null) result.addAll(_bindings.keySet()); // Now, iterate over the formal parameters and add the formal parameters // that have a binding. List names = getSpecification().getParameterNames(); int count = names.size(); for (int i = 0; i < count; i++) { String name = (String) names.get(i); if (result.contains(name)) continue; if (getBinding(name) != null) result.add(name); } return result; }
public void addAsset(String name, IAsset asset) { Defense.notNull(name, "name"); Defense.notNull(asset, "asset"); checkActiveLock(); if (_assets == null) _assets = new HashMap(MAP_SIZE); _assets.put(name, asset); }
/** * {@inheritDoc} */ public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((getClientId() == null) ? 0 : getClientId().hashCode()); result = prime * result + ((_id == null) ? 0 : _id.hashCode()); return result; }
/** * {@inheritDoc} */ public void triggerEvent(IRequestCycle cycle, BrowserEvent event) { getEventInvoker().invokeListeners(this, cycle, event); }
public String toString() { StringBuffer buffer; buffer = new StringBuffer(super.toString()); buffer.append('['); buffer.append(getExtendedId()); buffer.append(']'); return buffer.toString(); }
protected void cleanupAfterRender(IRequestCycle cycle) { super.cleanupAfterRender(cycle); _eventHandlers = null; }
/** @since 4.1 */ public String getSpecifiedId() { String id = getBoundId(); if (id != null) return id; return getId(); }
public void addAsset(String name, IAsset asset) { Defense.notNull(name, "name"); Defense.notNull(asset, "asset"); checkActiveLock(); if (_assets == null) _assets = new HashMap(MAP_SIZE); _assets.put(name, asset); }
/** * {@inheritDoc} */ public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; final AbstractComponent other = (AbstractComponent) obj; if (getClientId() == null) { if (other.getClientId() != null) return false; } else if (!getClientId().equals(other.getClientId())) return false; if (_id == null) { if (other._id != null) return false; } else if (!_id.equals(other._id)) return false; return true; } }
/** * Invokes {@link #finishLoad()}. Subclasses may overide as needed, but must invoke this * implementation. {@link BaseComponent} loads its HTML template. */ public void finishLoad(IRequestCycle cycle, IPageLoader loader, IComponentSpecification specification) { finishLoad(); }