Re: Frameworks and Subcomponents
Re: Frameworks and Subcomponents
- Subject: Re: Frameworks and Subcomponents
- From: Ramsey Lee Gurley <email@hidden>
- Date: Wed, 04 Nov 2009 08:19:22 -0500
On Nov 4, 2009, at 8:09 AM, David Griffith wrote:
Well I discovered that there was an empty folder in the Dist App
Build directory for the component that I was getting a blank screen
with. Not sure how that happened. Anyway, I did a Clean and
Rebuild and it seems to have sorted it. So it appears to be working
now, but I'd still like to know if this is the correct way to go
about it? It seems logical enough and so far seems to work.....
Any comments?
Regards,
David.
On Nov 4, 2009, at 1:39 PM, David Griffith wrote:
HI all,
I have a questions about reusable components in frameworks. I've
never done this before so please bear with me.
I have an application, let's call it Distributor. This has a
component called Wrapper which is basically the page wrapper I use
for all pages.
I then have another component which I want to make more reusable and
which I would like to use in 3 different apps.
I have that component already put into a framework and that seems
fine. The problem is, the component originally contained an element
which referenced the Wrapper (so that everything would be inside
that). Clearly the 'Wrapper' can and will be different for each
application that I want to use it in. What would be the normal
procedure to do this?
I thought about having a component in my Distributor App that would
hold the reference to the Page Wrapper and inside that would insert
the shared component that I am trying to use. Doing that I am
getting the Page Wrapper but just a blank page where I expect the
component.
Any help would be appreciated.
Regards,
David.
Sorry, I missed your original email. The WO way of doing this would
be to use D2W (^_^) The wrapper is specified in the project, the
components are in the framework, and the framework is given the
wrapper component name via the rule system. So your wrapper looks like
Stuff...
<webobject name="WOComponentContent"/>
Other stuff
Your page looks like
<webobject name="Wrapper">
stuff...
</webobject>
and your page WOD looks like
Wrapper: WOSwitchComponent {
WOComponentName = d2wContext.pageWrapperComponentName;
}
The name for the wrapper is in your d2wContext dictionary. It got
there by way of the rule system. In each new project, you would have
a rule file and the file would contain a rule like
100: *true* => pageWrapperComponentName = "MyWrapper" [Assignment]
That's a brief explanation though. If you would like to know more,
you can find an overview of D2W here
http://wiki.objectstyle.org/confluence/pages/viewpage.action?pageId=4129115
Ramsey
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
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