Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

Index

Constructors

constructor

Properties

Protected _isDestroyed

_isDestroyed: boolean

app

currentFeature

currentFeature: Observable<Feature>

The current Feature this provider is providing details for

id

id: string

libraryId

libraryId: string

providerEnabled

providerEnabled: Observable<boolean>

Determines whether this provider can function currently or not. This is akin to the 'canExecute' function for commands.

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

createAttachedViews

  • This method creates attached and data bound views for each markup type (compactView and expandedView - if configured separately) specified in config Override this method if a provider needs to create more than one view (for e.g. DataLinks) for each markup type specified in config.

    Parameters

    • featureProviderConfig: FeatureProviderConfig

      The configuration for this feature provider

    • viewModeRegionConfig: FeatureProviderViewModeConfig
    • Optional onViewsCreated: function

      Optional. A callback function which, if specified, is triggered after the views have been created, with the views as arguments. Useful for asynchronous providers like Datalinks.

    • Optional customContext: any

      Optional. If provided, will be used as the context for the created views. Otherwise the FeatureProviderBase class will itself be used as the context/viewModel for the views

    Returns void

destroy

  • destroy(): void
  • Destroys the object completely

    Returns void

destroyBindings

  • destroyBindings(): void

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

handleCurrentFeatureChanged

  • handleCurrentFeatureChanged(feature: Feature): void
  • This is called when the current feature changes, so that we might update our displays. This will likely change when a new result is selected from one of the result views.

    Parameters

    • feature: Feature

      A Geocortex Feature that we are displaying.

    Returns void

initialize

  • initialize(config: any): void
  • Parameters

    • config: any

    Returns void

onDestroy

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

    Returns void

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

updateProviderState

  • updateProviderState(value: boolean): void
  • Convenience method to update the provider state only if the current feature is available and the state has changed.

    Parameters

    • value: boolean

      The current provider state. Provider will be set to enabled only if the current feature is available as well.

    Returns void