[Laszlo-user] Laszlo-user Digest, Vol 44, Issue 3

André Bargull a.bargull at intensis.de
Wed Jun 4 10:36:16 PDT 2008


I can't reproduce your issue with this small testcase, so may you 
provide a more detailed sample where it fails?

- André

> <canvas debug="true" >
>     
>     <class name="testcase" extends="node" >
>         <dataset id="baz" name="dtsModel" />
>         
>         <node>
>             <datapointer name="ptModel" 
> xpath="local:classroot.dtsModel:/" rerunxpath="true" />
>             
>             <handler name="oninit" >
>                 var pt = this.ptModel;
>                 pt.addNode('foo' , '' , {bar:'hello'});
>                 Debug.write(this.ptModel.serialize());
>             </handler>
>         </node>
>     </class>
>     
>     <testcase />
>     
> </canvas>


On 6/3/2008 9:00 PM, laszlo-user-request at openlaszlo.org wrote:
> 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


More information about the Laszlo-user mailing list