Verint | Telligent Community
Verint | Telligent Community
  • Site
  • User
  • Site
  • Search
  • User
Verint Community 11.x
  • Verint Community
Verint Community 11.x
API Documentation messaging JavaScript API Module
  • User Documentation
  • Ask the Community
  • API Documentation
  • Manager Training
  • Developer Training
  • Tags
  • More
  • Cancel
  • New
  • API Documentation
  • +In-Process API Documentation
  • +Plugin API Documentation
  • +REST API Documentation
  • -Widget, Theme, and Automation APIs
    • +Automation Events
    • -Client-side APIs
      • +Client Messages
      • +Composer Plugins
      • -JavaScript API Modules
        • administrationToolbar JavaScript API Module
        • editableGroup JavaScript API Module
        • javaScript JavaScript API Module
        • language JavaScript API Module
        • media JavaScript API Module
        • messaging JavaScript API Module
        • navigationConfirmation JavaScript API Module
        • notifications JavaScript API Module
        • preview JavaScript API Module
        • regex JavaScript API Module
        • rest JavaScript API Module
        • shortcuts JavaScript API Module
        • systemNotifications JavaScript API Module
        • template JavaScript API Module
        • tourTips JavaScript API Module
        • ui JavaScript API Module
        • url JavaScript API Module
        • utilities JavaScript API Module
      • +jQuery Events
      • +jQuery Plugins
      • +UI Components
    • +Dynamic Configuration
    • +LESS Functions
    • +Script API Types
    • +Script APIs

messaging JavaScript API Module


jQuery.telligent.evolution.messaging

This module provides a simple, generic publish/subscribe message bus for client code to use to communicate within the current document, or across documents in separate windows or tabs. This enables easy cross-widget communication without relying on expectation of specifc DOM elements or events. Additionally, the platform uses messages for coordinating synchronization between separate UI components related to the same piece of content.

Methods

subscribe

Subscribes to a message, and returns a subscription handle.

var subscriptionId = $.telligent.evolution.messaging.subscribe(messageName, function(data) {
    // handle message
});

var subscriptionId = $.telligent.evolution.messaging.subscribe(messageName, namespace, function(data) {
    // handle message
});
  • messageName: message to subscribe to
  • namespace: optional namespace string or array of namespace strings to allow clearing one or many multiple handlers later without having subscription handles
  • handler: message handler

publish

Publishes a message. All current subscriptions will be called and passed the data.

// Publish a message
$.telligent.evolution.messaging.publish(messageName, data);
// Optionally publish a message that will received by handlers on other windows or tabs
$.telligent.evolution.messaging.publish(messageName, data, { crossWindow: true });

unsubscribe

Unsubcribes a specific message handler by subscription handle or one or multiple subscriptions by namespace

$.telligent.evolution.messaging.unsubscribe(subscriptionId);
$.telligent.evolution.messaging.unsubscribe(namespace);

suppress

Suppresses, but leaves bound, a specific message handler by subscription handle or one or multiple subscriptions by namespace

$.telligent.evolution.messaging.suppress(subscriptionId);
$.telligent.evolution.messaging.suppress(namespace);

unsuppress

Un-suppresses a specific message handler by subscription handle or one or multiple subscriptions by namespace

$.telligent.evolution.messaging.unsuppress(subscriptionId);
$.telligent.evolution.messaging.unsuppress(namespace);

Automatic Message Links

Anchors which define the attribute, data-messagename raise a message named according to the value of the attribute when clicked without the need for explicitly binding. Message links' binding is delegated to support links being added or modified dynamically.

// Register a message link on an anchor
<a href="#" data-messagename="action.occurred">My Link</a>

// handle the message
$.telligent.evolution.messaging.subscribe('action.occurred', function(data) {
    // handle the message
    // data.target is the link which raised the message
});

  • Share
  • History
  • More
  • Cancel
Related
Recommended
  • Telligent
  • Professional Services
  • Submit a Support Ticket
  • Become a Partner
  • Request a Demo
  • Contact Us

About
Privacy Policy
Terms of use
Copyright 2024 Verint, Inc.
Powered by Verint Community