You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Adam Zimowski <zi...@gmail.com> on 2008/03/15 16:11:20 UTC

t5: inheriting block parameter

Inheriting non-block parameter works fine, but inheriting block
parameter is not. Is this by design? If so, how to achieve the same
effect.

Here is example:

Layout {

@Parameter
private String _title;

@Parameter
private Block _helloWorld;

public String getTitle() { return _title; }
}

<html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd">
<title>${title}</title>
<body>
<t:body/>
</body>
</html>

ChildLayout {
}

<html t:type="Layout" t:title="inherit:title"
t:helloWorld="inherit:helloWorld"
xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd">
<t:body/>
</html>

HelloWorldPage {
}

<html t:type="ChildLayout" t:title="Title Works Fine"
xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd">
<t:parameter name="helloWorld">This block will not show even though it
should.</t:parameter>
Hello World!
</html>

-adam

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org