Class LoadScreenSettings
- All Implemented Interfaces:
HasHandlers
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
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionCaches screen much likeRPCManager.cacheScreens()
, soRPCManager.isScreenCached()
reports true.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.The name of a locale to use for resolving i18n tags in the component XML of the screen.If true, server logic does not crash out if it cannot load a DataSource specified in the screen definition.String[]
DataSource IDs in the screen to skip and not load when the screen is loaded.boolean
Whether to implicitly add all DataSources currently loaded on the client toomitDataSources
inRPCManager.loadScreen()
.static LoadScreenSettings
getOrCreateRef
(JavaScriptObject jsObj) Specifies optionalRPCRequest
properties for the request.If true, prevents any screen from being drawn when it's loaded, even if there's an explicitCanvas.autoDraw
:true setting on it.EnableverifyAsError
behavior only for requests using these settings.Enables verification that the created screen contains a component having alocalId
equal to the given key, and that it is an instance (or subclass) if the key's value.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.setCacheScreen
(Boolean cacheScreen) Caches screen much likeRPCManager.cacheScreens()
, soRPCManager.isScreenCached()
reports true.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.The name of a locale to use for resolving i18n tags in the component XML of the screen.setMissingDSIsNotFatal
(Boolean missingDSIsNotFatal) If true, server logic does not crash out if it cannot load a DataSource specified in the screen definition.setOmitDataSources
(String... omitDataSources) DataSource IDs in the screen to skip and not load when the screen is loaded.setOmitLoadedDataSources
(boolean omitLoadedDataSources) Whether to implicitly add all DataSources currently loaded on the client toomitDataSources
inRPCManager.loadScreen()
.setRequestProperties
(RPCRequest requestProperties) Specifies optionalRPCRequest
properties for the request.setSuppressAutoDraw
(Boolean suppressAutoDraw) If true, prevents any screen from being drawn when it's loaded, even if there's an explicitCanvas.autoDraw
:true setting on it.setVerifyAsError
(Boolean verifyAsError) EnableverifyAsError
behavior only for requests using these settings.setVerifyComponents
(Map<String, String> verifyComponents) Enables verification that the created screen contains a component having alocalId
equal to the given key, and that it is an instance (or subclass) if the key's value.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
-
Constructor Details
-
LoadScreenSettings
public LoadScreenSettings() -
LoadScreenSettings
-
-
Method Details
-
getOrCreateRef
-
setCacheScreen
Caches screen much likeRPCManager.cacheScreens()
, soRPCManager.isScreenCached()
reports true.- Parameters:
cacheScreen
- New cacheScreen value. Default value is false- Returns:
LoadScreenSettings
instance, for chaining setter calls
-
getCacheScreen
Caches screen much likeRPCManager.cacheScreens()
, soRPCManager.isScreenCached()
reports true.- Returns:
- Current cacheScreen value. Default value is false
-
setClobberDataSources
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 browserwindow
object.- Parameters:
clobberDataSources
- New clobberDataSources value. Default value is false- Returns:
LoadScreenSettings
instance, for chaining setter calls
-
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 browserwindow
object.- Returns:
- Current clobberDataSources value. Default value is false
-
setLocale
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
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
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 anunableToLoad
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
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 anunableToLoad
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
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:
-
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:
-
setOmitLoadedDataSources
Whether to implicitly add all DataSources currently loaded on the client toomitDataSources
inRPCManager.loadScreen()
. Setting this false would only make sense in connection with settingclobberDataSources
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 browserwindow
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 toomitDataSources
inRPCManager.loadScreen()
. Setting this false would only make sense in connection with settingclobberDataSources
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 browserwindow
object.- Returns:
- Current omitLoadedDataSources value. Default value is true
-
setRequestProperties
Specifies optionalRPCRequest
properties for the request.- Parameters:
requestProperties
- New requestProperties value. Default value is null- Returns:
LoadScreenSettings
instance, for chaining setter calls
-
getRequestProperties
Specifies optionalRPCRequest
properties for the request.- Returns:
- Current requestProperties value. Default value is null
-
setSuppressAutoDraw
If true, prevents any screen from being drawn when it's loaded, even if there's an explicitCanvas.autoDraw
:true setting on it.- Parameters:
suppressAutoDraw
- New suppressAutoDraw value. Default value is true- Returns:
LoadScreenSettings
instance, for chaining setter calls
-
getSuppressAutoDraw
If true, prevents any screen from being drawn when it's loaded, even if there's an explicitCanvas.autoDraw
:true setting on it.- Returns:
- Current suppressAutoDraw value. Default value is true
-
setVerifyAsError
EnableverifyAsError
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:
-
getVerifyAsError
EnableverifyAsError
behavior only for requests using these settings.- Returns:
- Current verifyAsError value. Default value is null
- See Also:
-
setVerifyComponents
Enables verification that the created screen contains a component having alocalId
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 settingverifyAsError
orverifyAsError
.- Parameters:
verifyComponents
- New verifyComponents value. Default value is null- Returns:
LoadScreenSettings
instance, for chaining setter calls- See Also:
-
getVerifyComponents
Enables verification that the created screen contains a component having alocalId
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 settingverifyAsError
orverifyAsError
.- Returns:
- Current verifyComponents value. Default value is null
- See Also:
-
setWillHandleError
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
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
-