org.apache.tapestry
Class BaseComponent

java.lang.Object
  extended byorg.apache.hivemind.impl.BaseLocatable
      extended byorg.apache.tapestry.AbstractComponent
          extended byorg.apache.tapestry.BaseComponent
All Implemented Interfaces:
IComponent, IRender, ITemplateComponent, org.apache.hivemind.Locatable, org.apache.hivemind.LocationHolder
Direct Known Subclasses:
AbstractPage, ExceptionDisplay, RequestDisplay

public class BaseComponent
extends AbstractComponent
implements ITemplateComponent

Base implementation for most components that use an HTML template.

Author:
Howard Lewis Ship

Constructor Summary
BaseComponent()
           
 
Method Summary
 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, checkActiveLock, cleanupAfterRender, enterActiveState, finishLoad, format, format, format, format, getAsset, getAssets, getBeans, getBinding, getBindingNames, getBindings, getBody, getBodyCount, getComponent, getComponents, getContainedComponent, getContainer, getExtendedId, getId, getIdPath, getListeners, getMessage, getMessages, getNamespace, getPage, getProperty, getSpecification, isInActiveState, isParameterBound, isRendering, pageEndRender, prepareForRender, render, renderBody, renderInformalParameters, setBinding, setContainedComponent, setContainer, setId, setNamespace, setPage, setProperty, toString
 
Methods inherited from class org.apache.hivemind.impl.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.IComponent
addAsset, addBody, addComponent, enterActiveState, getAsset, getAssets, getBeans, getBinding, getBindingNames, getBindings, getComponent, getComponents, getContainedComponent, getContainer, getExtendedId, getId, getIdPath, getListeners, getMessage, getMessages, getNamespace, getPage, getProperty, getSpecification, isRendering, renderBody, setBinding, setContainedComponent, setContainer, setId, setNamespace, setPage, setProperty
 
Methods inherited from interface org.apache.tapestry.IRender
render
 
Methods inherited from interface org.apache.hivemind.LocationHolder
setLocation
 
Methods inherited from interface org.apache.hivemind.Locatable
getLocation
 

Constructor Detail

BaseComponent

public BaseComponent()
Method Detail

addOuter

public 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.

Specified by:
addOuter in interface ITemplateComponent

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