blob: 6ed43c30f44a8d610f191b80ec3deda1b2b740f9 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- $Id$ -->
<html>
<head>
<title>Block</title>
<link rel="stylesheet" type="text/css" href="Tapestry.css" title="style">
</head>
<body>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td align="left"><A href="Any.html"><IMG alt=Any src="common-images/prev.png"></A></td>
<td align="middle"><A href="index.html"><IMG alt="Component Index" src="common-images/home.png" ></A></td>
<td align="right"><A href="Body.html"><IMG alt=Body src="common-images/next.png"></A></td>
<tr>
<tr>
<td colspan="3"><hr></td>
</tr>
<tr>
<td colspan="3">
<table border="0" cellpadding="4" cellspacing="4" width="100%">
<tr valign="top">
<td>
<table>
<tr>
<td><font size="+2"><b>Block</b></font></td>
</tr>
<tr>
<td>
<A href="../api/org/apache/tapestry/components/Block.html">org.apache.tapestry.components.Block</A>
</td>
</tr>
</table>
</td>
<td>
<table align="right" valign="middle" bgcolor="#c0c0c0" cellpadding="8">
<tr>
<td>Non Visual Component</td>
</tr>
</table>
</td>
</tr>
<tr valign="center">
<td colspan="2">&nbsp;</td>
</tr>
<tr>
<td colspan="2">
<b>Description</b>
<br>
A Block is used to prevent a section of an HTML template from being renderred.
That is, a Block is allowed a body, but never renders it. Instead, an
<a href="RenderBlock.html">RenderBlock</a> component is used to insert the body of
the block.
<p>
Block and <a href="RenderBlock.html">RenderBlock</a> are used to build a certain
class of complicated component that can't be assembled using the normal
wrapping containment. Such a complex component would have two or more sections
that need to be supplied by the containing page (or component).
<p>
Blocks can be used to pass arbitrary blocks of HTML and components as
parameters to a component.
<p>
The runtime property <tt>inserter</tt> gives access to the
component, typically an <a href="RenderBlock.html">RenderBlock</a>
that inserted the body of the Block. This allows for access to
informal parameters of the InsertBlock, which is a useful (if
roundabout) way to pass parameters to the components inside a Block
from the container that inserts the Block.</p>
</td>
</tr>
<tr>
<td colspan="2">
<b>See Also</b>
<br>
<A href="Conditional.html">Conditional</A>,
<A href="Insert.html">Insert</A>,
<a href="RenderBlock.html">RenderBlock</a>
</td>
</tr>
<tr>
<td colspan="2">
<b>Parameters</b>
<br>
None
<p>
Body: <STRONG>rendered<BR></STRONG>
Informal parameters:
<STRONG>forbidden</STRONG>
<br>
Reserved
parameters: <EM>none</EM></p>
</td>
</tr>
<tr>
<td colspan="2"> <b>Examples</b>
<p> Please see the documentation for the <a href="RenderBlock.html">RenderBlock</a>
component.</p>
</td></tr></table>
</td></tr>
<tr>
<td colspan="3"><hr></td>
</tr>
<tr>
<td align="left"><A href="Any.html"><IMG alt=Any src="common-images/prev.png"></A></td>
<td align="middle"><A href="index.html"><IMG alt="Component Index" src="common-images/home.png" ></A></td>
<td align="right"><A href="Body.html"><IMG alt=Body src="common-images/next.png"></A></td>
</tr>
</table>
</body>
</html>