This comes up often enough that I wanted to post a specific message for
future reference.

XML nodes ARE bindable. (XMLList is NOT bindable)

Hee is an example of binding to XML:
http://www.cflex.net/showFileDetails.cfm?ObjectID=628

Alex Harui, in response to another post, explains how XML nodes can be
bindable, even though XML does not directly dispatch events.  He also
explains why you get the binding warnings, and offers the solution to
that. Here is a copy of his post:

------------------------------------------------------------------------
----------------------
XML does not dispatch events per-se.  It is like Object.  
However, unlike Object, every XML node can be assigned a callback which
converts it into a notifying XML node.  That's what XMLNotifier does.
All changes to a node hooked up by XMLNotifier, no matter how deep
should result in a change event that binding should pick up.
One common error is to assign your binding expressions in a way that
does not tell the compiler that you are binding to XML.  The classic is
{myservice.lastResult.someData}.  If the compiler doesn't think that is
XML, it will try to attach regular PropertyChangeWatchers and you'll get
those binding warnings in the debugger when it finds that it isn't a
bindable object.  If you use {XML(myservice.lastResult.someData)}, that
makes sure the compiler sees it as XML and should use XML binding and
wrap that node in an XMLNotifier, and those binding warnings will go
away.
It is entirely possible that you've found a way to change the XML in a
way that the XMLNotifier notfications aren't on those nodes.  We'd be
interested in that kind of scenario.
If you hand-rolled your own binding hookups, make sure you use the
correct watchers.
-Alex
------------------------------------------------------------------------
------------------------------
Tracy Spratt

Reply via email to