Re: Direct 2 Web - which rule files?
Re: Direct 2 Web - which rule files?
- Subject: Re: Direct 2 Web - which rule files?
- From: David LeBer <email@hidden>
- Date: Mon, 15 Jun 2009 17:17:55 -0400
On 15-Jun-09, at 3:33 PM, David Avendasora wrote:
Hey Kieran,
I believe that any given application or framework can only have two
files: user.d2wmodel and d2w.d2wmodel (user.d2model would normally
be maintained by the Assistant). If you have an application with 3
D2W frameworks, then you'd have a total of 8 files to work with. The
rule with the _highest_ priority number will win. I'm not sure what
happens if two rules have the same priority though.
The reading I've done says that only the two 'user' and 'd2w' rule
files are supported by default, which leads me to believe you could
use others if you wished, but you might need to create your own D2W
factory subclass to do so (or something). I've never had the need.
In the bad old days, you would try to avoid editing the user.d2wmodel
file as the Assistant would stomp all over your changes. However,
since I don't use the Assistant, I recommend that others not, and it
may not even work anymore, I follow the following convention:
user.d2wmodel file - rules that are application specific i.e: not
generic enough to be reusable.
d2w.d2wmodel file - rules that are generic and can be reused - i.e:
base rules for your look, or rules that define default behaviour for
your model
Remember, if you use -D2WTraceRuleFiringEnabled YES as a launch
argument, you can see all the rules fire so you'll know which one is
doing what.
And the virtual log4j loggers that are available from Wonders log4j
config page.
i.e:
// these two are enabled when you turn on rule tracing in the
ERD2WDebugFlags
log4j.category.er.directtoweb.rules.D2WTraceRuleFiringEnabled=DEBUG
log4j.category.er.directtoweb.rules.ERD2WTraceRuleFiringEnabled=DEBUG
er.directtoweb.rules.displayPropertyKeys.cache
er.directtoweb.rules.displayPropertyKeys.candidates
er.directtoweb.rules.displayPropertyKeys.fire
Dave
On Jun 15, 2009, at 2:03 PM, Kieran Kelleher wrote:
OK, as I add D2W into existing apps, I may ask some dumb questions
this year, so bear with me ;-)
Question: For a typical app having D2W and the essential Wonder D2W
frameworks too, what are all the rule files that get picked up? Is
it only ones named d2w.d2wmodel and user.d2wmodel files or is it
all and any file *.d2wmodel?
;david
--
David LeBer
Codeferous Software
'co-def-er-ous' adj. Literally 'code-bearing'
site: http://codeferous.com
blog: http://davidleber.net
profile: http://www.linkedin.com/in/davidleber
twitter: http://twitter.com/rebeld
--
Toronto Area Cocoa / WebObjects developers group:
http://tacow.org
_______________________________________________
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