PDA

View Full Version : datapath question


ch_bowen
10-08-2003, 07:45 AM
I am having a problem with 'refreshing' an editor by resetting the class' datapath attribute. Since class.deleteNode() has some bugs associated to it, we are trying to reuse as many views/classes as possible. I have a class that has a datapath whose xpath attribute points to a node in a particular dataset. When instantiating the object, the datapath is set on initialization and all the data is displayed properly. When an event is triggered, I want to reuse the editor so I simply reset the datapath's xpath attribute to point to another node in a dataset. The problem is that the data is not being updated at all.
Is there any problems associated to using a datapath that I should be aware of?

Thanks alot,

Chris

antun
10-08-2003, 09:45 AM
Are you saying that when you call the setDatapath() method of <view> nothing happens?

If so, there is a bug associated with this - setting a datapath at runtime using the setDatapath() method requires that you use an absolute datapath, so what you could try is to figure out what the absolute datapath would be and set it that way and see if that helps. If it works, then the thing to do would be to have your script figure out what the datapath is.

-Antun