Package com.smartgwt.client.data
Class DSLoadSettings
java.lang.Object
com.smartgwt.client.core.JsObject
com.smartgwt.client.core.DataClass
com.smartgwt.client.data.DSLoadSettings
- All Implemented Interfaces:
HasHandlers
Settings to control optional
DataSource loading features.-
Field Summary
Fields inherited from class com.smartgwt.client.core.DataClass
factoryCreated, factoryProperties -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionTreat a requested DataSource that does not exist on the server as an ordinary outcome rather than an error: it is skipped without any error on the client or the server, the callback fires as usual, andDataSource.get()returns null for it.Forcibly reload a dataSource if it's already loaded.Load parent DataSources automatically for DataSources that have aninheritsFromdefined.Place loaded DataSource intomockModestatic DSLoadSettingsgetOrCreateRef(JavaScriptObject jsObj) setAllowMissing(Boolean allowMissing) Treat a requested DataSource that does not exist on the server as an ordinary outcome rather than an error: it is skipped without any error on the client or the server, the callback fires as usual, andDataSource.get()returns null for it.setForceReload(Boolean forceReload) Forcibly reload a dataSource if it's already loaded.setLoadParents(Boolean loadParents) Load parent DataSources automatically for DataSources that have aninheritsFromdefined.setMockMode(Boolean mockMode) Place loaded DataSource intomockModeMethods 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
-
DSLoadSettings
public DSLoadSettings() -
DSLoadSettings
-
-
Method Details
-
getOrCreateRef
-
setAllowMissing
Treat a requested DataSource that does not exist on the server as an ordinary outcome rather than an error: it is skipped without any error on the client or the server, the callback fires as usual, andDataSource.get()returns null for it. Use this when a DataSource is legitimately present in some deployments and absent in others, for example one belonging to an optional server feature, and the page should check for it and adapt.Only a DataSource that is not defined at all is treated this way. One that is defined but cannot be loaded, or a missing parent loaded through
loadParents, is still reported as an error.- Parameters:
allowMissing- New allowMissing value. Default value is null- Returns:
DSLoadSettingsinstance, for chaining setter calls
-
getAllowMissing
Treat a requested DataSource that does not exist on the server as an ordinary outcome rather than an error: it is skipped without any error on the client or the server, the callback fires as usual, andDataSource.get()returns null for it. Use this when a DataSource is legitimately present in some deployments and absent in others, for example one belonging to an optional server feature, and the page should check for it and adapt.Only a DataSource that is not defined at all is treated this way. One that is defined but cannot be loaded, or a missing parent loaded through
loadParents, is still reported as an error.- Returns:
- Current allowMissing value. Default value is null
-
setForceReload
Forcibly reload a dataSource if it's already loaded.- Parameters:
forceReload- New forceReload value. Default value is null- Returns:
DSLoadSettingsinstance, for chaining setter calls
-
getForceReload
Forcibly reload a dataSource if it's already loaded.- Returns:
- Current forceReload value. Default value is null
-
setLoadParents
Load parent DataSources automatically for DataSources that have aninheritsFromdefined. Otherwise a DataSource with inheritsFrom will be broken if the parent DataSource is not already loaded.- Parameters:
loadParents- New loadParents value. Default value is null- Returns:
DSLoadSettingsinstance, for chaining setter calls
-
getLoadParents
Load parent DataSources automatically for DataSources that have aninheritsFromdefined. Otherwise a DataSource with inheritsFrom will be broken if the parent DataSource is not already loaded.- Returns:
- Current loadParents value. Default value is null
-
setMockMode
Place loaded DataSource intomockMode- Parameters:
mockMode- New mockMode value. Default value is null- Returns:
DSLoadSettingsinstance, for chaining setter calls
-
getMockMode
Place loaded DataSource intomockMode- Returns:
- Current mockMode value. Default value is null
-