I was hoping that the "previous" component would be able to see the
pageResponse object which is provided by the containing pager
component. But I get a very strange and unhelpful error:
Render queue error in BeginRender[Admin:previous.if]: Failure
readingparameter 'test' of component Admin:previous.if: No object of
typecom.thc.web.components.PageResponse is available from the
Environment.Available types are
com
.thc
.web
.components
.PageResponse
,org
.apache
.tapestry
.PageRenderSupport
,org
.apache
.tapestry
.ValidationDecorator
,org
.apache
.tapestry
.internal
.services
.ClientBehaviorSupport,org.apache.tapestry.services.Heartbeat.
So it's not available, but it is!!
Can anyone see any glaring errors with this?
Yup. Your PageResponse class is in the components sub package. Try
moving it to a different package (not in .components, .pages,
or .mixins).
Robert
Thanks
Toby
----- Original Message ----
From: Robert Zeigler <[EMAIL PROTECTED]>
To: Tapestry users <users@tapestry.apache.org>
Sent: Friday, 16 May, 2008 3:32:00 PM
Subject: Re: Making a property available to nested components
Check out the environment service.
Robert
On May 16, 2008, at 5/169:23 AM , Toby Hobson wrote:
I've managed to achieve something by making the "container" a
component AND a property on my test page:
@Property
@Component(id="container")
private Container container;
but this seems like a bit of a hack, there must be a neater way of
doing this!
Toby
----- Original Message ----
From: Toby Hobson <[EMAIL PROTECTED]>
To: tapestry <users@tapestry.apache.org>
Sent: Friday, 16 May, 2008 3:15:57 PM
Subject: Making a property available to nested components
Hi
I am looking to achieve something similar to the way in which JSP
custom tags work - I would like to make a property of a component
available to nested components/markup e.g.
TestPage.tml:
<t:container value="container">
hello ${container.user.name}
</t:container>
Container {
@Property
User user;
@PageAttached()
void attach() {
... load and process "user"
}
}
But i can't find a way to do this. I know it can be done because the
loop component works like this.
Does anyone have any ideas?
Thanks
Toby
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]