• 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: two d2wmodels
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: two d2wmodels


  • Subject: Re: two d2wmodels
  • From: Guido Neitzer <email@hidden>
  • Date: Wed, 1 Oct 2008 11:14:00 -0700

On 1-Oct-08, at 10:34 AM, Ash Mishra wrote:

Has anyone tried to use two d2wmodels in the same application. i.e. the default user.d2wmodel and say mysecond.d2wmodel?

Sure. Everybody does. You get d2w rule files from all the frameworks.

The reason I ask is that we want to return different List and Query pages for the same Entity (that is, have two different rulesets depending on context). I see in Project Wonder there is a custom ERD2WFactory, but it's unclear to me if this allows multiple model files - as it appears to also just use the application wide defaultModel.

Why don't you just use a rule in your application's rule file with something like:


pageConfiguration = 'ListMyEntity' => pageName = 'MySuperListPage' [100]

You super list page should implement the necessary API then.

I split my rules in to separate rule files for the different sections of my up and use a property to tell Wonder to load them:

er.directtoweb.ERD2WModel.additionalModelNames = ("events .d2wmodel","datasets.d2wmodel","clinical.d2wmodel","blog.d2wmodel")

These files normally consist of a couple dozen rules. The biggest has aroud 200 rules in it.

Btw: you should try to use the rules as generic as possible by using smartAttribute and smartRelationship (check in ERDirectToWeb how these rules look like). That can safe you a lot of rules.

cug


-- Real World WebObjects Bootcamp at the Big Nerd Ranch: http://www.bignerdranch.com/classes/real-world_webobjects.shtml

_______________________________________________
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: two d2wmodels
      • From: Ash Mishra <email@hidden>
References: 
 >two d2wmodels (From: Ash Mishra <email@hidden>)

  • Prev by Date: two d2wmodels
  • Next by Date: Re: two d2wmodels
  • Previous by thread: two d2wmodels
  • Next by thread: Re: two d2wmodels
  • Index(es):
    • Date
    • Thread