Maybe a concrete example would help explain what I'm trying to ask...

Say I have a component in my application that looks something like this...

<webobject = "Main">
        <div>
                <!-- Some other components and what not... ->
        </div>
        <div>
                <webobject name = "MyEmbeddedD2WInspectComponent" />
        </div>
</webobject>

WOD File...

MyEmbeddedD2WInspectComponent : ERXD2WInspect {
        entityName = MyEntity;
        object = myObject;
        pageConfiguration = "MyEntityInspectPage";
}

and we will say my look resolves that templateNameForInspectPage resolves to 
MyLookInspectPage and the pageConfiguration in my app's D2W model resolves the 
display keys.

The component MyLookInspectPage would still start like this:

<webobject name = "PageWrapper">
        <!-- The rest of the objects... ->
</webobject>

WOD File...

PageWrapper: WOSwitchComponent {
        WOComponentName = d2wContext.pageWrapperName;
        _componentUnroll = true;
        _unroll = true;
}

So my question is it's not going to use the PageWrapper because it is embedded 
right?  But I still want to put it in there in case I decide to use D2W in the 
normal non-embedded way?

Sorry if this is totally off base...

Johnny

On Mar 1, 2013, at 10:04 AM, Jesse Tayler <[email protected]> wrote:

> 
> I don't follow, but if your page comes up without any wrapper, you'll know 
> you needed it, eh?
> 
> but, yes, "magic rules" go down and down in frameworks - read the lowest 
> level rules and you'll see the entire thing is all the same kind of magic 
> done everywhere.
> 
> you might think of a d2wcontext as really just a dictionary -- a dictionary 
> with some logic behind the key/value pairs and a few significant keys that 
> get recalculated each request - but most are just cached responses that end 
> up being a really lightweight and centralized representation of UI logic.
> 
> so, d2wContext knows X is this entity, and Y is the task type, then the 
> response for what's my page component must be Z right?
> 
> since most pages represent a series of attributes, an iteration through 
> property keys sets each of the key/value responses on down the line.
> 
> more specific rules, fire during more specific contexts.
> 
> go ahead! write a rule that accesses your object model's properties for an 
> attribute -- e.g.  like maybe a string's column width, and use that to set 
> the size of an editor for any string attribute. This one rule can decide for 
> all.
> 
> 
> 
> On Mar 1, 2013, at 2:50 PM, Johnny Miller <[email protected]> wrote:
> 
>> Thanks Jesse,
>> 
>> So is it just the "magic" of D2W that says "OK, this is an embedded 
>> component so I can skip the PageWrapper"?
>> 
>> Best,
>> 
>> Johnny
>> 
>> On Mar 1, 2013, at 9:41 AM, Jesse Tayler <[email protected]> wrote:
>> 
>>> 
>>> sure, you'll likely need your page wrapper in a page level component.
>>> 
>>> and these steps sound about right.
>>> 
>>> I don't think you'd need to make a whole new look framework unless you're 
>>> going to do an entire, shared look -- others know better I'm sure but you 
>>> can create just a few components that override the basic edit and inspect 
>>> and list pages and design them to your liking.
>>> 
>>> I think you'll have a GREAT time creating your own components for use with 
>>> D2W rules!
>>> 
>>> Got for it!
>>> 
>>> you'll realize that you can write some java code and design your templates 
>>> very specifically, and thus reduce dramatically the number of components 
>>> and rules you actually need to create.
>>> 
>>> write code to reduce rules, then write rules specific to your UI to reduce 
>>> code - you'll end up with something really tight.
>>> 
>>> I've seen a lot of D2W designs where to add a new attribute, you end up 
>>> writing three rules for this, two rules for that and you make a tiny 
>>> component to link here or there and so on -- if you take this level of 
>>> control you have decided upon, you can really design super-tightly to your 
>>> UI concept.
>>> 
>>> Have fun!
>>> 
>>> On Mar 1, 2013, at 2:28 PM, Johnny Miller <[email protected]> wrote:
>>> 
>>>> Hi,
>>>> 
>>>> I'm having a little trouble wrapping my head around this (no surprise I 
>>>> know)...
>>>> 
>>>> I would like to start small and just use the ERXD2WInspect component to 
>>>> combat the component explosion Ramsey talks about in his Custom and 
>>>> Embedded D2W component presentation.
>>>> 
>>>> I would like to use my own look...
>>>> 
>>>> So to get started I should:
>>>> 
>>>> 1. Create my own look framework.
>>>> 2. Create a component that subclasses ERD2WInspectPageTemplate
>>>> 3. In the framework's rule file create a rule that the component created 
>>>> in the step above is the right hand assignment for 
>>>> templateNameForInspectPage
>>>> 4. In my app I wouldn't reference the component I created I would just 
>>>> bind my embedded component to ERXD2WInspect.
>>>> 
>>>> So far so good?
>>>> 
>>>> If so when authoring my component...  do I still wrap the component 
>>>> content with the PageWrapper?
>>>> 
>>>> Thanks in advance,
>>>> 
>>>> Aloha,
>>>> Mr. Johnny Miller
>>>> Web Development Manager
>>>> Kahalawai Media Company
>>>> Lahaina, HI 96761
>>>> tel: (808) 661-7962 | mobile: (808) 283-0791
>>>> website | e-mail   
>>>> 
>>>> _______________________________________________
>>>> Do not post admin requests to the list. They will be ignored.
>>>> Webobjects-dev mailing list      ([email protected])
>>>> Help/Unsubscribe/Update your Subscription:
>>>> https://lists.apple.com/mailman/options/webobjects-dev/jtayler%40oeinc.com
>>>> 
>>>> This email sent to [email protected]
>>> 
>> 
> 

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to