Oops, just realised I sent this originally to the wrong list! <:-/
Begin forwarded message:
> From: Mark Jackson <mcj_1961@...>
> Date: 15 January 2007 10:42:37 GMT+01:00
> To: webobjects-dev@...
> Subject: Resetting ERD2WModel
> Dear Wonderites,
> Our App. is quite rule-based, and we are adding new ones all the
> time. It would greatly reduce the turn-around time for development
> if we could reset the ERD2WModel during development, so we don't
> have to re-start the App every time we edit rules (using the great
> RuleModeler, btw!).
> So, I created a simple component, which appears on all pages in
> development, and which simply calls 'ERD2WModel.erDefaultModel
> ().resetModel()' when clicked, which I thought should do the trick.
> This only partially works, as I found out when testing it. Simple
> rules, e.g. *true* => testRule = "Hello World", will work if the
> rhs is changed. More complex rules, e.g. (task='edit') and
> (entity.name='DummyEntity') => componentName = 'EditDummyEntity'
> I noticed, on browsing the ERD2WModel code for 'resetModel', that
> the calls to 'invalidateCaches()' and 'resetRules()' are commented
> out, so I think that (but not 100% sure) although the new rule
> files are correctly re-loaded, there are rules still in the cache
> which get fired instead of the new ones. Is there a reason for
> this, or am I barking up the wrong tree?
> Any help appreciated.
> Simon,Jackson GbR
> Mark C. Jackson BSc. Pg. Dipl.
> Telephone: +49 228 3388448-4
> Fax: +49 228 3388448-9
> WebObjects-dev mailing list