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 protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to