Dataset, datapath, datapointer in Laszlo

Dataset has two points:

-->it is the client store of xml data.

--> It is the mechanism by which OpenLaszlo make HTTP Get/Post Request.

--> lz.DataElement is subclasses of DataNode and DataText.

 

src attribute:

  should be a well-formed url that points to the back-end data source that will produce data. The URL may be a static xml or a server-side processor.

  -> if it is url, the data will be retrieved when an applicaton is ran.

  -> If it is a relative path, the data will be compiled into the dataset.

  -> If it is not present, the value of the dataset will be the content of the <dataset> element.

 

Set the source of dataset in HTTP:

<dataset name="myData" request="true" type="http" src="myXMLDoc.xml" />

 

Local datapath 
 --> datapath="local:reference.to.dataset.relative.to.parent:/path"
 
ondata/onerror/ontimeout: one of them will be sent out in the requesting.
datapaths are the extension of datapointer. A datapointer pionts to just one place of the dataset at a time, but can move around -- so you can have mulitple data pointers, each pointing to difference place in a dataset.
When we say that HTTP dataset is dynamic, we mean that you can repopulate them programmatically by calling doRequest() method of dataset object, or if the request  src attribute is set to true, by changing the URL of the dataset when one of setSrc(), setQueryString(), or setQueryParam() method is called.
The applyData() method is called on any node that is declared with a datapath that matches a terminal selector, such as text() or @attribute when the data it matches is changed. The argument passed to the method is the string the data represents. Use the ondata event if the node is bound to a datapath that matches a data node (see below). 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值