org.apache.tapestry.components
Class Block
java.lang.Object
org.apache.tapestry.spec.BaseLocatable
org.apache.tapestry.AbstractComponent
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()
|
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 |
Block
public Block()
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)