General Interface is an open source project hosted by the Dojo Foundation

About Context-Sensitive Help

Context-sensitive help is a type of online help specific to a user interface topic or software feature. For example, context-sensitive help for a dialog would explain the options and settings of the dialog. The end user typically accesses context-sensitive help by clicking a button or pressing hot keys.

General Interface Framework, the General Interface runtime, provides a jsxhelpid property for implementation of context-sensitive help in your General Interface applications. The jsxhelpid property is a unique string identifier that can be set in the Properties Editor palette (Help ID) in General Interface Builder or set programmatically using the jsx3.app.Model.setHelpId() method.

When a help ID is specified for a component, the user can launch context-sensitive help by pressing hot keys, which are system- and locale-dependent. The application automatically listens for the key event and determines the closest ancestor of the object receiving the key event that has a help ID. If an ancestor exists, the key event is canceled and the application, which is the Server object, publishes an event of subject jsx3.app.Server.HELP.

Application code can register for the HELP event from the application's Server object and perform custom code appropriate for the application, such as launching an external web page or opening a custom-built General Interface help viewer.

Help Hot Keys

The hot keys that invoke the help system are system- and locale-dependent. Hot keys are externalized in the locale.xml properties bundle in the JSX/locale/ directory. The default hot keys in locale.xml are Alt+F1 for Windows and Command+/ for Mac.

Help APIs

The help APIs include the following:

  • jsx3.app.Model.getHelpId() returns the help ID of a component.
  • jsx3.app.Model.setHelpId() sets the help ID of a component.
  • jsx3.app.Server.HELP is the subject on an event that instances of this class publish when a context-help hot key is pressed in the context of a General Interface DOM node that has a help ID.
    The HELP event has the following properties:
    • subject jsx3.app.Server.HELP
    • target the serve
    • helpid the value of the jsxhelpid property
    • model the General Interface DOM node that receives the key event
  • jsx3.app.Server.invokeHelp(objJSX) invokes context-sensitive help as though the user had pressed the help hot key in the context of the DOM node.

For more information, see General Interface API Reference.

Contents

Searching General Interface Docs

Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.