• 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: Programatically Setting/Filtering D2W displayPropertyKeys
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Programatically Setting/Filtering D2W displayPropertyKeys


  • Subject: Re: Programatically Setting/Filtering D2W displayPropertyKeys
  • From: David Avendasora <email@hidden>
  • Date: Thu, 28 Feb 2013 09:41:11 +0800


On Feb 28, 2013, at 8:53 AM, Ramsey Gurley <email@hidden> wrote:



On Feb 27, 2013, at 5:46 PM, David Avendasora wrote:


On Feb 28, 2013, at 8:35 AM, Ramsey Gurley <email@hidden> wrote:


On Feb 27, 2013, at 5:07 PM, David Avendasora wrote:


On Feb 28, 2013, at 3:00 AM, Ramsey Gurley <email@hidden> wrote:


I've looked at a couple ways, but I'm not sure what is the best strategy. I'm thinking creating a custom D2W Assignment subclass is the way, but I'm not sure.

If you aren't storing them, you can probably come up with a decent solution using a single assignment. It would just need some sort of permission manager object to consult. Maybe that comes from the rules or maybe a thread local.

What I was thinking of is something similar to the QueryDatasourceDelegate where you could define a delegate class that would have the logic to filter the array of displayPropertyKeys prior to them being returned by the D2WContext.

Simply create a rule that defines what delegate it should use to filter the displayPropertyKeys prior to returning them. The logic of why or how to filter is entirely up to the developer - it could be based on user preference or permissions triggering it would be controlled by the rule system.

Dave

What you've described actually exists! It's called an Assignment ;-)

Ramsey


Okay, maybe I'm missing a fundamental concept (no shocker there). So how do I tell it to go use the delegate instead of providing a list of keys manually in a rule?

Dave

With a rule, of course :-)

100: *true* => displayPropertyKeys = "" [DavesAssignment]

Notice there's no value on the rule. There could be, but there doesn't have to be. And now all your displayPropertyKeys everywhere will be set by DavesAssignment.

Ramsey

Ah! Okay, so it's one of the options I was considering waaaaaay back in the first message in the thread; that I should create a new Assignment subclass.

However, I think I'd still pass in the default list of keys that my assignment subclass could then filter based on any delegates it finds.

Thanks!




—————————————————————————————
WebObjects - so easy that even Dave Avendasora can do it!™
—————————————————————————————
David Avendasora
Senior Software Abuser
Kaiten, Inc.




 _______________________________________________
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: 
 >Programatically Setting/Filtering D2W displayPropertyKeys (From: David Avendasora <email@hidden>)
 >Re: Programatically Setting/Filtering D2W displayPropertyKeys (From: Ramsey Gurley <email@hidden>)
 >Re: Programatically Setting/Filtering D2W displayPropertyKeys (From: David Avendasora <email@hidden>)
 >Re: Programatically Setting/Filtering D2W displayPropertyKeys (From: Ramsey Gurley <email@hidden>)
 >Re: Programatically Setting/Filtering D2W displayPropertyKeys (From: David Avendasora <email@hidden>)
 >Re: Programatically Setting/Filtering D2W displayPropertyKeys (From: Ramsey Gurley <email@hidden>)

  • Prev by Date: Re: Programatically Setting/Filtering D2W displayPropertyKeys
  • Next by Date: _dbupdater
  • Previous by thread: Re: Programatically Setting/Filtering D2W displayPropertyKeys
  • Next by thread: _dbupdater
  • Index(es):
    • Date
    • Thread