Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • ViewManager

Index

Constructors

constructor

Properties

app

The {@link geocortex.framework.application.Application} that this view manager instance belongs to.

Methods

activateView

  • Activates the given view, if it is currently hosted in a region.

    Parameters

    Returns boolean

create

  • create(viewType: string, viewModelType: string, viewMarkup: string, regionName: string, libraryId: string): ViewBase
  • Convenience method to create and bind a view model and view. The view will be initially visible, and if a region name is supplied, the view will be activated in that region.

    Parameters

    • viewType: string

      Type name of the view instance to create. If null, ViewBase is used.

    • viewModelType: string

      Type name of the viewModel to use. The view will be attached to it.

    • viewMarkup: string

      Resource name of the markup file to use with the view.

    • regionName: string

      Optional region name to activate the view in.

    • libraryId: string

      The library that this view originates from. This is used primarily for internationalization purposes.

    Returns ViewBase

createView

  • Creates a view and hosts it in a region, if a region is specified.

    Parameters

    • viewConfig: ViewConfigInterface

      The {@link geocortex.framework.config.ViewConfigInterface} representing the view to be created.

    • Optional viewInstance: ViewBase

      View instance is already provided under async library mode.

    Returns ViewBase

deactivateView

  • deactivateView(view: ViewBase): boolean
  • Deactivates the given view.

    Parameters

    Returns boolean

destroyRegion

  • destroyRegion(region: any): void
  • Destroys a region, unbinding and destroying any views contained in it.

    Parameters

    • region: any

      The region to destroy.

    Returns void

destroyView

  • Destroys a view, wiping out its bindings and DOM substructure.

    Parameters

    Returns void

discoverRegions

  • discoverRegions(element: HTMLElement, view?: ViewBase): void
  • Discovers regions in a given DOM element by searching for a data-region-name attribute.

    Parameters

    • element: HTMLElement

      The DOM element to examine.

    • Optional view: ViewBase

      If passed, any regions discovered will belong to this view.

    Returns void

getExistingRegionByName

  • Gets a hosted region by name.

    Parameters

    • regionName: string

      The name of the region to fetch.

    Returns RegionAdapterBase

getRegionForViewId

  • Given a view ID, returns the region that the currently belongs to.

    Parameters

    • viewId: string

    Returns RegionAdapterBase

getViewById

  • Gets a view by id.

    Parameters

    • id: string

      The ID of the view to fetch.

    Returns ViewBase

getViews

  • Returns all of the currently known views in the application.

    Returns ViewBase[]

notifyDimensionsChanged

  • notifyDimensionsChanged(view: ViewBase): void
  • Notifies the system that the dimensions of a view have changed. This makes it possible for the containing region or some other construct to reposition the view based on the new dimensions. This method will raise the event ViewDimensionsChangedEvent, passing along the view and the region that its hosted in.

    Parameters

    • view: ViewBase

      The view that's been resized.

    Returns void

shutdown

  • shutdown(): void
  • Shuts this instance down, freeing all regions and views.

    Returns void

toggleView

  • Either activates or deactivates a view based on its isVisible flag.

    Parameters

    Returns void