[Laszlo-user] using ondata event within dataset tag
henry.minsky at gmail.com
Fri Mar 24 07:53:24 EST 2006
You can do that, but it's not really kosher as far as the compiler is
A more approved way in the current schema is to use "reference" and put the
method someplace else in your app.
You can basically put
<method reference="listNames" event="ondata">
on any view, or on the canvas.
You could make a proposal for allowing <method> on datasets that do not have
literal data in them. Another thing people have requested is for allowing
users to do subclassing of <dataset> in lzx.
On 3/24/06, graphis1 at mac.com <graphis1 at mac.com> wrote:
> Is it wrong to use the ondata event within a dataset? For example:
> <dataset name = "listNames" request = "true" type = "http" src = "/
> names/records/" />
> <dataset name = "addName" type = "http" src = "/names/create/">
> <method event = "ondata">
> listNames.doRequest(); // request new data from listNames
> to keep
> everything in sync
> When compiling this, I get a warning: "element "method" not allowed
> in this context. Check whether it is spelled correctly, and whether a
> class with this name exists." However, the code works exactly as
> expected - whenever I send new data via addName, listNames gets hit
> and sends a new list of the records. All data elements that are
> dependent on the listNames dataset are then automatically refreshed -
> this seems good to me.
> Can I safely ignore the warning, or am I going about syncing my data
> in the wrong way?
> Laszlo-user mailing list
> Laszlo-user at openlaszlo.org
hminsky at laszlosystems.com
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Laszlo-user