com.smartgwt.client.rpc

## Class CreateScreenSettings

- java.lang.Object
- - com.smartgwt.client.core.JsObject
  - - com.smartgwt.client.core.DataClass
    - - com.smartgwt.client.rpc.CreateScreenSettings

- All Implemented Interfaces:
    com.google.gwt.event.shared.HasHandlers

      public class CreateScreenSettings
      extends DataClass

  Controls what class and instance substitutions, if any, are applied during a call to `RPCManager.createScreen()`. Classes and instances can be mapped (constructed as) other classes, and existing widget instances can be returned for new ones.
  See Also:
    `getClassSubstitutions()`, `getComponentSubstitutions()`

- - ### Field Summary

    - ### Fields inherited from class com.smartgwt.client.core.DataClass

      `factoryCreated, factoryProperties`

    - ### Fields inherited from class com.smartgwt.client.core.JsObject

      `jsObj`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `CreateScreenSettings()`
    `CreateScreenSettings(com.google.gwt.core.client.JavaScriptObject jsObj)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.Boolean` | `getAllowPlaceholders()` Should Placeholders be rendered as placeholders? If property is not set actual components are created instead of the Placeholders.
    `java.util.Map` | `getClassSubstitutions()` Maps class names of widgets in the screen to new class names, so that if a widget would normally be constructed as an instance of a class, and that class is in the map, it's instead constructed as an instance of the new class.
    `java.lang.Boolean` | `getClobberDataSources()` Should DataSources referenced by the screen clobber existing, globally-bound DataSources on the client when the screen is created? The default of false means that any DataSources defined in the screen will be discarded if they collide with existing, globally-bound DataSources.
    `java.util.Map` | `getComponentSubstitutions()` Defines the map of new widget ids to existing class instances, or to new instances that will be of a different class.
    `DataContext` | `getDataContext()` `DataContext` that will be provided to the top-level component as `dataContext` in the screen.
    `com.google.gwt.dom.client.Element` | `getHtmlElement()` Simplifies integrating a screen with an existing JavaScript app.
    `java.lang.String` | `getHtmlElementAsString()` Simplifies integrating a screen with an existing JavaScript app.
    `static CreateScreenSettings` | `getOrCreateRef(com.google.gwt.core.client.JavaScriptObject jsObj)`
    `java.lang.Boolean` | `getSuppressAutoDraw()` If true, prevents any screen from being drawn when it's created, even if there's an explicit `Canvas.autoDraw`:true setting on it.
    `java.lang.Boolean` | `getVerifyAsError()` Enable `verifyAsError` behavior only for requests using these settings.
    `java.util.Map<java.lang.String,java.lang.String>` | `getVerifyComponents()` Enables verification that the created screen contains a component having a `localId` equal to the given key, and that it is an instance (or subclass) if the key's value.
    `CreateScreenSettings` | `setAllowPlaceholders(java.lang.Boolean allowPlaceholders)` Should Placeholders be rendered as placeholders? If property is not set actual components are created instead of the Placeholders.
    `CreateScreenSettings` | `setClassSubstitutions(java.util.Map classSubstitutions)` Maps class names of widgets in the screen to new class names, so that if a widget would normally be constructed as an instance of a class, and that class is in the map, it's instead constructed as an instance of the new class.
    `CreateScreenSettings` | `setClobberDataSources(java.lang.Boolean clobberDataSources)` Should DataSources referenced by the screen clobber existing, globally-bound DataSources on the client when the screen is created? The default of false means that any DataSources defined in the screen will be discarded if they collide with existing, globally-bound DataSources.
    `CreateScreenSettings` | `setComponentSubstitutions(java.util.Map componentSubstitutions)` Defines the map of new widget ids to existing class instances, or to new instances that will be of a different class.
    `CreateScreenSettings` | `setDataContext(DataContext dataContext)` `DataContext` that will be provided to the top-level component as `dataContext` in the screen.
    `CreateScreenSettings` | `setHtmlElement(com.google.gwt.dom.client.Element htmlElement)` Simplifies integrating a screen with an existing JavaScript app.
    `CreateScreenSettings` | `setHtmlElement(java.lang.String htmlElement)` Simplifies integrating a screen with an existing JavaScript app.
    `CreateScreenSettings` | `setSuppressAutoDraw(java.lang.Boolean suppressAutoDraw)` If true, prevents any screen from being drawn when it's created, even if there's an explicit `Canvas.autoDraw`:true setting on it.
    `CreateScreenSettings` | `setVerifyAsError(java.lang.Boolean verifyAsError)` Enable `verifyAsError` behavior only for requests using these settings.
    `CreateScreenSettings` | `setVerifyComponents(java.util.Map<java.lang.String,java.lang.String> verifyComponents)` Enables verification that the created screen contains a component having a `localId` equal to the given key, and that it is an instance (or subclass) if the key's value.

    - ### Methods inherited from class com.smartgwt.client.core.DataClass

      `applyFactoryProperties, doAddHandler, fireEvent, getAttribute, getAttributeAsBoolean, getAttributeAsBoolean, getAttributeAsDate, getAttributeAsDouble, getAttributeAsDoubleArray, getAttributeAsElement, getAttributeAsFloat, getAttributeAsInt, getAttributeAsIntArray, getAttributeAsJavaScriptObject, getAttributeAsLong, getAttributeAsMap, getAttributeAsObject, getAttributeAsRecord, getAttributeAsString, getAttributeAsStringArray, getAttributes, getHandlerCount, isFactoryCreated, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttributeAsJavaObject, setFactoryCreated`

    - ### Methods inherited from class com.smartgwt.client.core.JsObject

      `equals, getJsObj, hashCode, isCreated, setJavaScriptObject, setJsObj`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### CreateScreenSettings

          public CreateScreenSettings()

    - #### CreateScreenSettings

          public CreateScreenSettings(com.google.gwt.core.client.JavaScriptObject jsObj)

  - ### Method Detail

    - #### getOrCreateRef

          public static CreateScreenSettings getOrCreateRef(com.google.gwt.core.client.JavaScriptObject jsObj)

    - #### setAllowPlaceholders

          public CreateScreenSettings setAllowPlaceholders(java.lang.Boolean allowPlaceholders)

      Should Placeholders be rendered as placeholders? If property is not set actual components are created instead of the Placeholders.
      Parameters:
        `allowPlaceholders` - New allowPlaceholders value. Default value is null
      Returns:
        `CreateScreenSettings` instance, for chaining setter calls

    - #### getAllowPlaceholders

          public java.lang.Boolean getAllowPlaceholders()

      Should Placeholders be rendered as placeholders? If property is not set actual components are created instead of the Placeholders.
      Returns:
        Current allowPlaceholders value. Default value is null

    - #### setClassSubstitutions

          public CreateScreenSettings setClassSubstitutions(java.util.Map classSubstitutions)

      Maps class names of widgets in the screen to new class names, so that if a widget would normally be constructed as an instance of a class, and that class is in the map, it's instead constructed as an instance of the new class.
      Parameters:
        `classSubstitutions` - New classSubstitutions value. Default value is null
      Returns:
        `CreateScreenSettings` instance, for chaining setter calls
      See Also:
        `RPCManager.createScreen(java.lang.String)`

    - #### getClassSubstitutions

          public java.util.Map getClassSubstitutions()

      Maps class names of widgets in the screen to new class names, so that if a widget would normally be constructed as an instance of a class, and that class is in the map, it's instead constructed as an instance of the new class.
      Returns:
        Current classSubstitutions value. Default value is null
      See Also:
        `RPCManager.createScreen(java.lang.String)`

    - #### setClobberDataSources

          public CreateScreenSettings setClobberDataSources(java.lang.Boolean clobberDataSources)

      Should DataSources referenced by the screen clobber existing, globally-bound DataSources on the client when the screen is created? The default of false means that any DataSources defined in the screen will be discarded if they collide with existing, globally-bound DataSources.

      Note that here we consider a DataSource to be "globally bound" if it can be retrieved by ID using the method `DataSource.get()`, regardless of whether it's actually bound to the browser `window` object.

      Parameters:
        `clobberDataSources` - New clobberDataSources value. Default value is false
      Returns:
        `CreateScreenSettings` instance, for chaining setter calls

    - #### getClobberDataSources

          public java.lang.Boolean getClobberDataSources()

      Should DataSources referenced by the screen clobber existing, globally-bound DataSources on the client when the screen is created? The default of false means that any DataSources defined in the screen will be discarded if they collide with existing, globally-bound DataSources.

      Note that here we consider a DataSource to be "globally bound" if it can be retrieved by ID using the method `DataSource.get()`, regardless of whether it's actually bound to the browser `window` object.

      Returns:
        Current clobberDataSources value. Default value is false

    - #### setComponentSubstitutions

          public CreateScreenSettings setComponentSubstitutions(java.util.Map componentSubstitutions)

      Defines the map of new widget ids to existing class instances, or to new instances that will be of a different class. A substituted class instance is returned immediately from Class.create() without modification. Otherwise, the constructor for the new instance is run, but targeting the substituted class rather than the original.

      Note that where we return an existing instance, not even its `Canvas.ID` will be changed. An alternative is programmtic replacement using `Layout.replaceMember()`.

      Parameters:
        `componentSubstitutions` - New componentSubstitutions value. Default value is null
      Returns:
        `CreateScreenSettings` instance, for chaining setter calls
      See Also:
        `RPCManager.createScreen(java.lang.String)`

    - #### getComponentSubstitutions

          public java.util.Map getComponentSubstitutions()

      Defines the map of new widget ids to existing class instances, or to new instances that will be of a different class. A substituted class instance is returned immediately from Class.create() without modification. Otherwise, the constructor for the new instance is run, but targeting the substituted class rather than the original.

      Note that where we return an existing instance, not even its `Canvas.ID` will be changed. An alternative is programmtic replacement using `Layout.replaceMember()`.

      Returns:
        Current componentSubstitutions value. Default value is null
      See Also:
        `RPCManager.createScreen(java.lang.String)`

    - #### setDataContext

          public CreateScreenSettings setDataContext(DataContext dataContext)

      `DataContext` that will be provided to the top-level component as `dataContext` in the screen.

      To understand how `dataContext` is used to automatically populate `DataBoundComponents`, see `Canvas.autoPopulateData`.

      Parameters:
        `dataContext` - New dataContext value. Default value is null
      Returns:
        `CreateScreenSettings` instance, for chaining setter calls

    - #### getDataContext

          public DataContext getDataContext()

      `DataContext` that will be provided to the top-level component as `dataContext` in the screen.

      To understand how `dataContext` is used to automatically populate `DataBoundComponents`, see `Canvas.autoPopulateData`.

      Returns:
        Current dataContext value. Default value is null

    - #### setHtmlElement

          public CreateScreenSettings setHtmlElement(com.google.gwt.dom.client.Element htmlElement)

      Simplifies integrating a screen with an existing JavaScript app. Does the following:
      - Sets `suppressAutoDraw`: true
      - Sets `Canvas.htmlElement` of the screen's top widget to the DOM element
      - Sets the screen's top widget to have `Canvas.position`: "relative"
      - Draws the screen by calling `Canvas.draw()` on the top widget
      If you need to apply additional, custom configuration, for example setting `Canvas.htmlPosition`, then instead of using this property, you can call `RPCManager.createScreen()` with `suppressAutoDraw`: true, and then manually configure and draw the screen:

                CreateScreenSettings settings = new CreateScreenSettings();
                settings.setSuppressAutoDraw(true);
                Canvas screen = RPCManager.createScreen("My Screen", settings);
                screen.setHtmlElement(element);
                screen.setHtmlPosition(DrawPosition.REPLACE);
                screen.setPosition(Positioning.RELATIVE);
                screen.draw();

      Parameters:
        `htmlElement` - New htmlElement value. Default value is null
      Returns:
        `CreateScreenSettings` instance, for chaining setter calls

    - #### getHtmlElement

          public com.google.gwt.dom.client.Element getHtmlElement()

      Simplifies integrating a screen with an existing JavaScript app. Does the following:
      - Sets `suppressAutoDraw`: true
      - Sets `Canvas.htmlElement` of the screen's top widget to the DOM element
      - Sets the screen's top widget to have `Canvas.position`: "relative"
      - Draws the screen by calling `Canvas.draw()` on the top widget
      If you need to apply additional, custom configuration, for example setting `Canvas.htmlPosition`, then instead of using this property, you can call `RPCManager.createScreen()` with `suppressAutoDraw`: true, and then manually configure and draw the screen:

                CreateScreenSettings settings = new CreateScreenSettings();
                settings.setSuppressAutoDraw(true);
                Canvas screen = RPCManager.createScreen("My Screen", settings);
                screen.setHtmlElement(element);
                screen.setHtmlPosition(DrawPosition.REPLACE);
                screen.setPosition(Positioning.RELATIVE);
                screen.draw();

      Returns:
        Current htmlElement value. Default value is null

    - #### setHtmlElement

          public CreateScreenSettings setHtmlElement(java.lang.String htmlElement)

      Simplifies integrating a screen with an existing JavaScript app. Does the following:
      - Sets `suppressAutoDraw`: true
      - Sets `Canvas.htmlElement` of the screen's top widget to the DOM element
      - Sets the screen's top widget to have `Canvas.position`: "relative"
      - Draws the screen by calling `Canvas.draw()` on the top widget
      If you need to apply additional, custom configuration, for example setting `Canvas.htmlPosition`, then instead of using this property, you can call `RPCManager.createScreen()` with `suppressAutoDraw`: true, and then manually configure and draw the screen:

                CreateScreenSettings settings = new CreateScreenSettings();
                settings.setSuppressAutoDraw(true);
                Canvas screen = RPCManager.createScreen("My Screen", settings);
                screen.setHtmlElement(element);
                screen.setHtmlPosition(DrawPosition.REPLACE);
                screen.setPosition(Positioning.RELATIVE);
                screen.draw();

      Parameters:
        `htmlElement` - New htmlElement value. Default value is null
      Returns:
        `CreateScreenSettings` instance, for chaining setter calls

    - #### getHtmlElementAsString

          public java.lang.String getHtmlElementAsString()

      Simplifies integrating a screen with an existing JavaScript app. Does the following:
      - Sets `suppressAutoDraw`: true
      - Sets `Canvas.htmlElement` of the screen's top widget to the DOM element
      - Sets the screen's top widget to have `Canvas.position`: "relative"
      - Draws the screen by calling `Canvas.draw()` on the top widget
      If you need to apply additional, custom configuration, for example setting `Canvas.htmlPosition`, then instead of using this property, you can call `RPCManager.createScreen()` with `suppressAutoDraw`: true, and then manually configure and draw the screen:

                CreateScreenSettings settings = new CreateScreenSettings();
                settings.setSuppressAutoDraw(true);
                Canvas screen = RPCManager.createScreen("My Screen", settings);
                screen.setHtmlElement(element);
                screen.setHtmlPosition(DrawPosition.REPLACE);
                screen.setPosition(Positioning.RELATIVE);
                screen.draw();

      Returns:
        Current htmlElement value. Default value is null

    - #### setSuppressAutoDraw

          public CreateScreenSettings setSuppressAutoDraw(java.lang.Boolean suppressAutoDraw)

      If true, prevents any screen from being drawn when it's created, even if there's an explicit `Canvas.autoDraw`:true setting on it.
      Parameters:
        `suppressAutoDraw` - New suppressAutoDraw value. Default value is false
      Returns:
        `CreateScreenSettings` instance, for chaining setter calls

    - #### getSuppressAutoDraw

          public java.lang.Boolean getSuppressAutoDraw()

      If true, prevents any screen from being drawn when it's created, even if there's an explicit `Canvas.autoDraw`:true setting on it.
      Returns:
        Current suppressAutoDraw value. Default value is false

    - #### setVerifyAsError

          public CreateScreenSettings setVerifyAsError(java.lang.Boolean verifyAsError)

      Enable `verifyAsError` behavior only for requests using these settings.
      Parameters:
        `verifyAsError` - New verifyAsError value. Default value is null
      Returns:
        `CreateScreenSettings` instance, for chaining setter calls
      See Also:
        `setVerifyAsError(java.lang.Boolean)`, `LoadProjectSettings.setVerifyAsError(java.lang.Boolean)`

    - #### getVerifyAsError

          public java.lang.Boolean getVerifyAsError()

      Enable `verifyAsError` behavior only for requests using these settings.
      Returns:
        Current verifyAsError value. Default value is null
      See Also:
        `getVerifyAsError()`, `LoadProjectSettings.getVerifyAsError()`

    - #### setVerifyComponents

          public CreateScreenSettings setVerifyComponents(java.util.Map<java.lang.String,java.lang.String> verifyComponents)

      Enables verification that the created screen contains a component having a `localId` equal to the given key, and that it is an instance (or subclass) if the key's value. Example:

              {'customerListGrid: 'ListGrid'}

      You may verify presence and type of Tabs, SectionStackSections, and FormItems by providing their names following the parent component's id in dot-separated notation. Example:

              {
                'mainTabSet.customersTab': 'ImgTab',
                'mainSectionStack.customersSection': 'SectionHeader',
                'customerDetailsForm.customerNameItem': 'TextItem'
              }

      Findings are always reported to the console, and may also be presented to the user with a warning dialog by setting `verifyAsError` or `verifyAsError`.
      Parameters:
        `verifyComponents` - New verifyComponents value. Default value is null
      Returns:
        `CreateScreenSettings` instance, for chaining setter calls
      See Also:
        `RPCManager.createScreen(java.lang.String)`

    - #### getVerifyComponents

          public java.util.Map<java.lang.String,java.lang.String> getVerifyComponents()

      Enables verification that the created screen contains a component having a `localId` equal to the given key, and that it is an instance (or subclass) if the key's value. Example:

              {'customerListGrid: 'ListGrid'}

      You may verify presence and type of Tabs, SectionStackSections, and FormItems by providing their names following the parent component's id in dot-separated notation. Example:

              {
                'mainTabSet.customersTab': 'ImgTab',
                'mainSectionStack.customersSection': 'SectionHeader',
                'customerDetailsForm.customerNameItem': 'TextItem'
              }

      Findings are always reported to the console, and may also be presented to the user with a warning dialog by setting `verifyAsError` or `verifyAsError`.
      Returns:
        Current verifyComponents value. Default value is null
      See Also:
        `RPCManager.createScreen(java.lang.String)`