[Laszlo-user] Getting a null datapointer... what is wrong ? The code is exactly like the docs...

Rodrigo Kerkhoff ovelha.lists at gmail.com
Tue Jun 3 05:29:55 PDT 2008


Hi folks...

I´m trying to add some datapointers in my app.
I always use datapointers but I get access to them using the
lzDataset.getPointer method... My dataset is located inside of a class.
The code is as follows:

My dataset.

<dataset name="dtsModel" />

My Pointer

<datapointer name="ptModel" xpath="local:classroot.dtsModel:/"
rerunxpath="true" />

In the init method of my class I call the method initModel... This method
create the XML nodes that are binding to the user interface...

<method name="initModel" ><![CDATA[
     var pt = this.ptModel;

     pt.addNode( 'tipo-contato' , '' , {codTipoContat:'', desTipoContat:'',
sigTipoContat:''} );

     Debug.write( this.ptModel.serialize() );
]]></method>

When I try to invocate a method in my datapointer, the debug screen prints
the message: INFO @forms/CRMParametrosTipoContato.lzx#19: serialize: p is
null in LzDatapointer  name: ptModel

What is happen ?
In the openlaszlo doc the code is simple like this, and it doesnt workin....

Thanks in advance.
Rodrigo Kerkhoff
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.openlaszlo.org/pipermail/laszlo-user/attachments/20080603/001c3f7b/attachment.html


More information about the Laszlo-user mailing list