I'm afraid that components that may be used this way should use
page.requestCycle.page instead of simply page. Each page has tis
requestCycle property that is set as the page is attached to the engine for
the duration of the request.
Eventually, I'll think of a clean way tht you can attach informal parameters
to an InsertBlock that allows the parameters to be visible to components
inside the Block and this will not be an issue.
----- Original Message -----
From: "Richard Lewis-Shell" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, April 04, 2002 8:08 PM
Subject: [Tapestry-developer] Block confusion
Hi,
If I have a component C that is wrapped/defined in a Block on page A, and it
is rendered on Page B using an InsertBlock, what page will a "page" binding
in C return? i.e property-path="page.banana" I am experiencing page A being
returned, when I was naively expecting B.
To get around this, I have stored the request cycle at the start of the
render, and am using cycle.page in my bindings instead. But this seems
wrong (despite it working) - how is an arbitrary component to know if it
should use getPage(), or the cycle's getPage() to get the Page that it is
being rendered into?
Richard
----------------------------------------------------------------------------
Bringing you mounds of caffeinated joy
>>> http://thinkgeek.com/sf <<<
_______________________________________________
Tapestry-developer mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/tapestry-developer