Siebel Innovation Pack 2014: About Event Helper Class

The Event Helper Class uses the Event Helper Object to facilitate Event Binding in the Physical Renderer or Plug-in Wrapper. Event helper used to achieve uniformity across different devices, a single event binding will work for all devices.

To retrieve the event helper:

var evtHelper = this.Helper("EventHelper" );

Manage is the singular API exposed by the Event Helper Class for unified event binding for DOM elements across multiple platforms. Syntax  to use the EventHelper object to bind an event:

evtHelper.Manage( el, eventName, eventData, eventHandler );

For Example,

Here we will attach three handlers on to this element.

evHelper

.Manage(colorbox, "mouseenter", { ctx: this }, OnMouseEnter)

.Manage(colorbox, "mouseleave", { ctx: this }, OnMouseLeave)

.Manage(colorbox, "click", { ctx: this }, OnClick);

“Manage” is same as “delegate” event handler method of jQuery to attach events with different controls. The only difference is using event helper will translate events between devices. As in above example, click will be treated as touch in touch devices. Refer this for more details on jQuery event handler:

.delegate( selector, eventType, handler )

You can find all event translations here,

About Event Helper Mappings

Source:- Oracle Docs

[su_divider style=”dotted”]

@AskmeSiebel

Leave a Reply

Your email address will not be published. Required fields are marked *