Show/Hide Toolbars

Flynet Viewer Developer User Guide

Navigation: Advanced

Screen grouping

Scroll Prev Top Next More

 

A powerful feature of Flynet Viewer is that its definition files are able to group screens. When multiple screens share the same recognition information, it may be useful to share the recognition information amongst the group. For example, when a sign on fails, the screen may not actually change, but only an error message be displayed.

 

For example, in the Insure application, when an invalid login attempt is made the message "User Profile not recognized" appears on the screen, while the rest of the screen remains the same:

 

ScreenGroup ErrMsg

 

By modifying the Insure definition file to the following, it would be able to determine whether the sign on failed:

 

<ScreenGroup name="Start" virtual="no">

 <Recognize type="include" row="1" column="27" text="M U L T X T E R M"/>

 <Recognize type="include" row="10" column="3" text="SWITCHIT"/>

 <FieldMap name="default">

         <Field name="Username" row="22" column="23" length="8"/>

         <Field name="Password" row="22" column="53" length="8"/>

 </FieldMap>

 <Screen name="OK">

         <Comment>No error messages</Comment>

         <Recognize type="omit" row="24" column="3" text="User Profile"/>

 </Screen>

 <Screen name="Failed">

         <Comment>Failed signon</Comment>

         <Recognize type="include" row="24" column="3" text="User Profile"/>

 </Screen>

</ScreenGroup>

 

Using this new definition the Start screen could be recognised as "Start.OK" and "Start.Failed". Note the recognise element for the "OK" screen which omits the text "User Profile", and "Failed" screen which includes the text "User Profile". The hierarchical nature of the recognition means that it is possible to create multiple levels of recognition. If the ScreenGroup element's "virtual" attribute is set to yes, then its name will not be used in identification of it children screens.

 

Refer to the ScreenGroup and Screen reference in the Screen Definitions Reference for more information.

 

The following code demonstrates the use of the above definition for the screen group.

 

 

 

The code contains the following functions:

connect

disconnect

showGroups

 

The connect and disconnect are self-explanatory.

 

showGroups displays the first screen name ("Start.OK"), then forces a signon attempt that will fail. This results in the error message being displayed which means that the error message with the screen name "Start.Fail" will be displayed. It then progresses to the next screen, displaying a message.