• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: More D2W basics
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: More D2W basics


  • Subject: Re: More D2W basics
  • From: "Andrew R. Kinnie" <email@hidden>
  • Date: Mon, 14 Jun 2010 14:47:30 -0400

OK, my rule file is based on the ERModernDemo.  Specifically in to-one situations like this, I looked at the relationship from movie to PlotSummary.  Clearly there are things I am not fully understanding.  I didn't see anything about embedded components with regard to that.

Anyway, basically, a booking is an EO representing one performance's act on one date.  So aBooking.performance is a to-one.  The relevant rules are pasted below (unless there are others I didn't see, but there don't seem to be.   (there is another issue about trying to get the auto-generated date picker to allow the user to pick a time as well as a date, but that's not related to this)

{
    rules =     (
                {
            author = 100;
            class = "com.webobjects.directtoweb.Rule";
            lhs =             {
                class = "com.webobjects.eocontrol.EOAndQualifier";
                qualifiers =                 (
                                        {
                        class = "com.webobjects.eocontrol.EOOrQualifier";
                        qualifiers =                         (
                                                        {
                                class = "com.webobjects.eocontrol.EOKeyValueQualifier";
                                key = task;
                                selectorName = isEqualTo;
                                value = select;
                            },
                                                        {
                                class = "com.webobjects.eocontrol.EOKeyValueQualifier";
                                key = task;
                                selectorName = isEqualTo;
                                value = list;
                            },
                                                        {
                                class = "com.webobjects.eocontrol.EOKeyValueQualifier";
                                key = task;
                                selectorName = isEqualTo;
                                value = editRelationship;
                            }
                        );
                    },
                                        {
                        class = "com.webobjects.eocontrol.EOKeyValueQualifier";
                        key = "entity.name";
                        selectorName = isEqualTo;
                        value = Booking;
                    }
                );
            };
            rhs =             {
                class = "com.webobjects.directtoweb.Assignment";
                keyPath = displayPropertyKeys;
                value =                 (
                    "performance.actName",
                    eventDate
                );
            };
        },
                {
            author = 100;
            class = "com.webobjects.directtoweb.Rule";
            lhs =             {
                class = "com.webobjects.eocontrol.EOAndQualifier";
                qualifiers =                 (
                                        {
                        class = "com.webobjects.eocontrol.EOKeyValueQualifier";
                        key = "entity.name";
                        selectorName = isEqualTo;
                        value = Booking;
                    },
                                        {
                        class = "com.webobjects.eocontrol.EOKeyValueQualifier";
                        key = propertyKey;
                        selectorName = isEqualTo;
                        value = performance;
                    }
                );
            };
            rhs =             {
                class = "com.webobjects.directtoweb.Assignment";
                keyPath = keyWhenRelationship;
                value = actName;
            };
        },
                {
            author = 100;
            class = "com.webobjects.directtoweb.Rule";
            lhs =             {
                class = "com.webobjects.eocontrol.EOAndQualifier";
                qualifiers =                 (
                                        {
                        class = "com.webobjects.eocontrol.EOKeyValueQualifier";
                        key = "entity.name";
                        selectorName = isEqualTo;
                        value = Booking;
                    },
                                        {
                        class = "com.webobjects.eocontrol.EOKeyValueQualifier";
                        key = task;
                        selectorName = isEqualTo;
                        value = edit;
                    },
                                        {
                        class = "com.webobjects.eocontrol.EOKeyValueQualifier";
                        key = propertyKey;
                        selectorName = isEqualTo;
                        value = performance;
                    }
                );
            };
            rhs =             {
                class = "com.webobjects.directtoweb.Assignment";
                keyPath = componentName;
                value = ERMDEditRelationship;
            };
        },
                {
            author = 100;
            class = "com.webobjects.directtoweb.Rule";
            lhs =             {
                class = "com.webobjects.eocontrol.EOAndQualifier";
                qualifiers =                 (
                                        {
                        class = "com.webobjects.eocontrol.EOKeyValueQualifier";
                        key = pageConfiguration;
                        selectorName = isEqualTo;
                        value = ListEmbeddedBooking;
                    },
                                        {
                        class = "com.webobjects.eocontrol.EOKeyValueQualifier";
                        key = parentPageConfiguration;
                        selectorName = isLike;
                        value = "*Performance";
                    }
                );
            };
            rhs =             {
                class = "com.webobjects.directtoweb.Assignment";
                keyPath = displayPropertyKeys;
                value =                 (
                    "performance.actName",
                    eventDate
                );
            };
        },
                {
            author = 100;
            class = "com.webobjects.directtoweb.Rule";
            lhs =             {
                class = "com.webobjects.eocontrol.EOOrQualifier";
                qualifiers =                 (
                                        {
                        class = "com.webobjects.eocontrol.EOKeyValueQualifier";
                        key = pageConfiguration;
                        selectorName = isLike;
                        value = "Edit*Booking";
                    },
                                        {
                        class = "com.webobjects.eocontrol.EOKeyValueQualifier";
                        key = pageConfiguration;
                        selectorName = isLike;
                        value = "Inspect*Booking";
                    }
                );
            };
            rhs =             {
                class = "com.webobjects.directtoweb.Assignment";
                keyPath = subTask;
                value = tab;
            };
        }
    );
}

I also have this rule for the pageWrapper:

{
    rules =     (
                {
            author = 130;
            class = "com.webobjects.directtoweb.Rule";
            rhs =             {
                class = "com.webobjects.directtoweb.Assignment";
                keyPath = pageWrapperName;
                value = AdminPageWrapper;
            };
        }
    );
}

I am attaching the screenshot showing the create page for Booking.  Two relationships (both to-one) are Agent and Performance:

PNG image

On Jun 14, 2010, at 1:20 PM, David Holt wrote:

> Hi Andrew,
>
> On 11-Jun-10, at 1:14 PM, Andrew R. Kinnie wrote:
>
>> Greetings all,
>>
>> I have managed to get D2W to display my entities and tabs (using ERModernLook) etc., but now I notice a bit of funkiness when inspecting objects with relationships.  Specifically, I have an Entity which is called "Booking" which has a date and a relationship to a "Performance" entity (akin to "Talent" I suppose).
>>
>> When I find a Booking, and edit it, the "Performance" row is filled with a complete copy of the pageWrapper I use (called AdminPageWrapper, and set in the pageWrapperName rule).
>
> Sounds like you need to set a different component for that Performance relationship. Is it to-one? to-many?
>
>>
>> In other words, when editing a booking, next to the word "Performance" on the Edit d2w component I get the fully styled tabs, with the Booking tab selected, Search sub tab selected, and the details for the selected performance below that.
>>
>> I assume there is something I am missing here, but I can't see why the entire wrapper would be rendered inside the generated div.  (Apparently the CSS is "ContentWrapper" inside the div)
>
> You need to be selecting an embeddable relationship component of some sort I think. Take a look at the MoviesDemo to see how it is done. What are the rules you are using relevant to that particular entity and property?
>
> d

 _______________________________________________
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

  • Follow-Ups:
    • Re: More D2W basics
      • From: Ramsey Gurley <email@hidden>
References: 
 >More D2W basics (From: "Andrew R. Kinnie" <email@hidden>)
 >Re: More D2W basics (From: David Holt <email@hidden>)

  • Prev by Date: Re: Wonder Classes????
  • Next by Date: Re: More D2W basics
  • Previous by thread: Re: More D2W basics
  • Next by thread: Re: More D2W basics
  • Index(es):
    • Date
    • Thread