[Laszlo-user] setting dataset src from external file at startup

Bryan Barkley bbarkley at gmail.com
Thu Mar 30 16:13:06 EST 2006


How about

ds1.setSrc(this.getPointer().xpathQuery('/paths/path1/text()');



On 3/30/06, William Krick <wkrick at eio-online.com> wrote:
>
> 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">
>   <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-----
> *From:* Bryan Barkley [mailto:bbarkley at gmail.com]
> *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
>
> 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)?
>
>
>
> On 3/30/06, William Krick <wkrick at eio-online.com> 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"/>
> >
> >
> > 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:wkrick at eio-online.com]
> > 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
> > Laszlo-user at openlaszlo.org
> > http://www.openlaszlo.org/mailman/listinfo/laszlo-user
> >
> >
> > _______________________________________________
> > Laszlo-user mailing list
> > Laszlo-user at openlaszlo.org
> > http://www.openlaszlo.org/mailman/listinfo/laszlo-user
> >
>
>
> _______________________________________________
> Laszlo-user mailing list
> Laszlo-user at openlaszlo.org
> http://www.openlaszlo.org/mailman/listinfo/laszlo-user
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.openlaszlo.org/pipermail/laszlo-user/attachments/20060330/b15367bf/attachment-0001.html


More information about the Laszlo-user mailing list