Package com.smartgwt.client.rpc

# Class LoadScreenSettings

java.lang.Object
com.smartgwt.client.core.JsObject
com.smartgwt.client.core.DataClass
com.smartgwt.client.rpc.LoadScreenSettings

All Implemented Interfaces:
  `HasHandlers`

public class LoadScreenSettings extends DataClass
This is the bundle of settings that can be passed to `RPCManager.loadScreen()` as the "settings" argument. Some settings can also be passed as separate arguments; if these are present both as separate arguments and in settings, loadScreen() will use the value from the settings.

There is no need to instantiate a `LoadScreenSettings` instance. Just pass a normal JavaScript object with the desired properties.

- ## 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
  Description
  `LoadScreenSettings()`
  `LoadScreenSettings(JavaScriptObject jsObj)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `Boolean`
  `getCacheScreen()`
  Caches screen much like `RPCManager.cacheScreens()`, so `RPCManager.isScreenCached()` reports true.
  `Boolean`
  `getClobberDataSources()`
  Should DataSources referenced by the screen clobber existing, globally-bound DataSources on the client when the screen is loaded? The default of false means that any DataSources defined in the screen will be discarded if they collide with existing, globally-bound DataSources.
  `String`
  `getLocale()`
  The name of a locale to use for resolving i18n tags in the component XML of the screen.
  `Boolean`
  `getMissingDSIsNotFatal()`
  If true, server logic does not crash out if it cannot load a DataSource specified in the screen definition.
  `String[]`
  `getOmitDataSources()`
  DataSource IDs in the screen to skip and not load when the screen is loaded.
  `boolean`
  `getOmitLoadedDataSources()`
  Whether to implicitly add all DataSources currently loaded on the client to `omitDataSources` in `RPCManager.loadScreen()`.
  `static LoadScreenSettings`
  `getOrCreateRef(JavaScriptObject jsObj)`
  `RPCRequest`
  `getRequestProperties()`
  Specifies optional `RPCRequest` properties for the request.
  `Boolean`
  `getSuppressAutoDraw()`
  If true, prevents any screen from being drawn when it's loaded, even if there's an explicit `Canvas.autoDraw`:true setting on it.
  `Boolean`
  `getVerifyAsError()`
  Enable `verifyAsError` behavior only for requests using these settings.
  `Map<String,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.
  `Boolean`
  `getWillHandleError()`
  Whether to call the provided callback even if an error was encountered trying to load the screen (or it was simply not found), so that you can run your own error handling.
  `LoadScreenSettings`
  `setCacheScreen(Boolean cacheScreen)`
  Caches screen much like `RPCManager.cacheScreens()`, so `RPCManager.isScreenCached()` reports true.
  `LoadScreenSettings`
  `setClobberDataSources(Boolean clobberDataSources)`
  Should DataSources referenced by the screen clobber existing, globally-bound DataSources on the client when the screen is loaded? The default of false means that any DataSources defined in the screen will be discarded if they collide with existing, globally-bound DataSources.
  `LoadScreenSettings`
  `setLocale(String locale)`
  The name of a locale to use for resolving i18n tags in the component XML of the screen.
  `LoadScreenSettings`
  `setMissingDSIsNotFatal(Boolean missingDSIsNotFatal)`
  If true, server logic does not crash out if it cannot load a DataSource specified in the screen definition.
  `LoadScreenSettings`
  `setOmitDataSources(String... omitDataSources)`
  DataSource IDs in the screen to skip and not load when the screen is loaded.
  `LoadScreenSettings`
  `setOmitLoadedDataSources(boolean omitLoadedDataSources)`
  Whether to implicitly add all DataSources currently loaded on the client to `omitDataSources` in `RPCManager.loadScreen()`.
  `LoadScreenSettings`
  `setRequestProperties(RPCRequest requestProperties)`
  Specifies optional `RPCRequest` properties for the request.
  `LoadScreenSettings`
  `setSuppressAutoDraw(Boolean suppressAutoDraw)`
  If true, prevents any screen from being drawn when it's loaded, even if there's an explicit `Canvas.autoDraw`:true setting on it.
  `LoadScreenSettings`
  `setVerifyAsError(Boolean verifyAsError)`
  Enable `verifyAsError` behavior only for requests using these settings.
  `LoadScreenSettings`
  `setVerifyComponents(Map<String,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.
  `LoadScreenSettings`
  `setWillHandleError(Boolean willHandleError)`
  Whether to call the provided callback even if an error was encountered trying to load the screen (or it was simply not found), so that you can run your own error handling.

  ### 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 Details

  - ### LoadScreenSettings

    public LoadScreenSettings()

  - ### LoadScreenSettings

    public LoadScreenSettings(JavaScriptObject jsObj)

- ## Method Details

  - ### getOrCreateRef

    public static LoadScreenSettings getOrCreateRef(JavaScriptObject jsObj)

  - ### setCacheScreen

    public LoadScreenSettings setCacheScreen(Boolean cacheScreen)
    Caches screen much like `RPCManager.cacheScreens()`, so `RPCManager.isScreenCached()` reports true.
    Parameters:
      `cacheScreen` - New cacheScreen value. Default value is false
    Returns:
      `LoadScreenSettings` instance, for chaining setter calls

  - ### getCacheScreen

    public Boolean getCacheScreen()
    Caches screen much like `RPCManager.cacheScreens()`, so `RPCManager.isScreenCached()` reports true.
    Returns:
      Current cacheScreen value. Default value is false

  - ### setClobberDataSources

    public LoadScreenSettings setClobberDataSources(Boolean clobberDataSources)
    Should DataSources referenced by the screen clobber existing, globally-bound DataSources on the client when the screen is loaded? 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:
      `LoadScreenSettings` instance, for chaining setter calls

  - ### getClobberDataSources

    public Boolean getClobberDataSources()
    Should DataSources referenced by the screen clobber existing, globally-bound DataSources on the client when the screen is loaded? 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

  - ### setLocale

    public LoadScreenSettings setLocale(String locale)
    The name of a locale to use for resolving i18n tags in the component XML of the screen.
    Parameters:
      `locale` - New locale value. Default value is null
    Returns:
      `LoadScreenSettings` instance, for chaining setter calls

  - ### getLocale

    public String getLocale()
    The name of a locale to use for resolving i18n tags in the component XML of the screen.
    Returns:
      Current locale value. Default value is null

  - ### setMissingDSIsNotFatal

    public LoadScreenSettings setMissingDSIsNotFatal(Boolean missingDSIsNotFatal)
    If true, server logic does not crash out if it cannot load a DataSource specified in the screen definition. Instead, a stub DataSource is returned, which consists of nothing except the ID and an `unableToLoad` flag, which client-side code can use to determine that the DataSource could not be loaded on the server. Optional, defaults to false (ie, a missing DataSource causes a crash by default)
    Parameters:
      `missingDSIsNotFatal` - New missingDSIsNotFatal value. Default value is null
    Returns:
      `LoadScreenSettings` instance, for chaining setter calls

  - ### getMissingDSIsNotFatal

    public Boolean getMissingDSIsNotFatal()
    If true, server logic does not crash out if it cannot load a DataSource specified in the screen definition. Instead, a stub DataSource is returned, which consists of nothing except the ID and an `unableToLoad` flag, which client-side code can use to determine that the DataSource could not be loaded on the server. Optional, defaults to false (ie, a missing DataSource causes a crash by default)
    Returns:
      Current missingDSIsNotFatal value. Default value is null

  - ### setOmitDataSources

    public LoadScreenSettings setOmitDataSources(String... omitDataSources)
    DataSource IDs in the screen to skip and not load when the screen is loaded. It is assumed that these IDs represent DataSources that are already globally-bound on the client.

    The special value of "*" can be specified for this property to indicate that all DataSources should be omitted.

    Note that, unless `omitLoadedDataSources` is false, all loaded DataSources will by default be added to whatever value you provide (making that also the default for this property).

    Parameters:
      `omitDataSources` - New omitDataSources value. Default value is varies
    Returns:
      `LoadScreenSettings` instance, for chaining setter calls
    See Also:
      - `Identifier`

  - ### getOmitDataSources

    public String[] getOmitDataSources()
    DataSource IDs in the screen to skip and not load when the screen is loaded. It is assumed that these IDs represent DataSources that are already globally-bound on the client.

    The special value of "*" can be specified for this property to indicate that all DataSources should be omitted.

    Note that, unless `omitLoadedDataSources` is false, all loaded DataSources will by default be added to whatever value you provide (making that also the default for this property).

    Returns:
      Current omitDataSources value. Default value is varies
    See Also:
      - `Identifier`

  - ### setOmitLoadedDataSources

    public LoadScreenSettings setOmitLoadedDataSources(boolean omitLoadedDataSources)
    Whether to implicitly add all DataSources currently loaded on the client to `omitDataSources` in `RPCManager.loadScreen()`. Setting this false would only make sense in connection with setting `clobberDataSources` true, and would create more potential work for the server since many more DataSources could be output.

    Note that here we consider the "loaded DataSources" to be those that are registered with the DataSource module (i.e. available by ID via `DataSource.get()`), regardless of whether they're actually bound to the browser `window` object.

    Parameters:
      `omitLoadedDataSources` - New omitLoadedDataSources value. Default value is true
    Returns:
      `LoadScreenSettings` instance, for chaining setter calls

  - ### getOmitLoadedDataSources

    public boolean getOmitLoadedDataSources()
    Whether to implicitly add all DataSources currently loaded on the client to `omitDataSources` in `RPCManager.loadScreen()`. Setting this false would only make sense in connection with setting `clobberDataSources` true, and would create more potential work for the server since many more DataSources could be output.

    Note that here we consider the "loaded DataSources" to be those that are registered with the DataSource module (i.e. available by ID via `DataSource.get()`), regardless of whether they're actually bound to the browser `window` object.

    Returns:
      Current omitLoadedDataSources value. Default value is true

  - ### setRequestProperties

    public LoadScreenSettings setRequestProperties(RPCRequest requestProperties)
    Specifies optional `RPCRequest` properties for the request.
    Parameters:
      `requestProperties` - New requestProperties value. Default value is null
    Returns:
      `LoadScreenSettings` instance, for chaining setter calls

  - ### getRequestProperties

    public RPCRequest getRequestProperties()
    Specifies optional `RPCRequest` properties for the request.
    Returns:
      Current requestProperties value. Default value is null

  - ### setSuppressAutoDraw

    public LoadScreenSettings setSuppressAutoDraw(Boolean suppressAutoDraw)
    If true, prevents any screen from being drawn when it's loaded, even if there's an explicit `Canvas.autoDraw`:true setting on it.
    Parameters:
      `suppressAutoDraw` - New suppressAutoDraw value. Default value is true
    Returns:
      `LoadScreenSettings` instance, for chaining setter calls

  - ### getSuppressAutoDraw

    public Boolean getSuppressAutoDraw()
    If true, prevents any screen from being drawn when it's loaded, even if there's an explicit `Canvas.autoDraw`:true setting on it.
    Returns:
      Current suppressAutoDraw value. Default value is true

  - ### setVerifyAsError

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

  - ### getVerifyAsError

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

  - ### setVerifyComponents

    public LoadScreenSettings setVerifyComponents(Map<String,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 the presence of Tabs, SectionStackSections, and FormItems by providing their names following the parent component's id in dot-separated notation. Example:

            {
              'mainTabSet.customersTab': 'ImgTab',
              'mainSectionStack.customerStackSection': 'SectionStackSection',
              '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:
      `LoadScreenSettings` instance, for chaining setter calls
    See Also:
      - `RPCManager.loadScreen(java.lang.String, com.smartgwt.client.rpc.LoadScreenCallback)`

  - ### getVerifyComponents

    public Map<String,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 the presence of Tabs, SectionStackSections, and FormItems by providing their names following the parent component's id in dot-separated notation. Example:

            {
              'mainTabSet.customersTab': 'ImgTab',
              'mainSectionStack.customerStackSection': 'SectionStackSection',
              '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.loadScreen(java.lang.String, com.smartgwt.client.rpc.LoadScreenCallback)`

  - ### setWillHandleError

    public LoadScreenSettings setWillHandleError(Boolean willHandleError)
    Whether to call the provided callback even if an error was encountered trying to load the screen (or it was simply not found), so that you can run your own error handling. In this case, the screen and "suppressed globals" will be reported as null.

    Note that for backward compatibility, the default of null means that the callback will still happen if the screen is not found, but not for a response with a server error. To have all such cases handled automatically, set this property explicitly false.

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

  - ### getWillHandleError

    public Boolean getWillHandleError()
    Whether to call the provided callback even if an error was encountered trying to load the screen (or it was simply not found), so that you can run your own error handling. In this case, the screen and "suppressed globals" will be reported as null.

    Note that for backward compatibility, the default of null means that the callback will still happen if the screen is not found, but not for a response with a server error. To have all such cases handled automatically, set this property explicitly false.

    Returns:
      Current willHandleError value. Default value is null