AVEVA OMI Software Developer Kit
Best Pane Match Algorithm

When some or all of the optional parameters are not provided or are invalid, ShowContent follows a set of rules to determine in which pane the specified content should placed. In addition, the SearchScope parameter can be used to limit which screens will be searched for a pane.

  • If SearchScope is set to to Self, only the layout that made the ShowContent call is searched, even if the layout is nested (embedded) in another layout. If no matching pane is found, Content is loaded into the default pane of the source layout.
  • If SearchScope is set to SourceScreen, only the screen that made the ShowContent call is searched. If no matching pane is found, Content is loaded into the default pane of the SourceScreen. Nested layouts are not searched.
  • If SearchScope is set to PrimaryScreen, only the primary screen in the Screen Profile is searched. If no matching pane is found, Content is loaded into the default pane of the PrimaryScreen. Nested layouts are not searched.
  • If SearchScope is set to AllScreens, every screen contained in the Screen Profile can be searched. Searches progress as follows and stop at the first match:
    • SourceScreen
    • PrimaryScreen
    • Any additional screens are searched in alphabetical order.
    • If no matching pane is found, Content is loaded into the default pane of the SourceScreen.
  • If SearchScope and ScreenName are not specified and ShowContent is called from an embedded layout:
    • ShowContent searches locally for a matching pane within the embedded layout.
  • If SearchScope or ScreenName is specified and ShowContent is called from an embedded layout:
    • ShowContent searches for a pane globally and uses the SearchScope and/or ScreenName settings to determine which screens within the Screen Profile associated with the ViewApp will be searched.

Order of Precedence for Determining Content Placement

Content is the only required parameter. Three values are also checked according to the following order of precedence to determine placement of the content:

  1. PaneName: optional parameter
  2. ContentType: optional parameter
  3. Type of content: this is part of the Content definition and is not specified in the ShowContent call.

Search Steps (SearchScope not specified or set to AllScreens)

Scenario 1: PaneName

PaneName is specified

Assumes SearchScope not set or set to Self. Otherwise, search is confined to the named screen.

  • Search the source layout for PaneName.
  • If not found, search PrimaryScreen for PaneName.
  • If not found, search any additional screens in alphabetical order for PaneName.

The search stops as soon as a matching PaneName is found.

Scenario 2: ContentType

PaneName is not specified OR matching PaneName not found AND ContentType is specified

Assumes SearchScope not set or set to Self. Otherwise, search is confined to the named screen.
  1. Search the source layout for a pane that supports the ContentType.
  2. If not found, search PrimaryScreen for pane that supports the ContentType.
  3. If not found, search any additional screens in alphabetical order for a pane that supports the ContentType.
The search stops as soon as a pane that supports the ContentType is found.
Scenario 3: Type of content

PaneName is not specified OR matching PaneName not found AND ContentType not specified or not found

Assumes SearchScope not set or set to Self. Otherwise, search is confined to the named screen.
  1. Evaluate type of content for the specified Content.
  2. Search the source layout for a pane that supports the type of content.
  3. If not found, search PrimaryScreen for pane that supports the type of content.
  4. If not found, search any additional screens in alphabetical order for a pane that supports the type of content.

The search stops as soon as a pane that supports the type of content is found.

Scenario 4: No matching pane

No matches found from previous searches (scenarios 1 through 3)

When SearchScope is not set or set to Self:
  • If no match is found using PaneName, ContentType, or type of content, Content is loaded into the default pane of the source layout.
When SearchScope is set to SourceScreen:
  • Only the SourceScreen is searched and if no match is found, Content is loaded into the default pane of the SourceScreen.
When SearchScope is set to PrimaryScreen:
  • Only the PrimaryScreen is searched, and if no match is found, Content is loaded into the default pane of the PrimaryScreen.