com.sabre.redapp.example.cf.webkit.webapp.services Sample
The com.sabre.redapp.example.cf.webkit.webapp.services sample demonstrates a WebKit based app that uses the emulator command intercept service and focus behavior. The sample includes the following files:
-
The
redapp.xml
file registers the EMU_COMMAND service with a command prefix of1FRA
. Theforce_focus
attribute is set tofalse
for both services. -
The
plugin.xml
file passes the${plugin_resources}
variable to display the browser URL fromindex.html
. -
index.html
gets the response object and modifies the command to1MUCKRK
. -
json2.js
is the JavaScript file.
Running the Sample
-
Eclipse, import the com.sabre.redapp.example.cf.webkit.webapp.services plug-in into your workspace and add it to your run configuration.
-
Launch Sabre Red 360 from your run configuration, and log in with your CERT Sabre ID.
-
Type any command that starts with 1FRA. The command is intercepted and changed to 1MUCKRK.
Note
|
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. |