org.apache.tapestry
Class BaseComponent

java.lang.Object
  |
  +--org.apache.tapestry.spec.BaseLocatable
        |
        +--org.apache.tapestry.AbstractComponent
              |
              +--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, ViewTabs

public class BaseComponent
extends AbstractComponent

Base implementation for most components that use an HTML template.

Version:
$Id: BaseComponent.java,v 1.3 2003/04/15 18:14:14 glongman Exp $
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 .
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.
Overrides:
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 . Subclasses must invoke this method first, before adding any additional behavior, though its usually simpler to override AbstractComponent.finishLoad() instead.
Overrides:
finishLoad in class AbstractComponent