• 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: Ramsey Gurley <email@hidden>
  • Date: Mon, 14 Jun 2010 15:22:30 -0400

A picture is worth a thousand words (^_^)

Try a rule like

100: not(pageConfiguration like '*Embedded*') => pageWrapperName = "AdminPageWrapper" [Assignment]

instead. I suspect those are embedded pageConfigurations and your rule has overridden the use of their default wrapper component (D2WEmptyWrapper I think...). If you click the D2W link in your debug helpers, you'll get tables telling you your configuration names. It might also work to simply lower the priority.

If that isn't the case, using those trace rule loggers to trace differences in the pageWrapperName rules for a modern template app and your modified app could probably help a lot.

log4j.category.er.directtoweb.rules.ERD2WTraceRuleFiringEnabled=DEBUG
log4j.category.er.directtoweb.rules.pageWrapperName.cache=DEBUG
log4j.category.er.directtoweb.rules.pageWrapperName.candidates=DEBUG
log4j.category.er.directtoweb.rules.pageWrapperName.fire=DEBUG

Ramsey

On Jun 14, 2010, at 2:47 PM, Andrew R. Kinnie wrote:

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:

<Screen shot 2010-06-14 at 2.46.15 PM.png>
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

_______________________________________________ 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: "Andrew R. Kinnie" <email@hidden>
References: 
 >More D2W basics (From: "Andrew R. Kinnie" <email@hidden>)
 >Re: More D2W basics (From: David Holt <email@hidden>)
 >Re: More D2W basics (From: "Andrew R. Kinnie" <email@hidden>)

  • Prev by Date: Re: More D2W basics
  • 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