Just to let you know that I finally got my datapipe class working as expected - thanks a lot for everyone's help. The trick was to reassign the datapointer's xpath attribute at the end of the ondata method. (4th line from the end). This forces it to update the second time data is received, and not just the first time. <class name = "datapipe" extends = "node"> <attribute name = "table" type = "string" /> <dataset name="list" type="http" request = "false" /> <dataset name="action" type="http" request = "false" /> <method reference = "action" event="ondata"> dp.setXPath("local:action:/"); </method> <datapointer name = "dp"> <method event="ondata"> if (this.xpathQuery("result/text()") == "success") { parent.list.doRequest(); Debug.write("Operation succeeded"); } else { Debug.write("Operation failed"); } this.setXPath("local:list:/"); </method> </datapointer> </class> The result is a canvas where all dynamic data automatically updates to stay in sync with the table records whenever the database is updated. Thanks again for your help. On 1 May 2006, at 18:27, Henry Minsky wrote: I believe an empty local datset will be created by the <dataset> declaration. That is, it will have no child elements. There may be some issue with how you are generating the ondata events. When I did this manually from the debugger, the xpath query worked fine. |
_______________________________________________ Laszlo-user mailing list [email protected] http://www.openlaszlo.org/mailman/listinfo/laszlo-user
