Class Reify

All Implemented Interfaces:
HasAttachHandlers, HasHandlers, EventListener, HasVisibility, IsWidget, LogicalStructure, HasClearHandlers, HasClickHandlers, HasDoubleClickHandlers, HasDragMoveHandlers, HasDragRepositionMoveHandlers, HasDragRepositionStartHandlers, HasDragRepositionStopHandlers, HasDragResizeMoveHandlers, HasDragResizeStartHandlers, HasDragResizeStopHandlers, HasDragStartHandlers, HasDragStopHandlers, HasDropHandlers, HasDropMoveHandlers, HasDropOutHandlers, HasDropOverHandlers, HasFocusChangedHandlers, HasHoverHandlers, HasHoverHiddenHandlers, HasKeyDownHandlers, HasKeyPressHandlers, HasMouseDownHandlers, HasMouseMoveHandlers, HasMouseOutHandlers, HasMouseOverHandlers, HasMouseStillDownHandlers, HasMouseUpHandlers, HasMouseWheelHandlers, HasMovedHandlers, HasParentMovedHandlers, HasResizedHandlers, HasRightMouseDownHandlers, HasRuleContextChangedHandlers, HasScrolledHandlers, HasShowContextMenuHandlers, HasVisibilityChangedHandlers, HasMembersChangedHandlers

public class Reify extends VLayout
An application available within Reify OnSite that allows developers to create and manage Smart GWT screens and datasources. Only internal framework code can create an instance of the Reify tool - do not try it directly in your applications. If you want to create visual tools similar to Reify, see the Dashboards & Tools framework overview.

Note that in the Smart GWT SDK, this class present only to provide Reify utility class method APIs, and is not an instantiable widget. For example, you can call getMockDS() to export a DataSource as XML-formatted values and metadata for importing into Reify to create a MockDataSource.

