• 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: directtoweb and readOnlyEntityNames rule
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: directtoweb and readOnlyEntityNames rule


  • Subject: Re: directtoweb and readOnlyEntityNames rule
  • From: David Avendasora <email@hidden>
  • Date: Wed, 30 Aug 2006 10:49:21 -0400

I am glad I could help!

This type of problem seems to be VERY typical of D2W and D2JC (and likely D2WS as well). The documentation is often either incomplete or just pain wrong. Digging through the API and examples of things that do work is about the only way to get by. With that said, once you figure out the correct way to do things, it is absolutely amazing what can be done without writing a bunch of Java code.

If there is a place in any of the documentation that led you astray, please point it out. I'm on a crusade to make D2JC (and D2W) much more friendly and less mysterious and therefor used more widely.

Dave

On Aug 30, 2006, at 10:34 AM, Steve Quirk wrote:


Holy crap! That worked! It also fixed it in the original bloated project as well.


The rule I created was done with RuleEditor and based on documentation from BugTracker in Wonder (though I could never find the rule mentioned in the docs). I don't take back any of the nasty cusses I muttered about D2W.

Thanks a whole lot for your help!

Steve

On Wed, 30 Aug 2006, David Avendasora wrote:

Okay, I'm going to take another stab at it. I think you're using the wrong class.

From the 5.3 API, EOKeyComparisionQualifier compares a named property of an object with a named value of another object. For example, to return all of the employees whose salaries are greater than those of their managers, you might use an expression such as "salary > manager.salary", where "salary" is the left key and "manager.salary" is the right key.

I think you should be using EOKeyValueQualifier, which the API states that it compares a named property of an object with a supplied value, which I believe is what you are doing. Based on this, You should rewrite the rule as:

   {
         author = 50;
         class = "com.webobjects.directtoweb.Rule";
         lhs = {
             class = com.webobjects.eocontrol.EOKeyValueQualifier;
             key = "session.noEdits";
             selectorName = "isEqualTo";
             value = 1;
         };
         rhs = {
             class = "com.webobjects.directtoweb.Assignment";
             keyPath = readOnlyEntityNames;
             value = (User, Group);
         };
     }

The reason the rule you wrote is not being triggered is that there is no object "1" and "1" certainly doesn't have named value so the lhs is never "True."

Again, I'm pretty new to rules writing, but I think this is correct.

Dave


On Aug 29, 2006, at 8:15 PM, Steve Quirk wrote:

class = com.webobjects.eocontrol.EOKeyComparisonQualifier;




_______________________________________________ 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
References: 
 >directtoweb and readOnlyEntityNames rule (From: Steve Quirk <email@hidden>)
 >Re: directtoweb and readOnlyEntityNames rule (From: Steve Quirk <email@hidden>)
 >Re: directtoweb and readOnlyEntityNames rule (From: David Avendasora <email@hidden>)
 >Re: directtoweb and readOnlyEntityNames rule (From: Steve Quirk <email@hidden>)

  • Prev by Date: web.xml.template and %WOClasspath%
  • Next by Date: Re: custom display for WOToManyRelationship destinationDisplayKey
  • Previous by thread: Re: directtoweb and readOnlyEntityNames rule
  • Next by thread: Restore and Save Session
  • Index(es):
    • Date
    • Thread