Options
All
  • Public
  • Public/Protected
  • All
Menu

The MultiRegionView is intended to host a simple view containing various user configured regions. The regions are MultiDivRegionAdapters by default but can be configured as any type. If a region of type MultiDivRegionAdapter detects more than a single view hosted in it, it will automatically insert a view switcher so users can switch between views - unless configured otherwise.

Hierarchy

Index

Constructors

constructor

Properties

Protected _isDestroyed

_isDestroyed: boolean

app

autoInsertViewSwitcher

autoInsertViewSwitcher: boolean

A boolean indicating whether or not to automatically insert a view switcher to supported regions hosted by this MultiRegionViewModel. Defaults to false.

id

id: string

libraryId

libraryId: string

regionDescriptors

A collection of region descriptors for all regions created by this MultiRegionViewModel

regionViewSwitcherLibraryId

regionViewSwitcherLibraryId: string

The libraryId to be used to construct the RegionViewSwitcherWidget for supported regions. Defaults to Framework.UI

regionViewSwitcherWidgetMarkup

regionViewSwitcherWidgetMarkup: string

The markup resource to be used to construct the RegionViewSwitcherWidget for supported regions. Defaults to Framework.UI/geocortex/framework/ui/ViewSwitcher/ViewSwitcherView.html

regionViewSwitcherWidgetType

regionViewSwitcherWidgetType: string

The markup type to be used for the RegionViewSwitcherWidget for supported regions. Defaults to geocortex.framework.ui.ViewSwitcher.ViewSwitcherView

supportedViewSwitcherRegionAdapters

supportedViewSwitcherRegionAdapters: string[]

An array containing the types of supported region adapters to which we can attach a view switcher

Methods

auto

  • auto(arg0: any, arg1: any, arg2: any): void
  • Binds a handler to an Observable or to a dojo.connect. Binding to an Observable:

    ``` this.auto(someObservable, function (newValue) { });

    with explicit scope:

    this.auto(someObservable, this, function (newValue) { });

    Alternately, pass an event name as a string to use dojo.connect:

    this.auto(window, "onclick", function () { }); ```

    Parameters

    • arg0: any

      Either an Observable (for observable bindings) or a regular object (if arg1 is a string)

    • arg1: any

      If arg0 is an Observable, a function or scope object. Otherwise, an event name (to use with dojo.connect).

    • arg2: any

      If arg0 is an Observable, a function handler.

    Returns void

Protected createDescriptorForRegion

  • createDescriptorForRegion(regionName: string, regionType: string, regionCss?: string): RegionDescriptor
  • Creates and returns a descriptor for a given region. Override this method to return a custom region descriptor

    Parameters

    • regionName: string

      A string denoting the name of the region for which this descriptor is being created

    • regionType: string

      A string denoting the type of the region for which this descriptor is being created

    • Optional regionCss: string

      An optional string which defines any custom css to be applied to the new region

    Returns RegionDescriptor

    A descriptor for newly constructed region

Protected createViewSwitcherViewModel

  • Creates and returns a view model for a view switcher for this region. Override this method to return a custom view switcher.

    Parameters

    • targetRegion: string

      The region whose views the created view switcher view model should target.

    Returns ViewSwitcherViewModel

    An initialized ViewSwitcherViewModel.

destroy

  • destroy(): void
  • Destroys the object completely

    Returns void

destroyBindings

  • destroyBindings(): void

getRegionDescriptorByRegionName

  • Parameters

    • regionName: string

    Returns RegionDescriptor

getResource

  • getResource(resourceKey: string, locale?: string): string
  • Gets a language resource from the Application's resource dictionary, given a key, and optional locale. Returns null if the resource does not exist.

    Parameters

    • resourceKey: string
    • Optional locale: string

      The locale of the resource to fetch. Defaults to the current application locale.

    Returns string

initialize

  • initialize(config: object): void
  • Initializes the MultiRegionViewModel.

    Parameters

    • config: object

      A configuration object containing an array of region definitions. Each definition will contain a regionName, optional regionType and optional regionCss. An optional property - autoInsertViewSwitcher - can be set to false to disable automatic insertion of view switchers into regions.

      • autoInsertViewSwitcher: boolean
      • regions: object[]

    Returns void

onDestroy

  • onDestroy(): void
  • Override or attach to provide custom clean-up behaviour.

    Returns void

Protected processRegion

  • Process each region created by the MultiRegionViewModel. May be overridden to provide custom behaviour.

    Parameters

    • rd: RegionDescriptor

      The region descriptor describing the newly created region

    Returns void

supportsViewSwitcher

  • Returns true if a specified region supports a view switcher

    Parameters

    Returns boolean

    Returns true if the region supports a view switcher, false otherwise.

trackCommandHandler

  • trackCommandHandler(command: any, token: any): void
  • Tracks a subscription to an {@link geocortex.framework.commands.Command}, disposing it when this object is disposed with the destroy method.

    Parameters

    • command: any
    • token: any

    Returns void

trackSubscription

  • trackSubscription(event: any, token: any): void
  • Tracks a subscription to an {@link geocortex.framework.events.Event}, disposing it when this object is disposed with the destroy method.

    Parameters

    • event: any
    • token: any

    Returns void