get, although I was hoping for this.datapath.appendChild(...), so the class would work no matter where its datapath referred to in the XML node hierarchy

On Jul 13, 2009, at 9:46 AM, André Bargull wrote:

Let's say you've got a datapath named "dp", then you can access the dataset for "dp" either by calling "dp.getDataset()" or by using the xpath-query "dp.xpathQuery('/')". In both cases you don't need to use a direct reference to the dataset in your code.
Is it this what you are looking for?


- André


On 7/13/2009 3:38 AM, Sarah Allen wrote:
Andre,
Thanks for the tip on: http://jira.openlaszlo.org/jira/browse/ LPP-8323 As long as you don't update the underlying datasource, any new replication won't preserve the previously entered text (except for pooling replication, just as you described). So in your case, you need to call "datapath.updateData()" for every "onvalue" / "onblur" / ... event on your edittext.
In reference to my comment:
> // there must be a better way...
> dsSurvey.data[1].appendChild(newNode);
---
Some alternatives:
- dsSurvey.getFirstChild().getNextSibling().appendChild(...)
- dsSurvey.getLastChild().appendChild(...)
- dsSurvey.getPointer().xpathQuery("/children[1]").appendChild(...)
I was looking for a way to add a note based on the relative datapath of the view, but couldn't figure out what suntax would do that (rather than using the global reference to the dataset "dsSurvey" in this case)
Thanks,
Sarah
p.s. cc'ing laszlo-user in case anyone else wants to chime in and since the answer might be interesting to others


Reply via email to