Class LoadProjectSettings
- All Implemented Interfaces:
HasHandlers
ProjectLoaderServlet
. There is no need to instantiate an LoadProjectSettings 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 TypeMethodDescriptionShould Placeholders in loaded screens be rendered as placeholders? If property is not set actual components are created instead of the Placeholders.Should DataSources referenced by thefirst screen
clobber existing, globally-bound DataSources on the client if 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.The name of the screen within the project to return first when loading.DataContext
that will be provided to the top-level component asdataContext
in each screen cached for the project.boolean
Determines whether thecurrentScreenName
screen is drawn after all screens have been loaded.The name of a locale to use for resolving i18n tags in the component XML of the screen.String[]
DataSource IDs in the project to skip and not load when the project is loaded.boolean
Whether to implicitly add all DataSources currently loaded on the client toomitDataSources
inRPCManager.loadProject()
.static LoadProjectSettings
getOrCreateRef
(JavaScriptObject jsObj) Use this attribute to specify a project owner.Overridespassword
setting the account password forReify.loadProject()
.Path relative to theserver root
, to target to use the project loader servlet, instead ofprojectLoaderPath
.Allows customizing the projectLoader servlet request properties.A comma-separated string containing the names of screens within the project that should be loaded.URL of Reify server to use when callingReify.loadProject()
instead ofserverURL
.Sets the timeout for the projectLoader servlet request.OverridesuserName
setting the account name forReify.loadProject()
.EnableverifyAsError
behavior only for requests using these settings.Enables verification that any screencreated
on load contains a component having alocalId
equal to the given key, and that it is an instance (or subclass) of the key's value.Enables DataSource verification, causing warnings to be output about differences between DataSources loaded with a project vs those that are already present in the page (if any are present).boolean
Whether to call the provided callback even if an error was encountered trying to load the project, so that you can run your own error handling.setAllowPlaceholders
(Boolean allowPlaceholders) Should Placeholders in loaded screens be rendered as placeholders? If property is not set actual components are created instead of the Placeholders.setClobberDataSources
(Boolean clobberDataSources) Should DataSources referenced by thefirst screen
clobber existing, globally-bound DataSources on the client if 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.setCurrentScreenName
(String currentScreenName) The name of the screen within the project to return first when loading.setDataContext
(DataContext dataContext) DataContext
that will be provided to the top-level component asdataContext
in each screen cached for the project.setDrawFirstScreen
(boolean drawFirstScreen) Determines whether thecurrentScreenName
screen is drawn after all screens have been loaded.The name of a locale to use for resolving i18n tags in the component XML of the screen.setOmitDataSources
(String... omitDataSources) DataSource IDs in the project to skip and not load when the project is loaded.setOmitLoadedDataSources
(boolean omitLoadedDataSources) Whether to implicitly add all DataSources currently loaded on the client toomitDataSources
inRPCManager.loadProject()
.setOwnerId
(String ownerId) Use this attribute to specify a project owner.setPassword
(String password) Overridespassword
setting the account password forReify.loadProject()
.setProjectLoaderPath
(String projectLoaderPath) Path relative to theserver root
, to target to use the project loader servlet, instead ofprojectLoaderPath
.setRequestProperties
(RPCRequest requestProperties) Allows customizing the projectLoader servlet request properties.setScreenNames
(String screenNames) A comma-separated string containing the names of screens within the project that should be loaded.setServerURL
(String serverURL) URL of Reify server to use when callingReify.loadProject()
instead ofserverURL
.setTimeout
(Integer timeout) Sets the timeout for the projectLoader servlet request.setUserName
(String userName) OverridesuserName
setting the account name forReify.loadProject()
.setVerifyAsError
(Boolean verifyAsError) EnableverifyAsError
behavior only for requests using these settings.setVerifyComponents
(Map<String, String> verifyComponents) Enables verification that any screencreated
on load contains a component having alocalId
equal to the given key, and that it is an instance (or subclass) of the key's value.setVerifyDataSources
(Boolean verifyDataSources) Enables DataSource verification, causing warnings to be output about differences between DataSources loaded with a project vs those that are already present in the page (if any are present).setWillHandleError
(boolean willHandleError) Whether to call the provided callback even if an error was encountered trying to load the project, 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
-
LoadProjectSettings
public LoadProjectSettings() -
LoadProjectSettings
-
-
Method Details
-
getOrCreateRef
-
setAllowPlaceholders
Should Placeholders in loaded screens 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:
LoadProjectSettings
instance, for chaining setter calls
-
getAllowPlaceholders
Should Placeholders in loaded screens 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
-
setClobberDataSources
Should DataSources referenced by thefirst screen
clobber existing, globally-bound DataSources on the client if 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.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.Note that this setting only has an impact if
drawFirstScreen
is true.- Parameters:
clobberDataSources
- New clobberDataSources value. Default value is false- Returns:
LoadProjectSettings
instance, for chaining setter calls
-
getClobberDataSources
Should DataSources referenced by thefirst screen
clobber existing, globally-bound DataSources on the client if 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.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.Note that this setting only has an impact if
drawFirstScreen
is true.- Returns:
- Current clobberDataSources value. Default value is false
-
setCurrentScreenName
The name of the screen within the project to return first when loading. A null value means to use the currentScreenName as specified in the project file.This setting only affects the first project specified in the
projectNames
argument toRPCManager.loadProject()
.- Parameters:
currentScreenName
- New currentScreenName value. Default value is null- Returns:
LoadProjectSettings
instance, for chaining setter calls
-
getCurrentScreenName
The name of the screen within the project to return first when loading. A null value means to use the currentScreenName as specified in the project file.This setting only affects the first project specified in the
projectNames
argument toRPCManager.loadProject()
.- Returns:
- Current currentScreenName value. Default value is null
-
setDataContext
DataContext
that will be provided to the top-level component asdataContext
in each screen cached for the project.To understand how
dataContext
is used to automatically populateDataBoundComponents
, seeCanvas.autoPopulateData
.- Parameters:
dataContext
- New dataContext value. Default value is null- Returns:
LoadProjectSettings
instance, for chaining setter calls
-
getDataContext
DataContext
that will be provided to the top-level component asdataContext
in each screen cached for the project.To understand how
dataContext
is used to automatically populateDataBoundComponents
, seeCanvas.autoPopulateData
.- Returns:
- Current dataContext value. Default value is null
-
setDrawFirstScreen
Determines whether thecurrentScreenName
screen is drawn after all screens have been loaded. If not drawn, the screen will not be created.This setting only affects the first project specified in the
projectNames
argument toRPCManager.loadProject()
.- Parameters:
drawFirstScreen
- New drawFirstScreen value. Default value is false- Returns:
LoadProjectSettings
instance, for chaining setter calls- See Also:
-
getDrawFirstScreen
public boolean getDrawFirstScreen()Determines whether thecurrentScreenName
screen is drawn after all screens have been loaded. If not drawn, the screen will not be created.This setting only affects the first project specified in the
projectNames
argument toRPCManager.loadProject()
.- Returns:
- Current drawFirstScreen value. Default value is false
- See Also:
-
setLocale
The name of a locale to use for resolving i18n tags in the component XML of the screen. The default value of null omits locale loading, which effectively means the framework default "en" locale is used.- Parameters:
locale
- New locale value. Default value is null- Returns:
LoadProjectSettings
instance, for chaining setter calls
-
getLocale
The name of a locale to use for resolving i18n tags in the component XML of the screen. The default value of null omits locale loading, which effectively means the framework default "en" locale is used.- Returns:
- Current locale value. Default value is null
-
setOmitDataSources
DataSource IDs in the project to skip and not load when the project 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:
LoadProjectSettings
instance, for chaining setter calls- See Also:
-
getOmitDataSources
DataSource IDs in the project to skip and not load when the project 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.loadProject()
. 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:
LoadProjectSettings
instance, for chaining setter calls
-
getOmitLoadedDataSources
public boolean getOmitLoadedDataSources()Whether to implicitly add all DataSources currently loaded on the client toomitDataSources
inRPCManager.loadProject()
. 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
-
setOwnerId
Use this attribute to specify a project owner. Only applicable if project source supports owner identification.- Parameters:
ownerId
- New ownerId value. Default value is null- Returns:
LoadProjectSettings
instance, for chaining setter calls
-
getOwnerId
Use this attribute to specify a project owner. Only applicable if project source supports owner identification.- Returns:
- Current ownerId value. Default value is null
-
setPassword
Overridespassword
setting the account password forReify.loadProject()
.Note that this setting only applies when using
Reify.loadProject()
.- Parameters:
password
- New password value. Default value is varies- Returns:
LoadProjectSettings
instance, for chaining setter calls
-
getPassword
Overridespassword
setting the account password forReify.loadProject()
.Note that this setting only applies when using
Reify.loadProject()
.- Returns:
- Current password value. Default value is varies
-
setProjectLoaderPath
Path relative to theserver root
, to target to use the project loader servlet, instead ofprojectLoaderPath
.Note that this setting only applies when using
Reify.loadProject()
.- Parameters:
projectLoaderPath
- New projectLoaderPath value. Default value is varies- Returns:
LoadProjectSettings
instance, for chaining setter calls
-
getProjectLoaderPath
Path relative to theserver root
, to target to use the project loader servlet, instead ofprojectLoaderPath
.Note that this setting only applies when using
Reify.loadProject()
.- Returns:
- Current projectLoaderPath value. Default value is varies
-
setRequestProperties
Allows customizing the projectLoader servlet request properties. Properties that conflict with proper operation of the servlet will be overridden byRPCManager.loadProject()
.Note : This is an advanced setting
- Parameters:
requestProperties
- New requestProperties value. Default value is null- Returns:
LoadProjectSettings
instance, for chaining setter calls
-
getRequestProperties
Allows customizing the projectLoader servlet request properties. Properties that conflict with proper operation of the servlet will be overridden byRPCManager.loadProject()
.- Returns:
- Current requestProperties value. Default value is null
-
setScreenNames
A comma-separated string containing the names of screens within the project that should be loaded. A null value causes all screens to be loaded.This setting only affects the first project specified in the
projectNames
argument toRPCManager.loadProject()
.- Parameters:
screenNames
- New screenNames value. Default value is null- Returns:
LoadProjectSettings
instance, for chaining setter calls
-
getScreenNames
A comma-separated string containing the names of screens within the project that should be loaded. A null value causes all screens to be loaded.This setting only affects the first project specified in the
projectNames
argument toRPCManager.loadProject()
.- Returns:
- Current screenNames value. Default value is null
-
setServerURL
URL of Reify server to use when callingReify.loadProject()
instead ofserverURL
.Note that this setting only applies when using
Reify.loadProject()
.- Parameters:
serverURL
- New serverURL value. Default value is varies- Returns:
LoadProjectSettings
instance, for chaining setter calls- See Also:
-
getServerURL
URL of Reify server to use when callingReify.loadProject()
instead ofserverURL
.Note that this setting only applies when using
Reify.loadProject()
.- Returns:
- Current serverURL value. Default value is varies
- See Also:
-
setTimeout
Sets the timeout for the projectLoader servlet request. This is a convenience property so thatrequestProperties
need not be set. If unset, the timeout is determined bydefaultTimeout
.Note : This is an advanced setting
- Parameters:
timeout
- New timeout value. Default value is null- Returns:
LoadProjectSettings
instance, for chaining setter calls
-
getTimeout
Sets the timeout for the projectLoader servlet request. This is a convenience property so thatrequestProperties
need not be set. If unset, the timeout is determined bydefaultTimeout
.- Returns:
- Current timeout value. Default value is null
-
setUserName
OverridesuserName
setting the account name forReify.loadProject()
.Note that this setting only applies when using
Reify.loadProject()
.- Parameters:
userName
- New userName value. Default value is varies- Returns:
LoadProjectSettings
instance, for chaining setter calls
-
getUserName
OverridesuserName
setting the account name forReify.loadProject()
.Note that this setting only applies when using
Reify.loadProject()
.- Returns:
- Current userName value. Default value is varies
-
setVerifyAsError
EnableverifyAsError
behavior only for requests using these settings.- Parameters:
verifyAsError
- New verifyAsError value. Default value is null- Returns:
LoadProjectSettings
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 any screencreated
on load contains a component having alocalId
equal to the given key, and that it is an instance (or subclass) of 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:
LoadProjectSettings
instance, for chaining setter calls- See Also:
-
getVerifyComponents
Enables verification that any screencreated
on load contains a component having alocalId
equal to the given key, and that it is an instance (or subclass) of 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:
-
setVerifyDataSources
Enables DataSource verification, causing warnings to be output about differences between DataSources loaded with a project vs those that are already present in the page (if any are present). Findings are always reported to the console, and may also be presented to the user with a warning dialog by settingverifyAsError
. For discussion of which issues will be reported and how, seeDataSource.verifyDataSourcePair()
.Setting this property will default
omitLoadedDataSources
to false, and will cause the specialomitDataSources
value of "*" to be ignored (but not other ID values). It's important to keep in mind when using this property that loading a project with all of its DataSources can be very slow, if there is a large amount of test data, for example.Note that this behavior can be enabled globally by setting
verifyDataSources
to true. It often makes sense to set it there during development, and turn off in production, since it slightly slows down DataSource loading.- Parameters:
verifyDataSources
- New verifyDataSources value. Default value is null- Returns:
LoadProjectSettings
instance, for chaining setter calls- See Also:
-
getVerifyDataSources
Enables DataSource verification, causing warnings to be output about differences between DataSources loaded with a project vs those that are already present in the page (if any are present). Findings are always reported to the console, and may also be presented to the user with a warning dialog by settingverifyAsError
. For discussion of which issues will be reported and how, seeDataSource.verifyDataSourcePair()
.Setting this property will default
omitLoadedDataSources
to false, and will cause the specialomitDataSources
value of "*" to be ignored (but not other ID values). It's important to keep in mind when using this property that loading a project with all of its DataSources can be very slow, if there is a large amount of test data, for example.Note that this behavior can be enabled globally by setting
verifyDataSources
to true. It often makes sense to set it there during development, and turn off in production, since it slightly slows down DataSource loading.- Returns:
- Current verifyDataSources value. Default value is null
- See Also:
-
setWillHandleError
Whether to call the provided callback even if an error was encountered trying to load the project, so that you can run your own error handling. In this case, the list of projects loaded by the callback will be reported as empty.If true, the framework won't log any messages specifically reporting the failure to load the requested projects, but depending on the situation, the browser itself may report errors from the servlet request in the console.
- Parameters:
willHandleError
- New willHandleError value. Default value is false- Returns:
LoadProjectSettings
instance, for chaining setter calls- See Also:
-
getWillHandleError
public boolean getWillHandleError()Whether to call the provided callback even if an error was encountered trying to load the project, so that you can run your own error handling. In this case, the list of projects loaded by the callback will be reported as empty.If true, the framework won't log any messages specifically reporting the failure to load the requested projects, but depending on the situation, the browser itself may report errors from the servlet request in the console.
- Returns:
- Current willHandleError value. Default value is false
- See Also:
-