Is the URL you are fetching from on the same server as the app was served from? If not, the Flash (and DHTML) security model will cause the data load to fail. In SWF, you can add a crossdomain.xml file to the server, in DHTML, you cannot load data using the existing data loader. There are some plans to introduce a JSON data loading facility in DHTML to get around this, but for Flash, you must obey their cross domain security model.

If the file is coming from the same server as the app, you can use Firefox's LiveHTTPHeaders to monitor what actual request is being made to the server, this is often instructive.


On 10/4/06, William Krick <[EMAIL PROTECTED]> wrote:
I just tried my app below as a SOLO app and it doesn't work (using nightly 3.4.x from yesterday).
 
It works fine when run under the server.  Is there something special I have to do to make it work in SOLO mode?
 
 
 
-----Original Message-----
From: Henry Minsky [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, October 04, 2006 6:23 PM
To: William Krick
Cc: Laszlo-User
Subject: Re: [Laszlo-user] dynamic loading of XML files into a dataset -- is this possible?

 POST was just an example.

In the Legals build, there are some bugs fixed that allow POST of raw data to work in SOLO mode now, for both swf and DHTML runtimes,  BTW.


On 10/4/06, William Krick <[EMAIL PROTECTED]> wrote:
Sweet.  That worked.  Thanks.

For some reason, I thought that it required an actual http URL.

It never occurred to me that it would work with loose files in the same
directory.

BTW, it doesn't seem to require setting the query type to POST.

Was there a reason you set the query type?

...

<canvas layout="axis:y">

  <dataset name="ds1" src="">  <dataset name="ds2"/>

  <combobox editable="false">
    <textlistitem datapath="ds1:/files/file"
                  text="$path{'text()'}" value="$path{'@value'}" />
    <handler name="onselect">
      Debug.write("setting src on ds2 to: " + this.value);
      ds2.setSrc(this.value);
      ds2.doRequest();
    </handler>
  </combobox>

  <view datapath="ds2:/phonebook/employee">
    <simplelayout axis="x"/>
    <text datapath="firstName/text()"/>
    <text datapath="lastName/text()"/>
    <text datapath="phone/text()"/>
  </view>

</canvas>



-----Original Message-----
From: Henry Minsky [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, October 04, 2006 5:36 PM
To: William Krick
Cc: Laszlo-User
Subject: Re: [Laszlo-user] dynamic loading of XML files into a dataset -- is
this possible?


You can easily set the URL for a dataset and issue a new request.

For example a post request on dataset ds would be

            ds.setSrc(url);
                ds.setQueryType('POST');
ds.doRequest();




On 10/4/06, William Krick < [EMAIL PROTECTED]> wrote:
Is it possible to dynamically load XML files into a dataset at runtime?

This example illustrates what I'm trying to do.
The attached zip includes this example and three required XML data files.


<canvas layout="axis:y">

  <dataset name="ds1" src="">  <dataset name="ds2"/>

  <combobox editable="false">
    <textlistitem datapath="ds1:/files/file"
                  text="$path{'text()'}" value="$path{'@value'}" />
    <handler name="onselect">
      Debug.write ("setting src on ds2 to: " + this.value);
       ds2.setAttribute('src', this.value);
    </handler>
  </combobox>

  <view datapath="ds2:/phonebook/employee">
    <simplelayout axis="x"/>
    <text datapath="firstName/text()"/>
    <text datapath="lastName/text()"/>
    <text datapath="phone/text()"/>
  </view>

</canvas>





_______________________________________________
Laszlo-user mailing list
[email protected]
http://www.openlaszlo.org/mailman/listinfo/laszlo-user







--
Henry Minsky
Software Architect
[EMAIL PROTECTED]


_______________________________________________
Laszlo-user mailing list
[email protected]
http://www.openlaszlo.org/mailman/listinfo/laszlo-user



--
Henry Minsky
Software Architect
[EMAIL PROTECTED]



_______________________________________________
Laszlo-user mailing list
[email protected]
http://www.openlaszlo.org/mailman/listinfo/laszlo-user





--
Henry Minsky
Software Architect
[EMAIL PROTECTED]

_______________________________________________
Laszlo-user mailing list
[email protected]
http://www.openlaszlo.org/mailman/listinfo/laszlo-user

Reply via email to