org.apache.tapestry
Class BaseComponent

java.lang.Object
  extended by org.apache.tapestry.spec.BaseLocatable
      extended by org.apache.tapestry.AbstractComponent
          extended by org.apache.tapestry.BaseComponent
All Implemented Interfaces:
IComponent, ILocatable, ILocationHolder, IRender
Direct Known Subclasses:
AbstractPage, AbstractTableViewComponent, ExceptionDisplay, InspectorButton, MaskEdit, Palette, PopupLink, Selector, ShowEngine, ShowProperties, ShowSpecification, ShowTemplate, SimpleTableColumnComponent, SimpleTableColumnFormComponent, Table, TableView, Tree, TreeDataView, TreeNodeView, TreeTable, TreeTableDataView, TreeTableNodeViewDelegator, TreeView, ViewTabs

public class BaseComponent
extends AbstractComponent

Base implementation for most components that use an HTML template.

Version:
$Id: BaseComponent.java 243791 2004-02-19 17:38:13Z hlship $
Author:
Howard Lewis Ship

Constructor Summary
BaseComponent()
           
 
Method Summary
protected  void addOuter(IRender element)
          Adds an element as an outer element for the receiver.
 void finishLoad(IRequestCycle cycle, IPageLoader loader, IComponentSpecification specification)
          Loads the template for the component, then invokes AbstractComponent.finishLoad(IRequestCycle, IPageLoader, IComponentSpecification).
protected  void renderComponent(IMarkupWriter writer, IRequestCycle cycle)
          Renders the top level components contained by the receiver.
 
Methods inherited from class org.apache.tapestry.AbstractComponent
addAsset, addBody, addComponent, cleanupAfterRender, finishLoad, fireObservedChange, fireObservedChange, fireObservedChange, fireObservedChange, fireObservedChange, fireObservedChange, fireObservedChange, fireObservedChange, fireObservedChange, format, format, format, format, formatString, formatString, formatString, formatString, generateAttributes, getAsset, getAssets, getBeans, getBinding, getBindingNames, getBindings, getBody, getBodyCount, getChangeObserver, getComponent, getComponents, getContainer, getExtendedId, getId, getIdPath, getListeners, getMessage, getMessages, getNamespace, getPage, getProperty, getSpecification, getString, pageEndRender, prepareForRender, render, renderBody, renderInformalParameters, setBinding, setContainer, setId, setNamespace, setPage, setProperty, setSpecification, toString
 
Methods inherited from class org.apache.tapestry.spec.BaseLocatable
getLocation, setLocation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.apache.tapestry.ILocationHolder
setLocation
 
Methods inherited from interface org.apache.tapestry.ILocatable
getLocation
 

Constructor Detail

BaseComponent

public BaseComponent()
Method Detail

addOuter

protected void addOuter(IRender element)
Adds an element as an outer element for the receiver. Outer elements are elements that should be directly rendered by the receiver's render() method. That is, they are top-level elements on the HTML template.


renderComponent

protected void renderComponent(IMarkupWriter writer,
                               IRequestCycle cycle)
Renders the top level components contained by the receiver.

Specified by:
renderComponent in class AbstractComponent
Since:
2.0.3

finishLoad

public void finishLoad(IRequestCycle cycle,
                       IPageLoader loader,
                       IComponentSpecification specification)
Loads the template for the component, then invokes AbstractComponent.finishLoad(IRequestCycle, IPageLoader, IComponentSpecification). Subclasses must invoke this method first, before adding any additional behavior, though its usually simpler to override AbstractComponent.finishLoad() instead.

Specified by:
finishLoad in interface IComponent
Overrides:
finishLoad in class AbstractComponent