PDA

View Full Version : Remote DataSource


skeeve
10-11-2005, 03:28 PM
sorry I think I initially posted in the wrong section.

I am trying to use remote data sources in my project. However as soon as I assign the data source as being type="http" nothing displays in the project. If I remove that command it works fine. Any ideas?

mojoTivo
10-12-2005, 06:41 AM
I've only been playing with laszlo for a day now, but it may be that your problem is that "remote" data does not get retrieved automatically by default whereas local data might. I'm not the expert.

However, if your dataset looks like this:

<dataset
type="http"
name="MyData"
src="http://www.website.com/data.xml"
/>

and you know that the URL works, try adding the "request" attribute to make the dataset automatically load the data on startup. It should look like this:

<dataset
request="true"
type="http"
name="MyData"
src="http://www.website.com/data.xml"
/>

Hope this helps.

skeeve
10-12-2005, 06:46 AM
Well I got it working late last night. here is the dataset tag I am using now

<dataset name="mydata" type="http" src="http://Myurlhere" autorequest="true" request="true" />

I found that just using autorequest didn't work. Then I tried replacing autorequest with just request as per the documentation. Still didn't work. So I decided why not just put both of them in and it started to work. Also if I remove the type attribute then it stops working again.

mojoTivo
10-12-2005, 06:53 AM
Wild! I thought I saw in the docs that "autorequest" had been deprecated. It seems weird that you would need both. It works for me with only the "request" tag. BTW: I am using version 3.0.2.

The doc's also say that if the src points to a fully formed URL, that the "type" is implied. I just tried removing the "type" attribute in my code, and it still worked. Is it possible that you are using a different version of Laszlo than I am?

Regardless, glad you got it working.

skeeve
10-12-2005, 07:16 AM
Well there is a possibility however the LPS folder says 3.0.2 on it so I am assuming it is the same version.