Procedures
1. Access Edit > Tags > Objects and create a new tag according to table 1.
Name |
Type |
Retentive |
Domain |
Tela |
Text |
Properties |
Client |
Table 1 – Setting the tag to be created.
Note: If the "Retentive" or "Domain" options are not visible, right-click on the bar that contains the "Name" and "Type" fields and enable them.
2. Access Edit > Scripts > Expressions and create a new expression as shown in table 2.
Object |
Expression |
Execution |
Tag.Tela.Value |
Client.CurrentPage |
OnChange |
Table 2 – Setting the expression to be created.
3. Click the Compile... button and verify the confirmation in the BuildStatus field.
4. Access the Tasks tab and double-click ClientStartup. CodeBehind will open.
5. Replace the old code with the new one.
Old code:
// Log On
@Display.LogOn.Open();
New code:
// Log On
if(String.IsNullOrEmpty(@Tag.Tela.Value))
{
@Display.LogOn.Open();
}
@Client.OpenDisplay(@Tag.Tela.Value);
Results
To test if everything is correct, give the project startup and open a different display. Close the project and open it again. If the first screen that appeared was the last one closed, the procedure was successful. If not, repeat the step-by-step instructions in the Procedures section and try again.