Package com.smartgwt.client.rpc
Class Project
java.lang.Object
com.smartgwt.client.core.BaseClass
com.smartgwt.client.rpc.Project
- All Implemented Interfaces:
- HasHandlers
Represents a 
Reify project loaded from the server via RPCManager.loadProject().  A project contains cached screens and DataSources that can be used to create actual screens by calling createScreen() or createStartScreen().- 
Field SummaryFields inherited from class com.smartgwt.client.core.BaseClassconfig, configOnly, factoryCreated, factoryProperties, id, scClassName
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptioncreate()createScreen(String screenName) Creates a screen from screen definitions cached in theProject.createScreen(String screenName, CreateScreenSettings settings) Creates a screen from screen definitions cached in theProject.createScreen(String screenName, String[] globals) Creates screen from first definition cached in the project.createStartScreen(CreateScreenSettings settings) Creates screen from first definition cached in the project.createStartScreen(String... settings) Creates screen from first definition cached in the project.voiddestroy()Releases cached screens andDataSourcesassociated with this project, and unregisters it soget()no longer can find it by name.static ProjectReturns a cached project given its name.getDataSource(String ID) Returns an instance of the requestedDataSourceby creating it from the project's cache.String[]Return the names of theDataSourcescached in this project.getJsObj()static ProjectgetOrCreateRef(JavaScriptObject jsObj) String[]Return the names of the screens cached in this project.booleanvoidMethods inherited from class com.smartgwt.client.core.BaseClassaddDynamicProperty, addDynamicProperty, addDynamicProperty, addDynamicProperty, applyFactoryProperties, asSGWTComponent, clearDynamicProperty, createJsObj, doAddHandler, doInit, error, error, errorIfNotCreated, fireEvent, getAttribute, getAttributeAsBoolean, getAttributeAsDate, getAttributeAsDouble, getAttributeAsElement, getAttributeAsFloat, getAttributeAsInt, getAttributeAsJavaScriptObject, getAttributeAsMap, getAttributeAsString, getAttributeAsStringArray, getClassName, getConfig, getHandlerCount, getID, getRef, getRuleScope, getScClassName, getTestInstance, hasAutoAssignedID, hasDynamicProperty, internalSetID, internalSetID, isConfigOnly, isFactoryCreated, onBind, onInit, registerID, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setConfig, setConfigOnly, setFactoryCreated, setID, setProperty, setProperty, setProperty, setProperty, setRuleScope, setScClassName
- 
Constructor Details- 
Projectpublic Project()
- 
Project
 
- 
- 
Method Details- 
getOrCreateRef
- 
setJavaScriptObject- Overrides:
- setJavaScriptObjectin class- BaseClass
 
- 
create
- 
isCreatedpublic boolean isCreated()
- 
getJsObj
- 
getOrCreateJsObj- Overrides:
- getOrCreateJsObjin class- BaseClass
 
- 
createScreenCreates a screen from screen definitions cached in theProject.- Parameters:
- screenName- name of screen to create
- Returns:
- last top-level widget in the screen definition
- See Also:
 
- 
createScreenCreates a screen from screen definitions cached in theProject.- Parameters:
- screenName- name of screen to create
- settings- widgets to allow to take their global IDs, or a widget remap config
- Returns:
- last top-level widget in the screen definition
- See Also:
 
- 
createStartScreenCreates screen from first definition cached in the project.- Returns:
- last top-level widget in the screen definition
- See Also:
 
- 
createStartScreenCreates screen from first definition cached in the project.- Parameters:
- settings- widgets to allow to take their global IDs, or a widget remap config
- Returns:
- last top-level widget in the screen definition
- See Also:
 
- 
createStartScreenCreates screen from first definition cached in the project.- Parameters:
- settings- widgets to allow to take their global IDs, or a widget remap config
- Returns:
- last top-level widget in the screen definition
- See Also:
 
- 
destroypublic void destroy()Releases cached screens andDataSourcesassociated with this project, and unregisters it soget()no longer can find it by name. After destroying a project, it is an error to call any instance method on it.
- 
getDataSourceReturns an instance of the requestedDataSourceby creating it from the project's cache. If the ID is not globally bound, the framework will globally bind the instance before returning it.Note that when a screen cached in the project is created, all project DataSources in the screen will be automatically instantiated from the project cache, so this method need not be called before creating a screen just to ensure its DataSources are available. - Parameters:
- ID- ID of the DataSource to create. See- Identifier
- Returns:
- requested DataSource instance
- See Also:
 
- 
getDataSourceNamesReturn the names of theDataSourcescached in this project.- Returns:
- names of cached DataSources
 
- 
getScreenNamesReturn the names of the screens cached in this project.- Returns:
- names of cached screens
- See Also:
 
- 
getReturns a cached project given its name.- Parameters:
- projectName- name of project to retrieve
- Returns:
- cached project, or null if it's not cached
 
- 
createScreen- Parameters:
- screenName- name of screen to create
- globals- widgets to allow to take their global IDs, or a widget remap config
- Returns:
- last top-level widget in the screen definition
 
 
-