【发布时间】:2012-04-24 22:57:28
【问题描述】:
谁能告诉我如何在 Tapestry 中创建复合组件? 我知道如何在 JSF 中使用 using 以及 ui:define 来做到这一点。 但是挂毯呢?
我想创建以下设置:
sidebar.tml: 应该定义一些可替换的变量,这里是'header'和'content'
<t:container>
The header is ${header}, and the content ist ${content}.
</t:container>
layout.tml: 应该定义侧边栏始终对齐的正确位置
//header
<t:sidebar />
//footer
customPage.tml: 应该为侧边栏提供内容
<t:sidebar>
<t:header>my header</t:header>
<t:content>some content here</t:content>
</t:sidebar>
我知道不能这样做,但我希望你能理解我想要做什么并且可以帮助我吗?
tyvm
【问题讨论】: