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

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

Provider interface for returning instances of components' view deleters. Registers into ABCS with the Component Registration API.

Deleter is called when a view (or whole component) is to be removed from a page. ABCS gives you a chance to clean up any artifacts created by the view's creator or property inspector.

If your component created any artifacts that need to be cleaned up implement this interface and return an instance of Deleter in DeleterProvider.getDeleter.

When deleting a view ABCS iterates over registered providers and calls the first deleter returned from DeleterProvider.getDeleter.
That means your provider may be asked to return a deleter for an unrelated view in which case you are to return undefined and ABCS will continue searching for the proper view deleter.

  • 16.3.5

An example of a view deleter provider.

], function (
   ) {

   'use strict';

   var DeleterProvider = function () {

   DeleterProvider.prototype.getDeleter = function (view) {
       if (view.getType() === 'my-view-type' || view.getType() === 'my-other-view-type') {
           // return a deleter instance understanding and capable of
           // cleaning artefacts of views of type 'my-view-type' and 'my-other-view-type'
           return new Deleter();

   return new DeleterProvider();



getDeleter(view) → {components.dt/js/spi/deleters/Deleter|undefined}

stable API

Get the component's view deleter that is responsible for full removal of the view and parts of the model that need some cleanup.

Name Type Description
view pages.dt/js/api/View

view to be deleted.

  • 16.3.5

deleter instance for the given view or undefined if the component does not provide a deleter for the view.

components.dt/js/spi/deleters/Deleter | undefined