Override Methods

The override methods provide entry points to add custom code into your WCC application.

These methods are located in the main Application-level class, Application.js, which is located in the following directory (note that they should not be called directly from the extending application):

StudioHome\wcc\version\JSXAPPS\WCCProjectName\application\js\

where:

  • StudioHome is the directory in which TIBCO Business Studio was installed.
  • version is the version number of Workspace that was installed with TIBCO Business Studio.
  • WCCProjectName is the name of the General Interface Builder project that contains your custom application. If you are working with the Workspace application, this is “workspace”.

The following are the available override methods:

  • init - This method is called when the application instance is constructed. The extending Application class can add functionality as required by overriding this method.
  • postLoadInit - This method is called after the initial prototype file is loaded and painted. The extending Application class can add functionality as required by overriding this method.
  • postLogin - This method is called by the Login component after the login has been successfully completed, but before publishing the loginComplete event. The extending Application class can add functionality as required by overriding this method.
  • preLogout - This method is called by the Logout component prior to making a server call to logout. The extending Application class can add functionality as required by overriding this method.
  • postLogout - This method is called by the Logout component after the logout has been successfully completed. The extending Application class can add functionality as required by overriding this method.
  • onBeforeUnload - This method is called before the browser page is closed. It can be used to handle any kind of actions that should be performed before the browser’s onbeforeunload event is fired.
  • onUnload - This method is called when the browser page is closed. It can be used to handle any kind of actions that should be performed before the browser’s onunload event is fired.
  • loadCustomMenu - This method loads a custom menu or toolbar button if a definition is found in config.xml.
  • onSessionInvalid - This method handles any actions that should be performed when the current login session is no longer valid.