PDA

View Full Version : "couldn't find dataset for statsdata:/stats" ?


humptybump
10-20-2005, 06:47 PM
newbie here -

I am tring to create a simple grid accessing a simple XML file hosted on my webserver (Tomcat).

attached is the LZX and the XML files.

Any help is greatly appreciated.

shankara
10-21-2005, 01:43 AM
Try this:

Add request="true" and type="http" to <dataset> and add

<gridcolumn datatype="">Name
<text datapath="@year"/>
</gridcolumn>

Hope it works

Thanks

humptybump
10-21-2005, 06:33 AM
Thanks for the suggestions. The changes to the "dataset" made sense to me but I'm not clear on the purpose of the addition of the "gridcolumn".

I still _had_ the same original error ...

"couldn't find dataset for statsdata:/stats"


<EDIT>
When I removed the "<Window>" construct, the dataset works. Not sure about why, but at least I can proceed.
</EDIT>

Thanks.

shankara
10-21-2005, 07:28 AM
This should work for you:

<canvas height="450">
<dataset name="statsdata" request="true" type="http" src="http:stats3.xml"/>
<window x="10" y="10" width="400" height="400"
title="NSI Worldwide Stats"
resizable="true">
<grid datapath="statsdata:/stats" contentdatapath="NSI/Worldwide/Row" />
</window>
</canvas>

You need to place the <dataset> right under the <canvas> before <window>.

Sorry for the grid column but i thought you would like to name the columns and also i forgot to enter <gridcolumn datatype="columnname">.

but any way the above code should work smoothly.

thanks

humptybump
10-21-2005, 10:19 AM
Ahah - "newbie needed to understand scoping."

Thanks for the update. Things are working nicely now. I was also able to figure out two other issues - parsing different types of XML and using "<gridcolumn datatype="number">" to make my columns behave correctly for the various data types. (If there is an easier way, somebody let me know).