Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Overview

This document presents information about multiple display instances.

On this page:

Table of Contents
maxLevel3
stylenone


How to Use

This feature allows you to have multiple instances of the same display opened simultaneously.

The specs for the computer used for testing are listed below:

  • Product version 1.9.
  • TWebServices or any other WebServer (like IIS)

Besides allowing you to have the same popup display opened multiple times, they can also be customized using a list of user-defined parameters that are inputted on the method.

Creating a Popup

To create a popup that displays multiple lines in the system, assign each line a Tag using a custom Template datatype containing relevant details. Configure the popup to access and display the data for each line by referencing its associated Tag. This approach allows the system to present all line information within a single display, making monitoring and controlling each line from the popup interface easier.

To create a customizable popup, you need to follow a specific syntax when defining the elements/components expressions.

#<PropertyName>:<TagName>

This syntax will create an exposed label for the element property. This makes it easier to map any linked tags to it.

Expand
titleAdding Labels for Symbol by using TextBlock

This syntax can be used in all available components. It can also be retrieved in the CodeBehind Environment with the code below.

Code Block
var label = this.CurrentDisplay.GetLabel("<LabelName>");
// <LabelName> is an user-defined input parameter


Note

It is important to make sure that the display mode is configured as a popup.


Runtime Methods

The methods available for the NewPopup feature are listed below.

Display.<DisplayName>.NewPopup

This method is available for both .NET and HTML5displays only. Its syntax is described below:

Code Block
/// <summary>
/// Begin Open new popup method
/// It should be called on ServerStartup task only
/// </summary>
/// <param name="items">LabelList[label1=tag1;label2=tag2],
/// Left, Top, Width, Height</param>
/// <returns>Always an empty string</returns> @Display.<DisplayName>.NewPopup(object[] items);

The items array will contain the LabelName and its assigned runtime object (Tag), which will replace the placeholder configuration on the display.

It is also possible to use fixed parameters in the LabelList. In this example, we will have our title be dynamic but unrelated to any Tags.

An example of this method is:

Code Block
// Mapping for Tag.Line01 @Display.MyPopup.NewPopup("#Line=Line01;#Title='Title for Line01 Display'");
// Mapping for Tag.Line02 @Display.MyPopup.NewPopup("#Line=Line02;#Title='Title for Line02 Display'");

where [MyPopup] is the display name of this example.

To get the Title label from the LabelList and use it to modify the Display Title, the following code must be added to the DisplayOpening method:

Code Block
languagejs
public void DisplayOpening()
{
	this.CurrentDisplay.SetTitle( this.CurrentDisplay.GetLabel("#Title") );
}



Client.NewPopup

This method is available for both .NET and HTML5displays. Its syntax is described below:

Code Block
/// <summary>
/// Begin Open new popup method
/// It should be called on ServerStartup task only
/// </summary>
/// <param name="displayName">Display Name in Solution</param>
/// <param name="items">LabelList[label1=tag1;label2=tag2],
/// Left, Top, Width, Height</param>
/// <returns>Always an empty string</returns> @Client.NewPopup(string displayName, object[] items);

The items array will contain the LabelName and its assigned runtime object (Tag), which will replace the placeholder configuration on the display.

It is also possible to use fixed parameters in the LabelList. In this example, we will have our title be dynamic but unrelated to any Tags.

An example of this method is:

Code Block
// Mapping for Tag.Line03 @Client.NewPopup("MyPopup","#Line=Line03;#Title='Line 03 -- Title'");
// Mapping for Tag.Line04 @Client.NewPopup("MyPopup","#Line=Line04;#Title='Line 04 -- Title'");

where [MyPopup] is the display name of this example.


In the end, the Solution's behavior should be the same despite the method used.


In this section...

Page Tree
rootDisplay CodeBehind
spacesV10