[Laszlo-user] using ondata event within dataset tag

Henry Minsky 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
concerned.

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">
...
</method>

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
>         </method>
>     </dataset>
>
> 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
> http://www.openlaszlo.org/mailman/listinfo/laszlo-user
>



--
Henry Minsky
Software Architect
hminsky at laszlosystems.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.openlaszlo.org/pipermail/laszlo-user/attachments/20060324/31b08e8c/attachment-0001.html


More information about the Laszlo-user mailing list