ASNA WingsRPG™ Reference Manual

5250 Terminal Menus

Menu Bar

The Menu bar is the banner that appears at the top to the ASNA 5250 Terminal Emulator with a distinctive background color. These menu options may be executed by pointing with the mouse and clicking the label.

The Menu bar may be collapsed by clicking on the small triangle at the top-left corner of the Terminal Emulator canvas. The "collapsed" state will remain as a browser local storage value.

The Menu bar height is proportional to the height of a Terminal row. The font adjusts its size as the size of the Terminal changes.

The Menu options are determined by the JavaScript in the ~/Themes/Current/Asna5250Terminal.aspx page, right before the call to WingsTerminal.renderDisplay_init. The following is the default setup.

<asp:Content ID="Content1" runat="server" ContentPlaceHolderID="PageScriptPH">
  <script type="text/javascript">
     WingsTerminal.addMenuBarMacro(['Hex', 'HEX']);
     WingsTerminal.addMenuBarMacro(['Clear', 'CLEAR']);
     WingsTerminal.addMenuBarMacro(['Erase', 'ERASE']);
     WingsTerminal.addMenuBarMacro(['Attn', 'ATTN']);
     WingsTerminal.addMenuBarMacro(['Help', 'HELP']);


Where each macro executes the corresponding action shown in the Keyboard Mapping topic. Any macro can be used to display Menu options on the Menu bar according to the rules described in Keyboard Macros.

Any of the labels shown as the first parameter in the WingsTerminal.addMenuBarMacro may be localized in any language.

Terminal Emulator Mobile Support

The Terminal Emulator supports iOS and Android mobile devices with an additional set of "IBM keys" that appear at the top of the touch screen when Wings detects that the page is being veiwed by a mobile device. These keys allow users access to Aid keys that normally require a full IBM keyboard. They are sized to comfortably fit a large number of keys on the screen, with a slightly smaller font and less bordering space than most default buttons.

Master Page Function Key Menu

The MasterPage.master provides a place holder with ID 'FKeyPH' for active function keys to be displayed on each Wings page. This area can be customized to provide complete integration into your application. The default area is used by the 5250 Terminal Emulator to access functionality that pertains to the use of the ASNA 5250 Terminal emulation. The three default functions are as follows.

    There are three "Color schema" setting pages provided in the ASNA Wings projects under folder Monarch/5250ColorSchemas. The files are Earth.htm, Wind.htm, and Fire.htm. Selection of this option will redirect the browser to that folder and show a list of these files so you can select one. The JavaScript in the file is executed setting the color values before being redirected back to the ASNA 5250 Terminal emulator page. To add an enhanced user interface see Changing Default Color Schemas.
    This option redirects the browser to a page that provides information on the use of the ASNA 5250 Terminal keyboard showing the action assignments.
  • EXIT
    This option redirects the browser to the 'End of Job' page. This page code-behind includes a call to abandon the browser session, which effectively terminates the application and the associated job on the IBM i.

Each of the function key area menu options is an HTML input element of type 'button', that has a click event assigned to execute a macro. The following shows the default settings in ~/Themes/Current/Asna5250Terminal.aspx.

 <asp:Content ID="FileContent1" runat="server" ContentPlaceHolderID="FKeyPH">

   <input class="DdsKey" id="ChgColors" onclick="WingsTerminal.executeMacro(['Change Colors', 'REDIRECT:../../Monarch/5250ColorSchemas']);" 
         type="button" value="Change Colors" />
   <input class="DdsKey" id="TermHelp"  onclick="WingsTerminal.executeMacro(['Terminal Help', 'REDIRECT:Asna5250TerminalHelp.htm']);" 
         type="button" value="Terminal Help" />
   <input class="DdsKey" id="Exit"      onclick="WingsTerminal.executeMacro(['Exit', 'REDIRECT:../../Monarch/!EOj.aspx']);" 
         type="button" value="Exit" />



  1. The menu option label will appear in ALL UPPERCASE with a red font and a link-like hover affect. These styles are defined in the DdsKey CSS Class elements in the ~/Themes/Current/Theme.css file.
  2. When configuring macros to be associated with Menu options, if the "REDIRECT:Page" action is used, make sure the destination Page has a way to redirect back to the ~/Themes/Current/Asna5250Terminal.aspx page.

Special Note:

The references to the directory location of Asna5250Terminal.aspx in the above information specify ~/Themes/Current/ as the location used. Refer to Setting the location of the Asna5250Terminal.aspx page for more information.

See Also

5250 Terminal Branding
Keyboard Mapping
Keyboard Macros