Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

StateManager Class

Processes the wizard’s global state and each page’s local state.

#Declaration

TypeScript
export class StateManager

#Remarks

A global state stores all the wizard settings required to create a report/data source. Each wizard page uses a specific subset of the global state (a page’s local state). The State Manager acts like a mediator between the global state and wizard pages. It processes the global state, extracts a local state for each page, and commits local changes to the global state.

In most cases, you do not need to explicitly use the State Manager object in your code.

#constructor(globalState, pageFactory)

Initializes the StateManager class with the specified settings.

#Declaration

TypeScript
constructor(
    globalState: any,
    pageFactory: DevExpress.Analytics.Wizard.PageFactory
)

#Parameters

Name Type Description
globalState any

The global state.

pageFactory PageFactory

The page factory.

#Methods

#getCurrentState Method

Returns the global state.

#Declaration

TypeScript
getCurrentState(): any

#Returns

Type Description
any

The global state.

#getPageState(pageId) Method

Returns the local state of the specified page.

#Declaration

TypeScript
getPageState(
    pageId: string
): any

#Parameters

Name Type Description
pageId string

The page ID.

#Returns

Type Description
any

The page’s local state.

#reset Method

Resets the global state.

#Declaration

TypeScript
reset(): void

#resetPageState(pageId) Method

Resets the local state of the specified page.

#Declaration

TypeScript
resetPageState(
    pageId: string
): void

#Parameters

Name Type Description
pageId string

The page ID.

#setPageState(pageId, data) Method

Sets the local state to the specified page.

#Declaration

TypeScript
setPageState(
    pageId: string,
    data: any
): void

#Parameters

Name Type Description
pageId string

The page ID.

data any

The page state.