Re: Passing a wrapper component to a page-level component
Re: Passing a wrapper component to a page-level component
- Subject: Re: Passing a wrapper component to a page-level component
- From: Ramsey Lee Gurley <email@hidden>
- Date: Tue, 05 May 2009 22:36:02 -0400
On May 5, 2009, at 8:27 PM, Paul Hoadley wrote:
On 06/05/2009, at 9:02 AM, Ramsey Lee Gurley wrote:
If you wanted, you could set up a page configuration to use your
EditFooPage component and have D2W return it like it would any
other page component. However, if your EditFooPage.wo does not
descend from D2WComponent, then the D2W factory will not call
setLocalContext on your page, so you will not have a D2WContext.
And without a d2wContext in your page, you won't be able to get the
d2wContext in your page wrapper... You're right back where you
started.
D2W is the standard approach to do what you are asking. All D2W
pages are general, non-app, page level components wrapped by an app-
specific page wrapper. The page wrapper can then get its
additional bindings from the page's d2wContext. (Look at ERD2WHead
for a concrete example of a pageWrapper component getting binding
info from the d2wContext.)
If you can subclass D2WComponent, then I think it should work.
Never tried it though :-)
I will give it a try and report back.
If you have difficulty subclassing, you could probably just wrap the
EditFooPage in a D2WComponent and then use *that* component in your
page configuration... several of the property level components in
ERDirectToWeb use this technique to make use of non-d2w components.
Ramsey
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden