Skip Navigation Sample

The sample demonstrates a JavaScript based web app that uses the emulator command intercept service and focus behavior. This sample includes the following files:

  • controls the life cycle of this plug-in.

  • The redapp.xml file registers the EMU_COMMAND service with a command starting from 1LON. The force_focus attribute is set to false.

  • The plugin.xml file passes the ${plugin_resources} variable to display the browser URL from index.html.

  • index.html gets the response object and modifies the command to 1MUCKRK.

  • json2.js is the JavaScript file.

Running the Sample

  1. In Eclipse, import the plug-in into your workspace  and add it to your run configuration.

  2. Launch Sabre Red 360 from your run configuration, and log in with your CERT Sabre ID.

  3. Type any command that starts with 1LON. The command is changed to 1MUCKRK. Note that the default setting for force_focus is false. If the web app is not open, it is automatically opened and gains focus. If the web app is open, focus remains in Sabre emulator.

  4. Click on the emulator tab to see the response to the substituted command.

You can set the force_focus values to true for the EMU_COMMAND service in redapp.xml before you run this sample. Focus moves to the view window when the view is already open.