[Laszlo-dev] RE: Laszlo-dev Digest, Vol 9, Issue 24
Jose Soriano Bustos
dienadel_13 at yahoo.es
Thu Jun 16 07:18:32 PDT 2005
Hello, i have one idea, probe change your code for this,
---------------------------------------------------------------------------------------
<your code>
----------------------------------------------------------------------------------------
<canvas>
<dataset name="dset" src="queue.xml"/>
<dataset name="basics" src="stubbed-out-until-i-know-what-to-load"/>
<simplelayout axis="y"/>
<view datapath="dset:/queue/status/request">
<script>
var d = canvas.datasets.basics;
d.setAttribute('src', 'requests/@id/basics.xml");
</script>
<simplelayout axis="x"/>
<text datapath="@id"/>
<text datapath="basics:/request/study"/>
<text datapath="basics:/request/experiment"/>
<text datapath="basics:/request/status"/>
</view>
</canvas>
--------------------------------------------------------------------------------
</yourcode>
--------------------------------------------------------------------------------
------------------------------------------------------------------------------
<newcode>
-------------------------------------------------------------------------------
<canvas>
<dataset name="dset" src="queue.xml"/>
<dataset name="basics" src="stubbed-out-until-i-know-what-to-load"/>
<simplelayout axis="y"/>
<view datapath="dset:/queue/status/request">
<method event="ondata">
var d = canvas.datasets.basics;
d.setAttribute('src', 'requests/'+this.datapath.getNodeAttribute('id')+'/basics.xml');
</method>
<simplelayout axis="x"/>
<text datapath="@id"/>
<text datapath="basics:/request/study"/>
<text datapath="basics:/request/experiment"/>
<text datapath="basics:/request/status"/>
</view>
</canvas>
----------------------------------------------------------------------
</newcode>
-------------------------------------------------------------------------
good lucky,i'm sorry for my bad english.
Newbie here. I know so little, I don't even know how to properly title
this thread.
My data is in several xml files and I want to combine them and look at a
summary table.
I want to see this:
id study experiment status
-----------------------------------------------
1053 myStudy MyExperiment pending
1054 myStudy2 MyExperiment2 pending
1 myStudy3 MyExperiment3 inprogress
...
Top level file named queue.xml .. looks like this:
And the details of each request are in different files based on their id.
For now, let's just look at a file called basics.xml.
E.G. This lives in directory requests/1053 where 1053 is the request id.
requests/1053/basics.xml
in there, we have:
1
pending
MyExperiment
MyStudy
I want to change the src of the 'details' dataset depending on which item
in the queue I am currently looking at. My first (and feeble) attempt is
this, which doesn't work for several reasons. I apparently can't nest a
script tag like that, and the requests/@id/basics.xml doesn't do the XPath
substitution. Obviously I have no idea what I'm doing.
var d = canvas.datasets.basics;
d.setAttribute('src', 'requests/@id/basics.xml"/>
I couldn't find any examples to help me along these lines, and I just
don't have any idea about how to override methods, or plug into hooks, or
whatever it takes to get this done.
Thanks for any help.
Donald
------------------------------
_______________________________________________
Laszlo-dev mailing list
Laszlo-dev at openlaszlo.org
http://www.openlaszlo.org/mailman/listinfo/laszlo-dev
End of Laszlo-dev Digest, Vol 9, Issue 24
*****************************************
---------------------------------
Correo Yahoo!
Comprueba qué es nuevo, aquí
http://correo.yahoo.es
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://openlaszlo.org/pipermail/laszlo-dev/attachments/20050616/eaabcd7d/attachment.html
More information about the Laszlo-dev
mailing list