Ok, i found the created dataset need unique name. And it said the
created dataset has been located
at canvas, right?
If so, could i create a local dataset ?
mt1
mt1 wrote:
More question.
How to set the new creating LzDataset to another view in Class ?
The code1 works fine, but the code2 dose not work.
It said "couldn't find dataset for ds:/".
I think it is the cause of using class tag.
Something about localdataset i guess.
Any advice thanks.
mt1
===========[ code1 ]============
<canvas debug="true">
<method event="oninit">
var ds = new LzDataset( null, { name: 'ds',
src: 'sample.xml',
request: 'true' } );
Debug.write( ds );
this.l.tl.setDatapath( 'ds:/' );
</method>
<list name="l" width="180">
<textlistitem name="tl" datapath="" text="$path{'something'}"/>
</list>
</canvas>
===========[ code2 ]============
<canvas debug="true">
<class name="cc">
<method event="oninit">
var ds = new LzDataset( null, { name: 'ds',
src: 'sample.xml',
request: 'true' } );
Debug.write( ds );
this.l.tl.setDatapath( 'ds:/' );
</method>
<list name="l" width="180">
<textlistitem name="tl" datapath="" text="$path{'something'}"/>
</list>
</class>
<cc/>
</canvas>
mt1 wrote:
Oh it was good.
Thank you M.
Makis wrote:
mt1,
Your code does work. Try writing Debug.write( ds ) instead of
ds.serialize() and you' ll see that the dataset is properly created.
The problem is serialize, which generally doesn't show dynamically
modified data.
M.
mt1 wrote:
All,
This is a simple question.
In the following code, the creating dataset is ok, but it dose not
read the 'src' file. The serialize() show only '<ds/>'.
<canvas debug="true">
<method event="oninit">
var ds = new LzDataset( null, { name: 'ds',
src: 'sample.xml',
request: 'true' } );
Debug.write( ds.serialize() );
</method>
</canvas>
I am understanding, if the 'request' attribute set 'true', it can set
the data of the 'src' automatically.
Dose it wrong?
mt1
_______________________________________________
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