Skip to main content Link Menu Expand (external link) Document Search Copy Copied

Tab View Event Hooks

Table of contents
  1. onTabAfterInit
    1. Trigger
    2. Parameter
    3. Parameter example
    4. Annotation

Tab view controls only the tab headers in every form view. The tab body is a container for the Attribute View.

onTabAfterInit

Trigger

This event will be triggered two times,

  • after object id in the URL is changed. At this point, only DisplayName, ObjectID and ObjectType of the displayed resource are available.
  • after attributes are loaded. At this point, all defined attributes of the displayed resource have been loaded.

This event hook can be used to conditionally show / hide tabs according the attribute values of the displayed resource.

Parameter

export class TabViewEvent {
  type: string;
  tabView?: any;
}

Parameter example

tabviewevent.png

Annotation

  • Using event.tabView.formName to determine which form (defined in UI under settings -> editing form) fired the event
  • event.tabView.currentResource is a instance of the displayed resource and contains all loaded attributes of the resource
  • Using event.tabView.hideTabs(string[]) to show / hide tabs. The tabs with its name defined in the string array parameter will be hidden. If the parameter is an empty array or null, all tabs are shown