|
|
|
Using "datapath" attribute does work, but using the datapath child element doesn't.
<view name="container" x="10" y="10"> <simplelayout axis="y" spacing="2" /> <selectionmanager name="selman" /> <contact name="row" datapath="ds:/addressbook/contacts/person"> <!-- <datapath xpath="ds:/addressbook/contacts/person"> </datapath> --> BTW, the example doesn't replicate in 3.4 either when the <datapath> element is used
OK, the thing that is causing this bug is the definition of the <contact> class,
It declares an explicitly empty datapath <class name="contact" datapath="" ... which seems to be overriding the datapath child element in the example <contact name="row"> <datapath xpath="ds:/addressbook/contacts/person"/> </contact> Removing that empty datapath example fixes this. I am going to mark this as an invalid bug, although I will add a warning to the debugger if it finds both a datapath attribute and a datapath child tag on a view. Actually, the system should have just overridden the class definition's datapath
attribute with the instance's child datapath tag attribute. So this is a bug. I'm working on it... I was just about to comment on *exactly* what you said, when I saw yours. So I'm just seconding it.
One thing I noticed in 4.0 is that you don't seem to need to declare datapaths on views you intend to data-bind at run-time. In 3.x, you were obliged to enter an empty datapath (or an empty datapath node) on the tag, if you intended to set its datapath later (using, say datapath.setAttribute("p", somedp)). This seems to have changed now. We put in a fix which allows the datapath element in an instance to override any datapath
attribute from a class definition |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
like it's not related to the relative URL.
I'm looking into why replication isn't firing.