LogoLogo
Enterprise GuideCommunity Edition GuideDeveloper Guide
  • Using The Polarity Developer Guide
  • Quick Start
    • What's New
    • Installing Integrations
    • Quick Start Guide
    • Learning Resources
  • Building an Integration
    • Directory Layout
    • package.json
    • Configuration File
    • Integration Main Module
      • startup
      • doLookup
        • Entity Objects
        • Result Objects
        • Error Objects
      • onDetails
      • onMessage
      • validateOptions
    • Customizing the Overlay Window
      • Templates
        • Conditionals
        • Displaying a List of Items
        • Display Object Properties
        • Built-in Helpers
        • Displaying Icons
      • Component File
        • Aliased Properties
        • Computed Properties
        • Event Hooks
      • CSS Styles
    • Vendor Javascript
      • Inserting Javascript into DOM
    • README Guide
    • Debugging Integrations
      • Web Inspector
      • Using Integration Logs
      • Testing Main Module
  • Recipes
    • Enabling User Actions
    • Throttling Lookups
    • Using Custom Entity Types
    • Custom Summary Tags
    • Creating a Tabbed Interface
    • Accessing Username of Requestor
Powered by GitBook
On this page
  • onDetailsOpened
  • onDetailsClosed
  • onDetailsComplete
  • onDetailsError
  1. Building an Integration
  2. Customizing the Overlay Window
  3. Component File

Event Hooks

Integration relation event hooks

You can implement various event hooks from within your component file to respond to certain events that take place during the lifecycle of your integration.

onDetailsOpened

This hook fires after the details block has opened and the DOM for the details block has finished loading. This hook will fire multiple times if the user opens and closes the details block.

components/component.js
polarity.export = PolarityComponent.extend({
   onDetailsOpened: function(){
      // executed after the user has expanded the details block and the
      // DOM is fully loaded. 
   }         
});

onDetailsClosed

This hook fires after the details block is closed by the user. This hook can fire multiple times if the user opens and closes the details hook.

components/component.js
polarity.export = PolarityComponent.extend({
   onDetailsClosed: function(){
      // executed after the user has closed the details block
   }         
});

onDetailsComplete

This hook fires when the details block has fully loaded its data including and data that might be fetched from the onDetails hook on the server. Unlike the onDetailsOpened hook, the onDetailsComplete hook will only fire once after the details data is loaded.

components/component.js
polarity.export = PolarityComponent.extend({
   onDetailsComplete: function(){
      // executed after the details block has fully loaded its data including
      // data fetched by a server side `onDetails` implementation.
   }         
});

onDetailsError

This hook fires if there was an error loading the details (i.e., the onDetails hook on the server returned an error).

components/component.js
polarity.export = PolarityComponent.extend({
   onDetailsError: function(error){
      // executed if the `onDetails` 
   }         
});
PreviousComputed PropertiesNextCSS Styles

Last updated 4 years ago