PDA

View Full Version : sample code to wire ontap event to a template list item?



profunctional
7 Jul 2010, 9:33 AM
I've got a list of items that is rendered onto a panel using the tpl. Is there any sample code to wire an ontap or onclick event to each row?

I'm just looking for a simple code snippet. t

Thanks.

TommyMaintz
7 Jul 2010, 10:58 AM
In general once you want a panel with template, and want selection of items etc, its best to use DataView or List. Both of these are in essence a Panel with a Template, but they implement store binding, item selection, special events etc.

profunctional
7 Jul 2010, 11:17 AM
I would like to do something like the kiva and geocongress samples, which seem to be extending the Panel. If I use the list, do you have a sample that binds the list using a ajax call vs the static data in the examples?