FullscreenWizardPageFactory Class

Stores metadata for all wizard pages.

Declaration

class FullscreenWizardPageFactory extends Analytics.Wizard.PageFactory

Remarks

The page factory stores metadata for all wizard pages by their IDs. A metadata object implements the IFullscreenWizardPageMetadata 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.

  1. Handle the wizard's afterInitialize event.
  2. Use the event argument's wizard property to access the pageFactory object.
  3. Call this object's unregisterMetadata method and pass the corresponding FullscreenReportWizardPageId/FullscreenDataSourceWizardPageId enumeration value as the parameter. This removes the page's metadata from the factory and hides the page from the navigation panel.
  4. Use the event argument's wizard property to access the iterator object and override its getNextPageId method to remove the page from the navigation logic.

The following example demonstrates how to hide the Select Data Source page from the Report Wizard and enable users to create SQL data sources only.

<script type="text/javascript">
   function afterInit(args) {
       // Remove the "Select Data Source" page's metadata from the factory.
       args.wizard.pageFactory.unregisterMetadata(DevExpress.Reporting.Designer.Wizard.FullscreenReportWizardPageId.SelectDataSourcePage);
       // Override the navigation logic to skip the "Select Data Source" page.
       var defaultGetNextPageId = args.wizard.iterator.getNextPageId;
       args.wizard.iterator.getNextPageId = function (pageId) {
           if (pageId === DevExpress.Reporting.Designer.Wizard.FullscreenReportWizardPageId.SelectReportTypePage) {
               return DevExpress.Reporting.Designer.Wizard.FullscreenReportWizardPageId.SpecifySqlDataSourceSettingsPage;
           } else {
               return defaultGetNextPageId.apply(this, [pageId]);
           }
       }
   }

   function CustomizeWizard(s, e) {
       if (e.Type === "ReportWizard") {
           e.Wizard.events.addHandler("afterInitialize", afterInit)
       }
   }
</script>

<dx:ASPxReportDesigner ID="ASPxReportDesigner1" runat="server">
    <ClientSideEvents CustomizeWizard="CustomizeWizard" />
</dx:ASPxReportDesigner>

The resulting Report Wizard:

See the following topics for more information:

Inherited Members

Inheritance

PageFactory
FullscreenWizardPageFactory

Properties

metadata Property

Specifies the collection of metadata objects for wizard pages.

Declaration

metadata: {
    [key: string]: IFullscreenWizardPageMetadata<Analytics.Wizard.IWizardPage>;
}

Property Value

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

The collection of metadata objects.

Methods

getMetadata(key) Method

Returns the specified page's metadata.

Declaration

getMetadata(key: string): IFullscreenWizardPageMetadata<Analytics.Wizard.IWizardPage>

Parameters

Name Type Description
key string

The page ID.

Returns

Type Description
IFullscreenWizardPageMetadata<IWizardPage>

The page metadata.

registerMetadata<T>(pageId, metadata) Method

Registers the specified page metadata.

Declaration

registerMetadata<T extends Analytics.Wizard.IWizardPage>(pageId: string, metadata: IFullscreenWizardPageMetadata<T>): void

Parameters

Name Type Description
pageId string

The page ID.

metadata IFullscreenWizardPageMetadata<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.