WebRADDocumentationExplore WebRAD ↗
WEBRAD / TECHNICAL REFERENCE

Page

Page, browser tab title, navigation, and lifecycle events.

WebPageContainersVisual8 events

Quick start

The current page is this. Use the example in a page method.

Page1 · event
// OnCreate body.
this.browserTitle = 'Customers';
// In OnShow, load the data needed each time the page is shown.
// To navigate: Navigate('PageCustomers');
// To close and remove the instance: this.close({ remove: true });
  • OnCreate: instance initialization. OnShow: update on each display. OnHide: leaving the page. OnResize: size change.
  • Configure Browser title in the Inspector. Required index and 404 pages use /index and /404; other pages use their lowercase name as the automatic path.
  • Use Navigate('PageName') to navigate and close({ remove: true }) to dispose of the instance.
  • Configure typed destination parameters in Navigation → Parameters → Configure Parameters. Read them through params or this.params; OnParametersChanged handles changes on the current page.
  • OnLogin, OnLogout, and OnUnauthenticated depend on RestGO integration. Use OnUnauthenticated to redirect protected pages; a network failure does not confirm logout.

Inspector properties

Component options and defaults. Fields without runtime access are configured in the Inspector.

Property / sourceType and optionsDefaultRuntime access
nameName · Identitystring—name
xLeft · Size & positionnumber0x
yTop · Size & positionnumber0y
widthWidth · Size & positionnumber800width
heightHeight · Size & positionnumber600height
itemWidthResponsive width · Responsive sizeFit content grows the item to its widest rendered child and preserves child intrinsic widths; minimum and maximum width remain limits.enumfixed stretch fit-content"fixed"Inspector / configuration
itemHeightResponsive height · Responsive sizeFit content grows the item to its lowest rendered child and preserves child intrinsic heights; minimum and maximum height remain limits.enumfixed stretch fit-content"fixed"Inspector / configuration
itemMinWidthMinimum width · Responsive sizenumber0Inspector / configuration
itemMaxWidthMaximum width · Responsive sizenumbernullInspector / configuration
itemMinHeightMinimum height · Responsive sizenumber0Inspector / configuration
itemMaxHeightMaximum height · Responsive sizenumbernullInspector / configuration
itemGrowGrow · Responsive sizenumber0Inspector / configuration
itemShrinkShrink · Responsive sizeAllows fixed and stretch flow items to yield space. Fit-content keeps its intrinsic size so its children are not compressed.booleantrueInspector / configuration
itemAlignSelfItem alignment · Responsive sizeCross-axis alignment for this item in a row or column. Auto inherits the parent alignment; responsive cross-axis stretch retains its sizing behavior.enumauto start center end stretch"auto"Inspector / configuration
itemHorizontalAnchorHorizontal anchor · Anchors & offsetsenumstart center end stretch"start"Inspector / configuration
itemVerticalAnchorVertical anchor · Anchors & offsetsenumstart center end stretch"start"Inspector / configuration
itemLeftLeft inset · Anchors & offsetsnumber0Inspector / configuration
itemRightRight inset · Anchors & offsetsnumber0Inspector / configuration
itemTopTop inset · Anchors & offsetsnumber0Inspector / configuration
itemBottomBottom inset · Anchors & offsetsnumber0Inspector / configuration
marginMargin · SpacingOuter spacing on all four sides, in pixels. Row and column layouts include this spacing between components.number0margin
marginTopMargin top · SpacingOuter spacing on this side, in pixels. Overrides the shared Margin value.number0Derived from saved propertiesmarginTop
marginRightMargin right · SpacingOuter spacing on this side, in pixels. Overrides the shared Margin value.number0Derived from saved propertiesmarginRight
marginBottomMargin bottom · SpacingOuter spacing on this side, in pixels. Overrides the shared Margin value.number0Derived from saved propertiesmarginBottom
marginLeftMargin left · SpacingOuter spacing on this side, in pixels. Overrides the shared Margin value.number0Derived from saved propertiesmarginLeft
visibleVisible · Behaviorbooleantruevisible
collapseWhenHiddenCollapse when hidden · BehaviorRemoves the component from the layout while it is not visible.booleantruecollapseWhenHidden
enabledEnabled · Behaviorbooleantrueenabled
containerModeContainer layout · Children layoutenumfixed align-to-parent row column"fixed"Inspector / configuration
containerPaddingTopPadding top · Children layoutnumber0Inspector / configuration
containerPaddingRightPadding right · Children layoutnumber0Inspector / configuration
containerPaddingBottomPadding bottom · Children layoutnumber0Inspector / configuration
containerPaddingLeftPadding left · Children layoutnumber0Inspector / configuration
containerGapGap · Children layoutnumber0Inspector / configuration
containerWrapWrap · Children layoutbooleanfalseInspector / configuration
containerJustifyContentJustify content · Children layoutenumstart center end space-between space-around"start"Inspector / configuration
containerAlignItemsDefault alignment · Children layoutDefault cross-axis alignment for children. Each child can override it with Item alignment.enumstart center end stretch"start"Inspector / configuration
captionCaption · Appearancestring"Page"caption
browserTitleBrowser title · IdentityTitle shown in the browser tab. Leave blank to use the application name.string""browserTitle
parametersParameters · NavigationDeclare typed inputs received when navigating to this page.page-parametersEditor: page-parameters[]Inspector / configuration
backgroundColorBackground Color · Appearancecolor"#ffffff"backgroundColor
currentRowBindingsCurrent row · DataBind writable visual values to fields of this repeated row.current-row-bindingsEditor: current-row-bindings[]currentRowBindings

