[Laszlo-user] Data Grouping in OpenLaszlo

Jean-Michel Hiver jhiver at ykoz.net
Fri Oct 3 05:22:57 PDT 2008


OK... I was wondering if there was some primitives / libraries to get this
done since summing / averaging / grouping things up is a pretty common
operation : I guess your answer means no :)

Cheers
Jean-Michel.

2008/10/3, Marco Lettere <m.lettere at websynapsis.com>:
>
> I think this is surely possible using javascript and the
> dataset/datapath/datapointer/LzDataElement apis.
> M.
>
> Jean-Michel Hiver ha scritto:
>
> > Hello List,
> >
> > I've just started fiddling with OpenLaszlo yesterday, especially with
> > it's datasource HTTP post & get and data binding capabilities. It all
> > looks very nice indeed!
> >
> > I'm wondering if there was a way I could get the software to do some
> > data grouping...
> >
> > For example imagine you have:
> >
> > <gizmos>
> >   <item>
> >     <type>key ring</name>
> >     <name>beautiful key ring</name>
> >     <price>12</price>
> >   </item>
> >   <item>
> >     <type>key ring</name>
> >     <name>awesome key ring</name>
> >     <price>24</price>
> >   </item>
> >   <item>
> >     <type>key ring</name>
> >     <name>incredible key ring</name>
> >     <price>50</price>
> >   </item>
> >   <item>
> >     <type>usb key</name>
> >     <name>1 GB monkey usb key</name>
> >     <price>25</price>
> >   </item>
> > </gizmos>
> >
> > And you would like to group these values as follows:
> >
> > <gizmosByType>
> >   <group>
> >     <type>key ring</type>
> >     <totalPrice>86</totalPrice>
> >   </group>
> >   <group>
> >     <type>usb key</type>
> >     <totalPrice>25</totalPrice>
> >   </group>
> > </gizmosByType>
> >
> > Is there a way to do this on the client side rather than do the
> > grouping server side? If so, how? Pehaps using Javascript and
> > constructing a new data source only using Javascript? Is this possible?
> >
> > Thanks in advance for your help.
> >
> > Cheers,
> > Jean-Michel.
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.openlaszlo.org/pipermail/laszlo-user/attachments/20081003/8b554a7d/attachment.html


More information about the Laszlo-user mailing list