Reloading the appMain Prototype Upon Logout

This procedure is used conjunction with the How to Create a BPM Desktop Using Components tutorial; it shows you how to re-display the Login dialog when the user clicks Logout.

In step 35 of the tutorial, you are instructed to add window.close() to the postLogout method, which causes the browser window to close when the user clicks the Logout button.

This procedure describes an alternative to closing the browser window upon logout. Performing this procedure causes the appMain prototype (appMain.xml) to be reloaded when the user clicks Logout. This causes the Login dialog to be re-displayed.

Procedure

  1. In TIBCO General Interface Builder Component Hierarchy, click on wccPrototype.
  2. Click on the wccPrototype button in the task bar, which displays the Properties/Events Editor.
  3. In the field on the bottom of the Properties tab, change "wccPrototype" to "AccountsPrototype", click the Update button, then click Commit.
  4. Open the AppMain.js file in the following directory:
       GIWorkspaceDir\JSXAPPS\WCCProjectName\application\js

    where GIWorkspaceDir is the TIBCO General Interface workspace directory and WCCProjectName is the name you gave the WCC Project (“Accounts” in this tutorial).

    The AppMain.js file is an application-level class mixin interface that contains an example custom post logout method (customPostLogoutExample). This custom post logout method will be used to reload the application upon a logout. (The customPostLogoutExample method is called from the postLogout method in Application.js.)

  5. Locate the customPostLogoutExample method in AppMain.js and change the name of the referenced prototype (’sampleAppPrototype’) to "AccountsProtoType". (There are five references to ’sampleAppPrototype’.)
  6. Save and close the AppMain.js file.
  7. Proceed to step 38.

Result

For more information about the  customPostLogoutExample method, see customPostLogoutExample.