Yeah, it doesn't seem to work.

With this line...

<dataset name="ds1" src="$path{'ds_paths:/paths/ds1/text()'}" />

I get this error...

unknown protocol: $path{'ds_paths

... it seems like it should work on paper.  Any ideas?



-----Original Message-----
From: William Krick [mailto:[EMAIL PROTECTED]
Sent: Tuesday, July 25, 2006 9:38 AM
To: P T Withington
Cc: [email protected]
Subject: Re: [Laszlo-user] DataSet - type = http


It might work, however, I seem to remember triggering it on the datapath's
ondata event for a reason.

I think that with your code, ds1 could try to initialize its source before
ds_paths has finished loading.

I'll have to play with it and see if it works.


-----Original Message-----
From: P T Withington [mailto:[EMAIL PROTECTED]
Sent: Monday, July 24, 2006 6:04 PM
To: William Krick
Cc: Andrew Chandler; [email protected]
Subject: Re: [Laszlo-user] DataSet - type = http


Would this be even simpler (untested):

   <dataset name="ds1" src="$path{'ds_paths:/paths/ds1/text()'}" />

?

On 2006-07-24, at 17:30 EDT, William Krick wrote:

> I don't know if this will help your situation or not but this is
> the code
> that we use to load our dataset URLs from an external XML file.  We
> need to
> do this because we test our app locally as a proxied app, but
> deploy it as a
> SOLO app.  A solo app requires the URLs to be relative.  Having the
> URLs in
> an external file allows us to swap out the URLs by changing that
> file. No
> need to touch the code...
>
>
> This is the code in "canvas"...
>
> <dataset name="ds_paths" request="true" type="http" src="paths.xml" />
>
> <dataset name="ds1"/>
>
> <datapointer xpath="ds_paths:/paths/ds1">
>   <method event="ondata">
>     parent.ds1.setAttribute( 'src', this.getNodeText() );
>   </method>
> </datapointer>
>
> <dataset name="ds2"/>
>
> <datapointer xpath="ds_paths:/paths/ds2">
>   <method event="ondata">
>     parent.ds2.setAttribute( 'src', this.getNodeText() );
>   </method>
> </datapointer>
>
>
> <dataset name="ds3"/>
>
> <datapointer xpath="ds_paths:/paths/ds3">
>   <method event="ondata">
>     parent.ds3.setAttribute( 'src', this.getNodeText() );
>   </method>
> </datapointer>
>
>
>
> The contents of paths.xml looks something like this...
>
> <paths>
>    <ds1>http://www.domain.com/dsservlet/getds1</ds1>
>    <ds2>http://www.domain.com/dsservlet/getds2</ds2>
>    <ds3>http://www.domain.com/dsservlet/getds3</ds3>
> </paths>
>
>
>
>
> Hmm... looking at the datapointer code above, it could
> probably simplified a little too...
>
> <datapointer xpath="ds_paths:/paths/ds1"
>              ondata="parent.ds1.setAttribute('src',this.getNodeText
> ())" />
>
>
>
> ...
> Krick
>
>
>
>
>
> -----Original Message-----
> From: Andrew Chandler [mailto:[EMAIL PROTECTED]
> Sent: Monday, July 24, 2006 5:09 PM
> To: 'P T Withington'
> Cc: [email protected]
> Subject: Re: [Laszlo-user] DataSet - type = http
>
>
> Hmmm - ok I'm basically trying to think of the questions India will
> ask when
> they get this tonight (the team doing most of the work is there).
>
> I re-read the docs - and I think the way I understood it is correct
> but does
> not contradict what you said.
>
> Given:
>       <dataset
>               src="../work/runstatistics.xml"
>               id="dcrunstatdataset" name="dcrunstatdataset"
>               request="true">
>       </dataset>
>
>
>
> How can I restructure the src parameter to be a "url" without
> having the
> request information brought in?    For instance I can't code in the
> lzx
> Src="http://machineX:8085/visionaeldatacollector/work/
> runstatistics.xml"
>
> Because the port, machine, are both things that are different for each
> install.   I'm guessing the request object has to be used to get
> the url?
>
>
> -----Original Message-----
> From: P T Withington [mailto:[EMAIL PROTECTED]
> Sent: Monday, July 24, 2006 3:43 PM
> To: Andy Chandler
> Cc: [email protected]
> Subject: Re: [Laszlo-user] DataSet - type = http
>
> If you specify the url without a protocol, the app protocol will be
> merged
> in.
>
> On 2006-07-24, at 15:49 EDT, Andy Chandler wrote:
>
>> (sorry - sent with work account before)
>>
>> When using a webapp that can be deployed either as http or https
>> depending on the end users needs I've wondered if there isn't a
>> better
>> way for me to do the datasets.
>>
>> Most of our datasets that are file based are just relative referenced
>> so
>> they get compiled in when the page is compiled.   However there are
>> a couple
>> that are more dynamic or might not be present - in this case it seems
>> to work better (at least the page compiles) to use type=http or
>> type=https.
>> It would be nice if the dataset could just have an attribute like
>> type="request" and it would automatically use http or https depending
>> on how
>> the app is being accessed.    Has anyone seen something like that
>> that
>> already exists?
>>
>>
>> _______________________________________________
>> 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



_______________________________________________
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

Reply via email to