See Also:
  • Constructor Details

  • Method Details

    • getOrCreateRef

      public static Reify getOrCreateRef(JavaScriptObject jsObj)
    • changeAutoChildDefaults

      public static void changeAutoChildDefaults(String autoChildName, Canvas defaults)
      Changes the defaults for Canvas AutoChildren named autoChildName.
      Parameters:
      autoChildName - name of an AutoChild to customize the defaults for.
      defaults - Canvas defaults to apply. These defaults override any existing properties without destroying or wiping out non-overridden properties. For usage tips on this param, see SGWTProperties.
      See Also:
    • changeAutoChildDefaults

      public static void changeAutoChildDefaults(String autoChildName, FormItem defaults)
      Changes the defaults for FormItem AutoChildren named autoChildName.
      Parameters:
      autoChildName - name of an AutoChild to customize the defaults for.
      defaults - FormItem defaults to apply. These defaults override any existing properties without destroying or wiping out non-overridden properties. For usage tips on this param, see SGWTProperties.
      See Also:
    • create

      protected JavaScriptObject create()
      Overrides:
      create in class VLayout
    • setProjectDataSource

      public Reify setProjectDataSource(DataSource projectDataSource) throws IllegalStateException
      The DataSource to use for saving the project, using fileSource operations. If not set, the property defaults to "vbProjects" except in hostedMode where "isc_hostedProjects" is the default.
      Parameters:
      projectDataSource - New projectDataSource value. Default value is null
      Returns:
      Reify instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getProjectDataSource

      public DataSource getProjectDataSource()
      The DataSource to use for saving the project, using fileSource operations. If not set, the property defaults to "vbProjects" except in hostedMode where "isc_hostedProjects" is the default.
      Returns:
      Current projectDataSource value. Default value is null
      See Also:
    • setProjectDataSource

      public Reify setProjectDataSource(String projectDataSource) throws IllegalStateException
      The DataSource to use for saving the project, using fileSource operations. If not set, the property defaults to "vbProjects" except in hostedMode where "isc_hostedProjects" is the default.
      Parameters:
      projectDataSource - New projectDataSource value. Default value is null
      Returns:
      Reify instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getProjectDataSourceAsString

      public String getProjectDataSourceAsString()
      The DataSource to use for saving the project, using fileSource operations. If not set, the property defaults to "vbProjects" except in hostedMode where "isc_hostedProjects" is the default.
      Returns:
      Current projectDataSource value. Default value is null
      See Also:
    • loadProject

      public void loadProject(String projectName)
      Loads an existing project from projectDataSource within Reify making it the current project. If project cannot be found a new project will be created and loaded.

      The last accessed screen within the project is restored to the current screen.

      Parameters:
      projectName - the name of the project to load
    • loadProject

      public void loadProject(String projectName, String ownerId)
    • loadProject

      public void loadProject(String projectName, String ownerId, Function callback)
      Loads an existing project from projectDataSource within Reify making it the current project. If project cannot be found a new project will be created and loaded.

      The last accessed screen within the project is restored to the current screen.

      Parameters:
      projectName - the name of the project to load
      ownerId - optional ID of the project owner
      callback - optional callback to fire when the project has been loaded
    • addScreensToProject

      public static void addScreensToProject(String projectName, String[] screenNames)
      Add one or more screens to an existing Reify project. The screens must already be saved via saveScreen(). The project is loaded from vbProjects, the screen references are appended, and the project is saved back.
      Parameters:
      projectName - project name
      screenNames - screen names to add
    • addScreensToProject

      public static void addScreensToProject(String projectName, String[] screenNames, Function callback)
      Add one or more screens to an existing Reify project. The screens must already be saved via saveScreen(). The project is loaded from vbProjects, the screen references are appended, and the project is saved back.
      Parameters:
      projectName - project name
      screenNames - screen names to add
      callback - called with (DSResponse dsResponse, Object data)
    • createProjectWithScreens

      public static void createProjectWithScreens(String projectName, String[] screenNames)
      Create a minimal Reify project that references one or more screens already stored in vbScreens. The project is saved to vbProjects.

      If a project with this name already exists, it is overwritten. To add screens to an existing project, use addScreensToProject() instead.

      Parameters:
      projectName - project name
      screenNames - screen names to include
    • createProjectWithScreens

      public static void createProjectWithScreens(String projectName, String[] screenNames, Function callback)
      Create a minimal Reify project that references one or more screens already stored in vbScreens. The project is saved to vbProjects.

      If a project with this name already exists, it is overwritten. To add screens to an existing project, use addScreensToProject() instead.

      Parameters:
      projectName - project name
      screenNames - screen names to include
      callback - called with (DSResponse dsResponse, Object data)
    • disableOverlay

      public static void disableOverlay()
      Hide the overlay view, destroying all overlay frames. The loaded screen canvases are untouched. Idempotent.
    • editInReify

      public static void editInReify(EditInReifyConfig config)
      Save an EditContext's component tree (or raw screen XML) to Reify storage and open it in the Reify editor. This is the primary convenience method for the "Dashboards & Tools to Reify" workflow.

      The method handles the complete flow:

      1. Serializes the EditContext to screen XML (if editContext is provided instead of raw screenContents)
      2. Saves the screen to vbScreens via saveScreen()
      3. Creates a new project or adds the screen to an existing project
      4. Opens Reify via loadReify() with the project and screen pre-selected
      Parameters:
      config - configuration
    • editInReify

      public static void editInReify(EditInReifyConfig config, Function callback)
      Save an EditContext's component tree (or raw screen XML) to Reify storage and open it in the Reify editor. This is the primary convenience method for the "Dashboards & Tools to Reify" workflow.

      The method handles the complete flow:

      1. Serializes the EditContext to screen XML (if editContext is provided instead of raw screenContents)
      2. Saves the screen to vbScreens via saveScreen()
      3. Creates a new project or adds the screen to an existing project
      4. Opens Reify via loadReify() with the project and screen pre-selected
      Parameters:
      config - configuration
      callback - called with a ReifyRemote instance
    • enableOverlay

      public static void enableOverlay()
      Show the overlay view. Equivalent to showOverlay() with default dismiss settings (Escape key dismisses, click-outside dismisses). Idempotent.
    • getDataSourceProject

      public static Project getDataSourceProject(String dataSourceId)
      Determine which cached Reify project a DataSource belongs to, if any.
      Parameters:
      dataSourceId - DataSource ID
      Returns:
      the project containing the DS, or null
    • getDataSourcesDS

      public static void getDataSourcesDS(String callback, ReifyDSSettings settings)
      Return a DataSource for browsing the list of DataSources in a Reify installation. See getProjectsDS() for behavior, settings, and remote-access details.
      Parameters:
      callback - called with (DataSource ds). See Callback
      settings - optional override settings
    • getLoadedDataSources

      public static Map[] getLoadedDataSources()
      Return an Array of records describing every Reify-loaded DataSource currently registered.
      Returns:
      loaded DataSource records
    • getLoadedDataSourcesDS

      public static DataSource getLoadedDataSourcesDS()
      Return a live clientOnly DataSource of loaded DataSource records. See getLoadedProjectsDS().
      Returns:
      live discovery DS for DataSources
    • getLoadedProjects

      public static Map[] getLoadedProjects()
      Return an Array of records describing every Reify Project currently registered in the loaded-resource registry. Each record has fields projectName, screenCount, dsCount, source, reifyURL, sourceLabel, loadedAt, and instance (the live Project object).
      Returns:
      loaded project records
    • getLoadedProjectsDS

      public static DataSource getLoadedProjectsDS()
      Return a DataSource bound to the live set of records returned by getLoadedProjects(). The DS is clientOnly with cacheAllData:true, so bound ListGrids update automatically as projects are loaded and destroyed, and the DS supports synchronous fetchDataSynchronous().

      Returns the same DS instance on every call.

      Returns:
      live discovery DS for projects
    • getLoadedScreens

      public static Map[] getLoadedScreens()
      Return an Array of records describing every screen currently registered in the loaded-resource registry. See getLoadedProjects() for the registry overview.
      Returns:
      loaded screen records
    • getLoadedScreensDS

      public static DataSource getLoadedScreensDS()
      Return a live clientOnly DataSource of loaded screen records. See getLoadedProjectsDS().
      Returns:
      live discovery DS for screens
    • getMockDS

      public static void getMockDS(String[] dsNames, MockDSExportCallback callback, MockDSExportSettings settings)
      Exports or serializes the specified DataSources using the provided settings.

      The "reifyCSV" format generates comma-separated values to paste into the DataSource creation wizard in Reify. The use case for the other two formats is, if you have a Smart GWT application, and you plan to load MockDataSources to enable people to add screens to your application using Reify, you may want to test your application with the MockDataSources to ensure they have the right data to allow your application to function (for example, that records in one MockDataSource that are related to another MockDataSource match up). Similarly, you may want to test any custom classes that you upload to Reify in a standalone file using MockDataSources.

      You can customize the settings, such as numRows (or numLevels for tree-DataSources) to keep the data volume returned by the export low. When related DataSources are present, all related records will be included in the export, even if numRows is exceeded. If this is too much data, criteria can be used to further restrict exported records. Note that settings supports an array of requestProperties, so that you can provide unique configuration for each DataSource being exported, rather than only global configuration.

      When exporting interlinked DataSources, set MockDSExportSettings.followFKDepth to automatically discover additional DataSources reachable via foreignKey relationships, so you don't have to manually enumerate every related DataSource.

      Unless you need programmatic or expert control over the settings, you will likely find it easier to use the "Reify Export" button in the DataSources tab, as when using that route, useful global and per-DataSource settings can be configured in an intuitively-arranged popup dialog.

      Parameters:
      dsNames - IDs of the desired DataSources
      callback - called with the complete export or serialization
      settings - controls format and what records and metadata to include
      See Also:
    • getProjectsDS

      public static void getProjectsDS(String callback, ReifyDSSettings settings)
      Return a DataSource for browsing the list of projects in a Reify installation, suitable for binding to a ListGrid, TreeGrid, SelectItem, etc.

      By default, the local server's Reify storage is used. Pass a ReifyDSSettings object with reifyURL set to access a remote Reify server (see defaultReifyURL).

      The DataSource is delivered asynchronously via callback because the underlying DataSource definition may need to be loaded from the server first. Subsequent calls for the same target return the same DataSource instance.

      Parameters:
      callback - called with (DataSource ds) ? the DataSource is null on failure. See Callback
      settings - optional override settings
    • getReifyAssetsInPage

      public static void getReifyAssetsInPage(Function callback)
      Find all assets (projects, screens, DataSources) in the current page that are also stored in Reify. This is an async operation since it queries the Reify file storage.
      Parameters:
      callback - called with (Object results) where results has properties: projects (Array), screens (Array), dataSources (Array)
    • getReifyDataSources

      public static void getReifyDataSources(Function callback)
      Get a list of DataSources stored in Reify's DS storage.
      Parameters:
      callback - called with (Array of String dsIds)
    • getReifyProjects

      public static void getReifyProjects(Function callback)
      Get a list of projects stored in Reify's project storage.
      Parameters:
      callback - called with (Array of String projectNames)
    • getReifyScreens

      public static void getReifyScreens(Function callback)
      Get a list of screens stored in Reify's screen storage.
      Parameters:
      callback - called with (Array of String screenNames)
    • getScreenProject

      public static Project getScreenProject(String screenName)
      Determine which Reify project a screen belongs to, if any. A screen belongs to a project if it is listed in the project's screen list. This checks locally cached projects (loaded via RPCManager.loadProject()).
      Parameters:
      screenName - name of the screen
      Returns:
      the project containing the screen, or null
    • getScreensDS

      public static void getScreensDS(String callback, ReifyDSSettings settings)
      Return a DataSource for browsing the list of screens in a Reify installation. See getProjectsDS() for behavior, settings, and remote-access details.
      Parameters:
      callback - called with (DataSource ds). See Callback
      settings - optional override settings
    • isDataSourceInReify

      public static void isDataSourceInReify(String dataSourceId, Function callback)
      Check whether a DataSource is stored in Reify's DS storage (vbDataSources).
      Parameters:
      dataSourceId - DataSource ID
      callback - called with (Boolean isStored)
    • isProjectInReify

      public static void isProjectInReify(String projectName, Function callback)
      Check whether a project loaded via RPCManager.loadProject() is stored in Reify's project storage (vbProjects).
      Parameters:
      projectName - name of the project
      callback - called with (Boolean isStored)
    • isScreenInReify

      public static void isScreenInReify(String screenName, Function callback)
      Check whether a screen is stored in Reify's screen storage (vbScreens).
      Parameters:
      screenName - name of the screen
      callback - called with (Boolean isStored)
    • loadProject

      public static void loadProject(String projectNames, LoadProjectCallback callback, LoadProjectSettings settings)
      Loads projects from the Reify server specified by serverURL (or LoadProjectSettings.serverURL) using the ProjectLoaderServlet, reachable at the relative path projectLoaderPath (or LoadProjectSettings.projectLoaderPath) underneath the server URL, and fires the given callback after the project has been cached. When a project is loaded, all of its DataSources and screens (except where explicitly overridden by settings) are also cached in the project.

      See RPCManager.loadProject() for further details.

      Parameters:
      projectNames - Comma-separated string containing the names of project(s) to load.
      callback - Callback for notification of completion of project(s) loaded and screens cached.
      settings - Settings applicable to the loadProject operation.
      See Also:
    • loadReify

      public static void loadReify(ReifyLoadConfig config, Function callback)
      Load the Reify editor, either inline in the current page or in a new browser window. Returns a ReifyRemote via callback that provides a uniform API for controlling and receiving notifications from the Reify instance regardless of how it was loaded.

      In inline mode, all required Reify modules are dynamically loaded into the current page via FileLoader.loadModules() and a Reify instance is created.

      In window mode, Reify is opened in a new browser tab. Communication uses window.postMessage by default (same-origin) or RealTime Messaging if useRTM: true (cross-origin).

      Parameters:
      config - configuration
      callback - called with a ReifyRemote instance
    • loadSavedProject

      public static void loadSavedProject(String path, LoadProjectCallback callback)
      Loads a Project from a file on the server previously saved by saveProject(), without contacting a Reify server.

      A saved project file is a JSON envelope containing each screen and DataSource definition. Each definition includes the JavaScript component code (the code property) and, when the project was originally loaded with includeXML:true, the original XML source as well (the xml property). Both representations are preserved through save/load round-trips.

      The resulting Project is cached the same way as one loaded via loadProject(), and screens can be created via Project.createScreen().

      Parameters:
      path - server path relative to the webRoot (e.g. "shared/myApp.proj.json")
      callback - called with the loaded Project
      See Also:
    • loadSavedProject

      public static void loadSavedProject(String path, LoadProjectCallback callback, LoadProjectSettings settings)
      Loads a Project from a file on the server previously saved by saveProject(), without contacting a Reify server.

      A saved project file is a JSON envelope containing each screen and DataSource definition. Each definition includes the JavaScript component code (the code property) and, when the project was originally loaded with includeXML:true, the original XML source as well (the xml property). Both representations are preserved through save/load round-trips.

      The resulting Project is cached the same way as one loaded via loadProject(), and screens can be created via Project.createScreen().

      Parameters:
      path - server path relative to the webRoot (e.g. "shared/myApp.proj.json")
      callback - called with the loaded Project
      settings - optional settings for project loading
      See Also:
    • loadScreenInReify

      public static void loadScreenInReify(String screenName, ReifyLoadConfig config, Function callback)
      Open a named screen in Reify for editing. The screen must be stored in Reify's screen storage (vbScreens); if not, a warning is logged and the call fails.

      This is the screen equivalent of Project.loadInReify() and DataSource.loadInReify(). Since screens are not first-class objects in Smart GWT (they are Canvas hierarchies returned by RPCManager.loadScreen()), this method is on the Reify class rather than on a Screen instance.

      Parameters:
      screenName - screen to edit
      config - optional config for loadReify()
      callback - called with ReifyRemote
    • registerLoadedDataSource

      public static void registerLoadedDataSource(String dsName)
      Add a DataSource reference to the loaded-resource registry. Normally called from registerLoadedProject() for project-bundled DSes, but available for application code that loads DSes outside the project flow.
      Parameters:
      dsName - the DataSource's ID
    • registerLoadedDataSource

      public static void registerLoadedDataSource(String dsName, Map info)
      Add a DataSource reference to the loaded-resource registry. Normally called from registerLoadedProject() for project-bundled DSes, but available for application code that loads DSes outside the project flow.
      Parameters:
      dsName - the DataSource's ID
      info - optional fields: projectName, source, reifyURL, sourceLabel
    • registerLoadedProject

      public static void registerLoadedProject(Project project)
      Add a Project to the loaded-resource registry. Called automatically by RPCManager.loadProject() as projects come back from the server, and may also be called by application code for projects assembled outside the normal load path (e.g. from local storage).

      Registration is idempotent: re-registering an already-known project just refreshes its record. An automatic destroy hook ensures the record is removed when the Project is destroyed.

      Parameters:
      project - the Project instance to register
    • registerLoadedProject

      public static void registerLoadedProject(Project project, Map sourceInfo)
      Add a Project to the loaded-resource registry. Called automatically by RPCManager.loadProject() as projects come back from the server, and may also be called by application code for projects assembled outside the normal load path (e.g. from local storage).

      Registration is idempotent: re-registering an already-known project just refreshes its record. An automatic destroy hook ensures the record is removed when the Project is destroyed.

      Parameters:
      project - the Project instance to register
      sourceInfo - optional override for source provenance fields (source, reifyURL, sourceLabel); defaults derived from defaultReifyURL
    • registerLoadedScreen

      public static void registerLoadedScreen(Canvas canvas)
      Add a screen Canvas instance to the loaded-resource registry. Called automatically by RPCManager.loadScreen() (when no project is involved) and by Project.createScreen() (which both replaces the project's screen-definition record with one that points at the live Canvas, and arranges for cleanup when the Canvas is destroyed).
      Parameters:
      canvas - the screen's top-level Canvas instance
    • registerLoadedScreen

      public static void registerLoadedScreen(Canvas canvas, Map info)
      Add a screen Canvas instance to the loaded-resource registry. Called automatically by RPCManager.loadScreen() (when no project is involved) and by Project.createScreen() (which both replaces the project's screen-definition record with one that points at the live Canvas, and arranges for cleanup when the Canvas is destroyed).
      Parameters:
      canvas - the screen's top-level Canvas instance
      info - optional fields: screenName, projectName, source, reifyURL, sourceLabel
    • saveProject

      public static void saveProject(Project project, String path)
      Saves a loaded Project to a file on the server, using the saveFile built-in RPC. The file can later be loaded via loadSavedProject() to recreate the project without contacting a Reify server.

      By default, the saved format is determined by how the project was loaded. If the project was loaded with includeXML:true, only the original XML definitions are saved — these are the verbatim strings from the Reify server, with no re-serialization or round-tripping. Otherwise, the JavaScript component code is saved.

      The optional format parameter overrides this default:

      • "json" – saves only the JavaScript code representation
      • "xml" – saves only the xml representation. Requires includeXML:true to have been set when the project was loaded.
      • "both" – saves both code and xml (when present)

      Note: Project.createScreen() requires the code property. Files saved with only xml (the default when includeXML was used, or format "xml") cannot be loaded via loadSavedProject() for screen creation. Use format "both" or "json" to produce a file suitable for loadSavedProject().

      The saveFile built-in method must be enabled in server.properties:

        RPCManager.enabledBuiltinMethods: saveFile
        
      Parameters:
      project - a loaded project
      path - server path relative to the webRoot (e.g. "shared/myApp.proj.json")
      See Also:
    • saveProject

      public static void saveProject(Project project, String path, DSCallback callback)
    • saveProject

      public static void saveProject(Project project, String path, DSCallback callback, String format)
      Saves a loaded Project to a file on the server, using the saveFile built-in RPC. The file can later be loaded via loadSavedProject() to recreate the project without contacting a Reify server.

      By default, the saved format is determined by how the project was loaded. If the project was loaded with includeXML:true, only the original XML definitions are saved — these are the verbatim strings from the Reify server, with no re-serialization or round-tripping. Otherwise, the JavaScript component code is saved.

      The optional format parameter overrides this default:

      • "json" – saves only the JavaScript code representation
      • "xml" – saves only the xml representation. Requires includeXML:true to have been set when the project was loaded.
      • "both" – saves both code and xml (when present)

      Note: Project.createScreen() requires the code property. Files saved with only xml (the default when includeXML was used, or format "xml") cannot be loaded via loadSavedProject() for screen creation. Use format "both" or "json" to produce a file suitable for loadSavedProject().

      The saveFile built-in method must be enabled in server.properties:

        RPCManager.enabledBuiltinMethods: saveFile
        
      Parameters:
      project - a loaded project
      path - server path relative to the webRoot (e.g. "shared/myApp.proj.json")
      callback - called on completion
      format - "json", "xml", "both", or null for auto-detect
      See Also:
    • saveProjectFile

      public static void saveProjectFile(String projectName, String projectXml)
      Save a project definition to Reify's project storage (vbProjects). projectXml must be valid Reify project XML as produced by ReifyProject.xmlSerialize().
      Parameters:
      projectName - project name
      projectXml - project XML content
    • saveProjectFile

      public static void saveProjectFile(String projectName, String projectXml, Function callback)
      Save a project definition to Reify's project storage (vbProjects). projectXml must be valid Reify project XML as produced by ReifyProject.xmlSerialize().
      Parameters:
      projectName - project name
      projectXml - project XML content
      callback - called with (DSResponse dsResponse, Object data)
    • saveScreen

      public static void saveScreen(String screenName, String screenContents)
      Save screen content (XML or JSON) to Reify's screen storage (vbScreens). This makes the screen available for use in Reify projects via loadReify() or loadScreenInReify().
      Parameters:
      screenName - name for the screen
      screenContents - screen XML or JSON content, as produced by EditContext.serializeAllEditNodes()
    • saveScreen

      public static void saveScreen(String screenName, String screenContents, Function callback)
      Save screen content (XML or JSON) to Reify's screen storage (vbScreens). This makes the screen available for use in Reify projects via loadReify() or loadScreenInReify().
      Parameters:
      screenName - name for the screen
      screenContents - screen XML or JSON content, as produced by EditContext.serializeAllEditNodes()
      callback - called with (DSResponse dsResponse, Object data)
    • setOverlayKey

      public static void setOverlayKey(String key)
      Reassign the key combination that activates the overlay view.

      Pass a KeyIdentifier object. When keyName is present the binding is a press-to-toggle shortcut; when absent only modifiers are checked and the overlay uses hold-to-show mode (appears while held, auto-dismisses on release).

      A plain String string (e.g. "F2") is also accepted and treated as a toggle shortcut.

      Parameters:
      key - new key binding. See KeyName
      See Also:
    • setOverlayKey

      public static void setOverlayKey(KeyIdentifier key)
      Reassign the key combination that activates the overlay view.

      Pass a KeyIdentifier object. When keyName is present the binding is a press-to-toggle shortcut; when absent only modifiers are checked and the overlay uses hold-to-show mode (appears while held, auto-dismisses on release).

      A plain String string (e.g. "F2") is also accepted and treated as a toggle shortcut.

      Parameters:
      key - new key binding. See KeyName
      See Also:
    • setPassword

      public static void setPassword(String password)
      Setter for password.
      Parameters:
      password -
    • setProjectLoaderPath

      public static void setProjectLoaderPath(String path)
      Setter for projectLoaderPath.
      Parameters:
      path -
    • setServerURL

      public static void setServerURL(String serverURL)
      Setter for serverURL.
      Parameters:
      serverURL - . See URL
      See Also:
    • setUserName

      public static void setUserName(String userName)
      Setter for userName.
      Parameters:
      userName -
    • showMockDS

      public static void showMockDS(String[] dsNames, MockDSExportCallback callback, MockDSExportSettings settings)
      Shows the result of running getMockDS() in a modal window so it can be copied and pasted as needed into Reify or elsewhere.

      Note that the callback is fired when the window is closed, not when it's populated.

      Parameters:
      dsNames - IDs of the desired DataSources
      callback - called with the complete export or serialization
      settings - controls format and what records and metadata to include
    • showOverlay

      public static void showOverlay()
      Show the overlay view with optional dismiss behaviour. Greys out the page and draws a colored frame plus action icons around every loaded Reify screen. Idempotent.
      See Also:
    • showOverlay

      public static void showOverlay(OverlaySettings settings)
      Show the overlay view with optional dismiss behaviour. Greys out the page and draws a colored frame plus action icons around every loaded Reify screen. Idempotent.
      Parameters:
      settings - optional dismiss and behaviour configuration
      See Also:
    • toggleOverlay

      public static void toggleOverlay()
      Show the overlay view if it is hidden, or hide it if it is showing.
    • unregisterLoadedDataSource

      public static void unregisterLoadedDataSource(String dsName)
      Remove a DataSource entry from the loaded-resource registry.
      Parameters:
      dsName - the DataSource's ID
    • unregisterLoadedProject

      public static void unregisterLoadedProject(Project project)
      Remove a Project from the loaded-resource registry, along with all of its screens and DataSources. Called automatically by Project.destroy().
      Parameters:
      project - the Project to remove
    • unregisterLoadedScreen

      public static void unregisterLoadedScreen(Canvas canvas)
      Remove a screen from the loaded-resource registry. Called automatically when a registered screen Canvas is destroyed (via an observation of Canvas.destroy()).
      Parameters:
      canvas - the screen's top-level Canvas instance
    • setDefaultProperties

      public static void setDefaultProperties(Reify reifyProperties)
      Class level method to set the default properties of this class. If set, then all existing and subsequently created instances of this class will automatically have default properties corresponding to the properties set on the SmartGWT class instance passed to this function before its underlying SmartClient JS object was created. This is a powerful feature that eliminates the need for users to create a separate hierarchy of subclasses that only alter the default properties of this class. Can also be used for skinning / styling purposes.

      Note: This method is intended for setting default attributes only and will affect all instances of the underlying class (including those automatically generated in JavaScript). This method should not be used to apply standard EventHandlers or override methods for a class - use a custom subclass instead. Calling this method after instances have been created can result in undefined behavior, since it bypasses any setters and a class instance may have already examined a particular property and not be expecting any changes through this route.

      Parameters:
      reifyProperties - properties that should be used as new defaults when instances of this class are created
      See Also:
    • getOrCreateJsObj

      public JavaScriptObject getOrCreateJsObj()
      Overrides:
      getOrCreateJsObj in class BaseWidget
    • onInit

      protected void onInit()
      Overrides:
      onInit in class Layout
    • setLogicalStructure

      public LogicalStructureObject setLogicalStructure(ReifyLogicalStructure s)
      Setter implementing the LogicalStructure interface, which supports Eclipse's logical structure debugging facility.
    • getLogicalStructure

      public LogicalStructureObject getLogicalStructure()
      Getter implementing the LogicalStructure interface, which supports Eclipse's logical structure debugging facility.
      Specified by:
      getLogicalStructure in interface LogicalStructure
      Overrides:
      getLogicalStructure in class VLayout