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

Basic Steps for Creating and Managing a Window

To create an external browser window:

  1. Instantiate the window with the createAppWindow() or loadAppWindow() methods.
  2. Open the window with the Window.open() method.
  3. Use the Window.constrainToScreen() method to be sure that a portion of the window is visible on the screen.

Other optional steps are:

  1. Use the Window.DID_OPEN event to confirm that the window opened.
  2. If the window doesn't have content yet, load the content as follows:
    • Use the load() method to load content from a component serialization file:
      myWin.getRootBlock().load("mycomp.xml");


    • Use the adoptChild() method to load a branch of the General Interface DOM:
      myWin.getRootBlock().adoptChild(myApp.getJSXByName(
              "mycomp"));
  3. Use the Window.WILL_CLOSE event to perform an operation when the user closes the window.
    Note that some Internet Explorer security settings might prevent the content from displaying in the new window.

For more information, see jsx3.gui.Window and jsx3.app.Server in General Interface API Reference (Help > API Documentation).

Contents

Searching General Interface Docs

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