API in code

MemberSignatureAccess
browserTitleBrowser tab title; blank values retain the application's original title.browserTitle: string;Read and write
routePathreadonly routePath: string;Read-only
paramsreadonly params: Readonly<Parameters>;Read-only
layoutModelayoutMode: WebPageLayoutMode;Read and write

show

method
show(): void;
Example
this.show
this.show();

close

method
close(options?: ClosePageOptions): void;
Example
this.close
this.close({ remove: true });
Inherited members (41)
MemberSignatureAccess
aspectRatioaspectRatio: WebAspectRatio;Read and write
floatingAlignmentfloatingAlignment: WebPanelFloatingAlignment;Read and write
placementplacement: 'in-flow' | 'floating';Read and write
floatingHorizontalAnchorfloatingHorizontalAnchor: 'left' | 'center' | 'right';Read and write
floatingVerticalAnchorfloatingVerticalAnchor: 'top' | 'center' | 'bottom';Read and write
floatingZIndexfloatingZIndex: number;Read and write
captioncaption: string;Read and write
progressEnabledprogressEnabled: boolean;Read and write
progressValueprogressValue: number;Read and write
progressVisiblereadonly progressVisible: boolean;Read-only
backgroundImagebackgroundImage: string;Read and write
backgroundSizebackgroundSize: WebPanelBackgroundSize;Read and write
backgroundPositionbackgroundPosition: WebPanelBackgroundPosition;Read and write
backgroundRepeatbackgroundRepeat: WebPanelBackgroundRepeat;Read and write
currentRowBindingscurrentRowBindings: readonly WebCurrentRowBinding[];Read and write
elementreadonly element: TElement;Read-only
idreadonly id: string;Read-only
namereadonly name: string;Read-only
visiblevisible: boolean;Read and write
collapseWhenHiddencollapseWhenHidden: boolean;Read and write
enabledenabled: boolean;Read and write
xx: number;Read and write
yy: number;Read and write
widthwidth: number;Read and write
heightheight: number;Read and write
marginOuter spacing on all four sides, in pixels.margin: number;Read and write
marginTopmarginTop: number;Read and write
marginRightmarginRight: number;Read and write
marginBottommarginBottom: number;Read and write
marginLeftmarginLeft: number;Read and write
alignSelfalignSelf: RuntimeLayoutAlignSelf;Read and write
tabIndextabIndex: number;Read and write
backgroundColorbackgroundColor: string;Read and write
colorcolor: string;Read and write
borderColorborderColor: string;Read and write

requireComponentElement

method
requireComponentElement(componentId: string): HTMLElement;

dispose

method
dispose(): void;

focus

method
focus(options?: FocusOptions): void;

hide

method
hide(): void;

bindEvent

method
bindEvent(eventName: string, handler: WebComponentEventHandler<this> | null): () => void;

emit

method
emit(eventName: string, detail?: unknown): boolean;

Events

Link methods in Interaction. How to use events.

OnCreate

Standard event (Event).

Signature and example
Interaction → OnCreate
import type { WebPage } from '@webrad/runtime';
// Copy this method into the page class and link it in Interaction.
class Example {
  public async PageMainCreate(
    sender: WebPage,
    event: Event,
  ): Promise<void> {
    console.log(sender.name, event.type);
  }
}

OnShow

Standard event (Event).

Signature and example
Interaction → OnShow
import type { WebPage } from '@webrad/runtime';
// Copy this method into the page class and link it in Interaction.
class Example {
  public async PageMainShow(
    sender: WebPage,
    event: Event,
  ): Promise<void> {
    console.log(sender.name, event.type);
  }
}

OnParametersChanged

PageParametersChangedEventDetail in event.detail · previous

Signature and example
Interaction → OnParametersChanged
import type { WebPage, PageParametersChangedEventDetail } from '@webrad/runtime';
// Copy this method into the page class and link it in Interaction.
class Example {
  public async PageMainParametersChanged(
    sender: WebPage,
    event: CustomEvent<PageParametersChangedEventDetail>,
  ): Promise<void> {
    console.log(event.detail);
    const { previous } = event.detail;
    console.log(previous);
  }
}

OnHide

Standard event (Event).

Signature and example
Interaction → OnHide
import type { WebPage } from '@webrad/runtime';
// Copy this method into the page class and link it in Interaction.
class Example {
  public async PageMainHide(
    sender: WebPage,
    event: Event,
  ): Promise<void> {
    console.log(sender.name, event.type);
  }
}

OnResize

Standard event (Event).

Signature and example
Interaction → OnResize
import type { WebPage } from '@webrad/runtime';
// Copy this method into the page class and link it in Interaction.
class Example {
  public async PageMainResize(
    sender: WebPage,
    event: Event,
  ): Promise<void> {
    console.log(sender.name, event.type);
  }
}

OnLogin

WebPageLoginEventDetail in event.detail · user

Signature and example
Interaction → OnLogin
import type { WebPage, WebPageLoginEventDetail } from '@webrad/runtime';
// Copy this method into the page class and link it in Interaction.
class Example {
  public async PageMainLogin(
    sender: WebPage,
    event: CustomEvent<WebPageLoginEventDetail>,
  ): Promise<void> {
    console.log(event.detail);
    const { user } = event.detail;
    console.log(user);
  }
}

OnLogout

WebPageLogoutEventDetail in event.detail · user

Signature and example
Interaction → OnLogout
import type { WebPage, WebPageLogoutEventDetail } from '@webrad/runtime';
// Copy this method into the page class and link it in Interaction.
class Example {
  public async PageMainLogout(
    sender: WebPage,
    event: CustomEvent<WebPageLogoutEventDetail>,
  ): Promise<void> {
    console.log(event.detail);
    const { user } = event.detail;
    console.log(user);
  }
}

OnUnauthenticated

Standard event (Event).

Signature and example
Interaction → OnUnauthenticated
import type { WebPage } from '@webrad/runtime';
// Copy this method into the page class and link it in Interaction.
class Example {
  public async PageMainUnauthenticated(
    sender: WebPage,
    event: Event,
  ): Promise<void> {
    Navigate('PageLogin');
  }
}
WebRAD · Atentor · Read in Markdown
Source code: 6a562bda75a0 (with local changes) · November 7, 2026

Search documentation

Type to search APIs, components, and events.