org.apache.tapestry.components
Class Block

java.lang.Object
  extended by org.apache.tapestry.spec.BaseLocatable
      extended by org.apache.tapestry.AbstractComponent
          extended by org.apache.tapestry.components.Block
All Implemented Interfaces:
IComponent, ILocatable, ILocationHolder, IRender

public class Block
extends AbstractComponent

Prevents its contents from being rendered until triggered by an RenderBlock component. [Component Reference]

Block and RenderBlock are used to build a certain class of complicated component that can't be assembled using the normal wrapping containment. Such a super component would have two or more sections that need to be supplied by the containing page (or component).

Using Blocks, the blocks can be provided as parameters to the super component.

The inserter property gives the components inside the block access to the component (typically an RenderBlock) that inserted the block, including access to its informal bindings which allows components contained by the Block to be passed parameters. Note - it is the responsibility of the inserting component to set itself as the Block's inserter.

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

Constructor Summary
Block()
           
 
Method Summary
 IComponent getInserter()
           
protected  void renderComponent(IMarkupWriter writer, IRequestCycle cycle)
          Does nothing; the idea of a Block is to defer the rendering of the body of the block until an RenderBlock forces it out.
 void setInserter(IComponent value)
           
 
Methods inherited from class org.apache.tapestry.AbstractComponent
addAsset, addBody, addComponent, cleanupAfterRender, finishLoad, 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

Block

public Block()
Method Detail

renderComponent

protected void renderComponent(IMarkupWriter writer,
                               IRequestCycle cycle)
Does nothing; the idea of a Block is to defer the rendering of the body of the block until an RenderBlock forces it out.

Specified by:
renderComponent in class AbstractComponent

getInserter

public IComponent getInserter()

setInserter

public void setInserter(IComponent value)