org.apache.tapestry.components
Class Block
java.lang.Object
org.apache.hivemind.impl.BaseLocatable
org.apache.tapestry.AbstractComponent
org.apache.tapestry.components.Block
- All Implemented Interfaces:
- org.apache.hivemind.Locatable, org.apache.hivemind.LocationHolder, IComponent, IDirectEvent, Component, IRender
public abstract 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 invoker property gives the components inside the block access to the component (typically an
RenderBlock
) that rendered the block. More often, the getParameter(String)
method is used to get parameters of the invoking component.
- Since:
- 0.2.9
- Author:
- Howard Lewis Ship
Constructor Summary |
Block()
|
Methods inherited from class org.apache.tapestry.AbstractComponent |
addAsset, addBody, addComponent, checkActiveLock, cleanupAfterRender, enterActiveState, equals, finishLoad, finishLoad, generateClientId, getAsset, getAssets, getBeans, getBinding, getBindingNames, getBindings, getBody, getBodyCount, getBoundId, getClientId, getComponent, getComponents, getContainedComponent, getContainedRenderers, getContainer, getEventInvoker, getExtendedId, getId, getIdPath, getInnerRenderers, getListeners, getMessages, getNamespace, getPage, getRenderWorker, getSpecification, getSpecifiedId, getTemplateTagName, hasEvents, hashCode, isInActiveState, isParameterBound, isRendering, isStateful, pageEndRender, peekClientId, prepareForRender, render, renderBody, renderIdAttribute, renderInformalParameters, setBinding, setClientId, setContainedComponent, setContainer, setHasEvents, setId, setNamespace, setPage, setTemplateTagName, toString, triggerEvent |
Methods inherited from class org.apache.hivemind.impl.BaseLocatable |
getLocation, setLocation |
Methods inherited from interface org.apache.hivemind.LocationHolder |
setLocation |
Methods inherited from interface org.apache.hivemind.Locatable |
getLocation |
Block
public Block()
getParameter
public Object getParameter(String name)
- Provides access to the invoking component's parameters.
- Since:
- 4.0
renderForComponent
public void renderForComponent(IMarkupWriter writer,
IRequestCycle cycle,
IComponent invoker)
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
getInvoker
public IComponent getInvoker()
- Returns the object which invoked this Block's
renderForComponent(IMarkupWriter, IRequestCycle, IComponent)
method. This is often
used to access the informal parameters of a RenderBlock
component.
- Since:
- 4.0
Copyright © 2006-2008 Apache Software Foundation. All Rights Reserved.