JavaScript Extension Development API for Oracle Visual Builder Cloud Service - Classic Applications

Class: components.dt/js/spi/registration/PaletteRegistrationProvider

Provider interface returning component's palette registration configuration. Registers into ABCS with the Component Registration API.

Palette registration configuration describes the way the component is represented in ABCS Component palette and initially dropped into ABCS designer. Use this when you want to give users a chance to drop your components from the palette into ABCS designer. Implement PaletteRegistrationProvider.getPaletteItemConfig and return an object literal described by PaletteItemConfig.

You do not have to register a PaletteRegistrationProvider in which case users will not be able to instantiate your components in the UI. That may be useful for helper components that make sense only as part of a larger component that may instantiate them through the Creator API when dropped from the Component palette itself and incorporate your hidden component into its view hierarchy.

Version:
  • 16.3.5
Source:
See:
Example

An example of a component palette registration provider.

define([
], function (
   ) {

   'use strict';

   var PaletteRegistrationProvider = function () {
   };

   PaletteRegistrationProvider.prototype.getPaletteItemConfig = function () {
       return {
           // registers your component into the 'Custom' category
           categoryName: 'Custom',
           // instructs ABCS designer that the component will occupy
           // 6 columns by default when dropped into a page
           defaultWidth: 6
       };
   }

   return new PaletteRegistrationProvider();

});

Object Literals

components.dt/js/spi/registration/PaletteRegistrationProvider.PaletteItemConfig

Methods

getPaletteItemConfig() → {components.dt/js/spi/registration/PaletteRegistrationProvider.PaletteItemConfig}

stable API

Get the configuration of a new palette item representing the component in the Component palette.

Version:
  • 16.3.5
Source:
Returns:
Type
components.dt/js/spi/registration/PaletteRegistrationProvider.PaletteItemConfig