|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface AdminConsole
The Admin Console allows you to configure database access for DataSources that use
SmartGWT's built-in 'SQL engine'
.
NOTE: You must have the Isomorphic SmartGWT package installed and your servlet engine started.
Direct your browser to the following URL to access the Admin Console:
http://localhost:8080/tools/adminConsole.jsp
The common default servlet engine port 8080 is used in the URL given above. Adjust your URL as necessary if you are using a different port and replace localhost with the machine name running the servlet engine if you are accessing it from a remote machine.
Note that the Admin Console interface is also available in the Developer Console as the "DataBases" tab.
Test Data
You can create a test file that contains a sample dataset which can be imported into your database table with the Admin Console.
The test file to use with your DataSource is specified in the testFileName
DataSource configuration property. The test file uses the extension .data.xml.
The test data file should consist of a top-level <List> element containing a series of XML elements named after your DataSource's ID, each of which creates one DataSource record. Values for each field are given within tags named after the field name.
For example, the following XML is from the supplyItem.data.xml test data file supplied with the Isomorphic SmartGWT package. This file is located in [webroot]/examples/shared/ds/test_data/.
<List> <supplyItem> <description>A revolutionary cushion-grip ballpoint pen that reduces required gripping power, relieving stress and alleviating writing fatigue. Excellent for people who suffer from arthritis or carpal tunnel syndrome. Medium point, black ink. Refillable.</description> <category>1</category> <itemRef>ODC 204-502-153</itemRef> <maxQuantity>5</maxQuantity> <requiresJustification>0</requiresJustification> <itemName>Dr. Grip Pens -- Blue Barrel</itemName> <itemID>1</itemID> <unitCost>4.99</unitCost> </supplyItem> <supplyItem> <description>A revolutionary cushion-grip ballpoint pen that reduces required gripping power, relieving stress and alleviating writing fatigue. Excellent for people who suffer from arthritis or carpal tunnel syndrome. Medium point, black ink. Refillable.</description> <category>1</category> <itemRef>ODC 204-708-834</itemRef> <maxQuantity>5</maxQuantity> <requiresJustification>0</requiresJustification> <itemName>Dr. Grip Pens -- Black Barrel</itemName> <itemID>2</itemID> <unitCost>4.99</unitCost> </supplyItem> <supplyItem> <description>Personalized business cards for all your networking needs.</description> <category>2</category> <itemRef></itemRef> <maxQuantity>500</maxQuantity> <requiresJustification>1</requiresJustification> <itemName>Personalized business cards -- 500 count</itemName> <itemID>3</itemID> <unitCost>25.00</unitCost> </supplyItem> ... <List/>Data for a tree-like DataSource can be specified with the same format. The following code example is from the supplyCategory.data.xml test data file. This file is also located in [webroot]/examples/shares/ds/test_data/.
<List> <supplyCategory> <itemName>Office Paper Products</itemName> <parentID>root</parentID> </supplyCategory> <supplyCategory> <itemName>Calculator Rolls</itemName> <parentID>Office Paper Products</parentID> </supplyCategory> <supplyCategory> <itemName>Adding Machine/calculator Roll</itemName> <parentID>Calculator Rolls</parentID> </supplyCategory> . . . </List>Notice that all records must define values for the itemName primary key field and for the parentID field that establishes the tree relationship.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |