Skip to main content
A newer version of this page is available. .

PageFactory Class

Stores metadata for all wizard pages.

Declaration

class PageFactory

Remarks

The page factory stores metadata for all wizard pages by their IDs. A metadata object implements the IWizardPageMetadata interface. The StateManager uses its getState and setState methods to manipulate with a local page state.

You can use the page factory’s unregisterMetadata method to remove a specific page from the wizard.

Inheritance

Properties

metadata Property

Specifies the collection of metadata objects for wizard pages.

Declaration

metadata: {
    [key: string]: IWizardPageMetadata<IWizardPage>;
}

Property Value

Type Description
[key: string]: IWizardPageMetadata<IWizardPage>

The collection of metadata objects.

Methods

getMetadata(pageId) Method

Returns the specified page’s metadata.

Declaration

getMetadata(
    pageId: any
): IWizardPageMetadata<IWizardPage>

Parameters

Name Type Description
pageId any

The page ID.

Returns

Type Description
IWizardPageMetadata<IWizardPage>

The page metadata.

registerMetadata<T>(pageId, metadata) Method

Registers the specified page metadata.

Declaration

registerMetadata<T extends IWizardPage>(
    pageId: string,
    metadata: IWizardPageMetadata<T>
): void

Parameters

Name Type Description
pageId string

The page ID.

metadata IWizardPageMetadata<T>

The page metadata.

Type Parameters

Name Type Description
T IWizardPage

The page.

Remarks

Use this method to add a new page to the wizard.

reset Method

Resets the collection of metadata objects.

Declaration

reset(): void

unregisterMetadata(pageId) Method

Removes metadata for the specified page.

Declaration

unregisterMetadata(
    pageId: string
): void

Parameters

Name Type Description
pageId string

The page ID.

Remarks

Use this method to remove a specific page from the wizard.