Conceptually, that sounds like it would work.
However, I have no idea what the syntax for something like that would look like,
especially, the source path part...
<dataset name="dspaths" src=""http://dspaths.xml">http://dspaths.xml">
<event name="ondata">
ds1.setSrc(this.????:/paths/path1/text());
ds2.setSrc(this.????:/paths/path2/text());
</event>
</dataset>
<event name="ondata">
ds1.setSrc(this.????:/paths/path1/text());
ds2.setSrc(this.????:/paths/path2/text());
</event>
</dataset>
<dataset name="ds1"/>
<dataset name="ds2"/>
-----Original Message-----How about having an ondata event (or a pointer to the dataset with one) for the "dspaths" dataset that then goes and programmaticly modifies the source for the other datasets (and possibly calls doRequest)?
From: Bryan Barkley [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 30, 2006 3:33 PM
To: William Krick
Cc: Laszlo-User
Subject: Re: [Laszlo-user] setting dataset src from external file at startup
On 3/30/06, William Krick <[EMAIL PROTECTED]> wrote:Ok, maybe this was a little vague. Here's a better description of what I'm
trying to do...
The ultimate goal here is to have source paths for datasets that are
configurable with an external XML file.
In the directory with my openlaszlo app, there's an XML file called
dspaths.xml containing something like this...
<paths>
<path1>http://www.domain.com/servlet1 </path1>
<path2>http://www.domain.com/servlet2</path2>
</paths>
In my app, I have a dataset that loads dspaths.xml...
<dataset name="dspaths" src=""http://dspaths.xml">http://dspaths.xml"/>
Now I want to create two other datasets, that get their source from the
dspath dataset...
<dataset name="ds1" src="">
<method event="oninit">
this.setSrc(dspaths:/paths/path1/text());
</method>
</dataset>
<dataset name="ds2" src="">
<method event="oninit">
this.setSrc(dspaths:/paths/path2/text());
</method>
</dataset>
Obviously, the code above doesn't work. And I've tried everything I can
think of and I've hit a wall. Can anyone help?
-----Original Message-----
From: William Krick [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 29, 2006 5:20 PM
To: Laszlo-User
Subject: [Laszlo-user] setting dataset src from external file at startup
I need to be able to read URLs out of a configuration file and set my
datasets' "src" attributes when my laszlo app starts up. I can't seem to
figure out the syntax.
Anyone know how to go about doing this?
_______________________________________________
Laszlo-user mailing list
[email protected]
http://www.openlaszlo.org/mailman/listinfo/laszlo-user
_______________________________________________
Laszlo-user mailing list
[email protected]
http://www.openlaszlo.org/mailman/listinfo/laszlo-user
_______________________________________________ Laszlo-user mailing list [email protected] http://www.openlaszlo.org/mailman/listinfo/laszlo-user
