<class name = "datapipe" extends = "node">
<attribute name = "table" type = "string" />
<dataset name="action" type="http" request = "false" />
<datapointer name='bar' xpath="local:action:/">
<method event="ondata">
var q = "results/text()";
Debug.write(q, this.xpathQuery(q));
</method>
</datapointer>
</class>
<datapipe id='foo'/>
In the debugger, I did this manually
lzx> k = new LzDataElement("results")
«LzDataElement#3| <results/>»
lzx> c = new LzDataText("success!")
«LzDataText(0)#4| []»
lzx> k.appendChild(c)
«LzDataText(0)#4| []»
lzx> foo.action.appendChild(k)
«LzDataElement#3| <results>success!</results>»
lzx> foo.bar
«LzDatapointer#0| <action><results>success!</results></action>»
lzx> foo.bar.ondata.sendEvent()
results/text() success!
lzx>
You're right there - the 'action' dataset is intended as a
'placeholder' that I can
route requests through from the main canvas. The idea is that
requests are
fed through the action dataset and an updated set of records is
returned via
the 'list' dataset on successful submission. This in turn
automatically updates
any views bound to the list dataset.
So there's no actual location for the action dataset until a request
is made from
the canvas - this was my intention, but I appreciate it's not the
traditional method.
Any other thoughts would be warmly received.
http://rafb.net/paste/results/eh2soq66.html
>> I'm having trouble referencing a dataset from within a class.
>>
>> The code here: http://rafb.net/paste/results/eh2soq66.html produces
>> the error "couldn't find dataset for action:/" (Line 13 is where it's
>> referenced.)
>>
>> Would anyone be kind enough to suggest what I should do to correct
>> it?
--
Henry Minsky
Software Architect
[EMAIL PROTECTED]
_______________________________________________ Laszlo-user mailing list [email protected] http://www.openlaszlo.org/mailman/listinfo/laszlo-user
