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
    • 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.

      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-DataSources 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:
    • 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:
    • 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
    • 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