class ViewActivity

extends AppActivity implements UIRenderable

View activity base class. Represents an application activity with content that can be rendered when activated.

Note: Nothing is rendered if the placement property is undefined (default). Make sure this property is set to a UIRenderPlacement value before rendering, or use a specific view activity class such as PageViewActivity.

Note: Most activities either display a full page view (see PageViewActivity) or a dialog (see DialogViewActivity), so it is usually not necessary to use this base class.


(name?: string, path?: string): ViewActivity



The root component that makes up the content for this view, as a child component.



View placement mode, determines if and how view is rendered when activated.



Modal shade backdrop opacity behind content (0-1), if supported by placement mode.



True if clicking outside a modal component should close it, defaults to false.


(callback?: RenderCallback<Output<UIRenderable, any>>): void

Render the view for this activity and display it, if it is not currently visible.

This method is called automatically after the root view component is created and/or when an application render context is made available or emits a change event, and should not be called directly.


(): Promise<void>

Remove the view output that was rendered by ViewActivity.render, if any.

This method is called automatically after the root view component or render context is removed, and should not be called directly.


(firstFocused?: boolean): void

Request input focus on the last (or first) focused UI component, if any.



The UI component that was focused first, if any.



The UI component that was most recently focused, if any.


(View: UIRenderableConstructor, modalShadeClickToClose?: boolean, eventHandler?: (this: DialogViewActivity, e: ManagedEvent) => void): Promise<ViewActivity>

Create an instance of given view component, wrapped in a singleton dialog view activity, and adds it to the application to be displayed immediately.

  • View — A view component constructor.

  • modalShadeClickToClose — Set to true to allow the dialog to be closed by clicking outside of it.

  • eventHandler — A function that is invoked for all events that are emitted by the view; if no function is specified, the CloseModal event is handled by destroying the view activity instance.

Returns: A promise that resolves to the view activity instance after it has been activated.


(message: string | string[], title?: string, confirmButtonLabel?: string, cancelButtonLabel?: string): Promise<boolean>

Display a confirmation/alert dialog with given content. If the ‘cancel’ button label is not provided, the dialog will only contain a ‘confirm’ button. All strings are automatically translated to the current locale using the tt function.

  • message — The message to be displayed, or multiple message paragraphs (for arrays).

  • title — The dialog title, displayed at the top of the dialog (optional).

  • confirmButtonLabel — The label for the ‘confirm’ button.

  • cancelButtonLabel — The label for the ‘cancel’ button, if any.

Returns: A promise that resolves to true if the OK button was clicked, false otherwise.



Inherited from



Inherited from AppActivity.path.



Inherited from AppActivity.match.


(): AppActivity

Inherited from AppActivity.getParentActivity.


(): Application

Inherited from AppActivity.getApplication.


(match?: MatchedPath): Promise<void>

Inherited from AppActivity.activateAsync.


(): Promise<void>

Inherited from AppActivity.deactivateAsync.


(): Promise<void>

Inherited from AppActivity.destroyAsync.


(): boolean

Inherited from AppActivity.isActive.



Inherited from AppActivity.deactivated.



Inherited from AppComponent.renderContext.



Inherited from AppComponent.activationContext.

.isPresetComponent() protected

(): boolean

Inherited from Component.isPresetComponent.


[1]. (): Component
[2]. <TParent extends Component>(ParentClass: ComponentConstructor<TParent>): TParent

Inherited from Component.getParentComponent.


<TParent extends Component>(ParentClass?: ComponentConstructor<TParent>): TParent

Inherited from Component.getCompositeParent.


(name: string, inner?: ManagedEvent): void

Inherited from Component.propagateComponentEvent.



Inherited from ManagedObject.managedId.



Inherited from ManagedObject.managedState.

.getReferenceCount() protected

(): number

Inherited from ManagedObject.getReferenceCount.

.getManagedReferrers() protected

(): ManagedObject[]

Inherited from ManagedObject.getManagedReferrers.

.getManagedParent() protected

[1]. (): ManagedObject
[2]. <TParent extends ManagedObject>(ParentClass: ManagedObjectConstructor<TParent>): TParent

Inherited from ManagedObject.getManagedParent.


<TEvent extends ManagedEvent = ManagedEvent, TConstructorArgs extends any[] = any[]>(e: string | TEvent | (new (...args: TConstructorArgs) => TEvent), ...constructorArgs: TConstructorArgs): this

Inherited from ManagedObject.emit.

.propagateChildEvents() protected

[1]. (f?: (this: this, e: ManagedEvent, propertyName: string) => void | ManagedEvent | ManagedEvent[]): this
[2]. (...types: (ManagedEvent | (new (...args: any[]) => ManagedEvent))[]): this

Inherited from ManagedObject.propagateChildEvents.

.activateManagedAsync() protected

(): Promise<any>

Inherited from ManagedObject.activateManagedAsync.

.deactivateManagedAsync() protected

(): Promise<void>

Inherited from ManagedObject.deactivateManagedAsync.

.destroyManagedAsync() protected

(): Promise<void>

Inherited from ManagedObject.destroyManagedAsync.

.onManagedStateActivatingAsync() protected

(): Promise<void>

Inherited from ManagedObject.onManagedStateActivatingAsync.

.onManagedStateActiveAsync() protected

(): Promise<void>

Inherited from ManagedObject.onManagedStateActiveAsync.

.onManagedStateDeactivatingAsync() protected

(): Promise<void>

Inherited from ManagedObject.onManagedStateDeactivatingAsync.

.onManagedStateInactiveAsync() protected

(): Promise<void>

Inherited from ManagedObject.onManagedStateInactiveAsync.

.onManagedStateDestroyingAsync() protected

(): Promise<void>

Inherited from ManagedObject.onManagedStateDestroyingAsync.


extends AppActivity.Presets

View activity presets type, for use with Component.with.



View component constructor, to be instantiated and rendered when the activity is activated.



View placement mode.



Modal shade backdrop opacity behind content (0-1), if supported by placement mode.



True if clicking outside a modal component should close it, defaults to false.



Inherited from



Inherited from AppActivity.Presets.path.