www.webOShelp.net

Get the latest on:webOS Developers' RSS FeedwebOS Facebook page webOS Twitter Feed

Home Resources API Reference Mojo.Event.listTap

Mojo.Event.listTap

This event is dispatched to the widget element when there is a mojo-tap event on a list item. The app handler is responsible for sorting out which part of the list item was clicked if necessary, since that depends entirely on the template provided. It's useful to look at event.originalEvent.target. This is the target of the original click or change event that caused the higher level mojo event to be dispatched. It will be an input element containing the new value for a change event, or the item's sub-element that was actually clicked for a click event. For example:

    listClickHandler: function(event) {
// Only respond to clicks on the label element, not the editable text field.
if(event.originalEvent.target.tagName == "LABEL")
Mojo.Log.info(event.object.data +": "+event.object.definition);
}

Custom Event Fields

  • item: The object from the listItems array in the model associated with the clicked list item.
  • model: The model object used to render the SmallList.
  • originalEvent: The original click Event object which caused this event to be dispatched. Useful for disambiguating clicks if the list items contain multiple clickable elements.

Supported Widgets

  • Mojo.Widget.List
 

0 Comments

    Add Comment


      • >:o
      • :-[
      • :'(
      • :-(
      • :-D
      • :-*
      • :-)
      • :P
      • :\
      • 8-)
      • ;-)