mikeb at mitre.org
Tue Sep 7 06:43:01 PDT 2004
I agree -- the 0.9 interface was the best.
> Phil Weighill-Smith wrote:
> You're not alone. We had the same idea and actually implemented interfaces, specialist JDOM factories and specialist JDOM nodes to support this (including event notification up the DOM hierarchy). Sadly, due to a small number of issues within JDOM itself we have had to patch the original JDOM code to enable correct event handling (specifically wrt insertion and deletion of nodes). The other problem we face is that we have to have a certain amount of "inside knowledge" of the JDOM classes in order to achieve this. This has meant that we're now "stuck" on JDOM Beta 9 (Beta 10's implementation was radically altered by the introduction of the Parent and Child interfaces - IMHO a common "Node" interface would have been far more useful, allowing the removal of "Object" from JDOM's API in most cases).
> It would be fantastic if JDOM itself had this support, but I doubt if you'll ever see it given previous discussions on this topic.
On Tue, 2004-09-07 at 03:59, Ravi Bhatia wrote:
> > Greetings. I was wondering if the JDOM library could support events. This is
> > useful in the Model-View-Controller paradigm, when an XML document is used to
> > represent the core data model. If a org.jdom.Document object could fire events
> > when it changes, a Listener that has registered with it could be notified.
> > Hence, allowing a View to reflect these changes immediately.
> > I believe, by using events, changes in the underlying XML document could be
> > propagated in a simpler and cleaner fashion.
More information about the jdom-interest