You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Will <wi...@telegraafnet.nl> on 2005/05/18 18:37:28 UTC
Dynamic page header
Hi I'm new to Tapestry.
I have a border component that looks like this:
<html>
<body jwcid="@Body">
<table>
<tr valign="top">
<td><span jwcid="@Logo"/></td>
<td>
<span jwcid="@Header"/>
<span jwcid="@PageHeader"/>
</td>
</tr>
<tr valign="top">
<td><span jwcid="@Menu"/></td>
<td><span jwcid="@RenderBody"/></td>
</tr>
</table>
</body>
</html>
The problem I have is with the PageHeader component because every page 'could'
have a different page header (or no header).
What I would like is to specify in the .page declaration wich header to use
like this:
Page1.page
<page-specification>
<description>PAGE1</description>
<component id="pageHeader" type="PageHeader">
<static-binding name="pageHeader">HEADER1</static-binding>
</component>
</page-specification>
Page2.page
<page-specification>
<description>PAGE2</description>
<component id="pageHeader" type="PageHeader">
<static-binding name="pageHeader">HEADER2</static-binding>
</component>
</page-specification>
How can I do this? (I tried Block/RenderBlock but that didn't work...)
Hope someone can help me in the right direction.
Regards,
Will
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: Dynamic page header
Posted by Hugo Palma <hp...@digitalis.pt>.
Try dynamic block component. I'm using it for exacly the same purpose.
http://www.behindthesite.com/blog/C1931765677/E1630021481/
Cheers
Hugo
Will wrote:
>Hi I'm new to Tapestry.
>
>I have a border component that looks like this:
>
><html>
><body jwcid="@Body">
><table>
> <tr valign="top">
> <td><span jwcid="@Logo"/></td>
> <td>
> <span jwcid="@Header"/>
> <span jwcid="@PageHeader"/>
> </td>
> </tr>
> <tr valign="top">
> <td><span jwcid="@Menu"/></td>
> <td><span jwcid="@RenderBody"/></td>
> </tr>
></table>
></body>
></html>
>
>The problem I have is with the PageHeader component because every page 'could'
>have a different page header (or no header).
>
>What I would like is to specify in the .page declaration wich header to use
>like this:
>
>Page1.page
><page-specification>
> <description>PAGE1</description>
>
><component id="pageHeader" type="PageHeader">
> <static-binding name="pageHeader">HEADER1</static-binding>
></component>
></page-specification>
>
>Page2.page
><page-specification>
> <description>PAGE2</description>
>
><component id="pageHeader" type="PageHeader">
> <static-binding name="pageHeader">HEADER2</static-binding>
></component>
></page-specification>
>
>How can I do this? (I tried Block/RenderBlock but that didn't work...)
>
>Hope someone can help me in the right direction.
>Regards,
>Will
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org