Re: two d2wmodels
Re: two d2wmodels
- Subject: Re: two d2wmodels
- From: Ash Mishra <email@hidden>
- Date: Wed, 1 Oct 2008 11:16:39 -0700
Thanks guys. Clearly need to read up more on D2W and the default
d2w.d2wmodel.
On 1-Oct-08, at 11:14 AM, Guido Neitzer wrote:
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
_______________________________________________
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