I have a DataSource (Oracle) that looks like:
Using the client-side class com.smartgwt.client.data.DataSource, I am able to read out the following XML attributes:
But these "get" attempts return null:
My questions are:
- Is it possible to read the "schema" attribute from a DataSource?
- From Client side?
- From Server side?
Is it possible to WRITE the schema attribute to a DataSource? I think I would just need it in memory, for the duration of the session, not an actual write to the DataSource XML file.
MY LARGER GOAL is to be able to more easily between switch target deployment environments (DEV to TEST to PROD) by a variable in Java code.
I know I can switch db connection info w/ the server-side Config class; and I can supply other values I need as Velocity variables (e.g., ${urlHostname}, ${urlTargetSuffix}, etc).
I'm just hung up on the DataSource "schema" attribute (and "dbName"). I'm guessing these two are withheld for security reasons?
Any guidance appreciated, thanks.
Code:
<DataSource schema="Bob" dbName="Dobalina" tableName="REQUESTS" ID="REQUESTS" dataSourceVersion="1" serverType="sql" justSomethingIMadeUp="shabammy" > <fields>...
Code:
System.out.println("dbName: " + requests.getAttribute("dbName")); System.out.println("ID: " + requests.getAttribute("ID")); System.out.println("dataSourceVersion: " + requests.getAttributeAsInt("dataSourceVersion")); System.out.println("serverType: " + requests.getAttribute("serverType")); System.out.println("justSomethingIMadeUp: " + requests.getAttribute("justSomethingIMadeUp"));
Code:
System.out.println("schema: " + requests.getAttribute("schema")); System.out.println("tableName: " + requests.getAttribute("tableName"));
- Is it possible to read the "schema" attribute from a DataSource?
- From Client side?
- From Server side?
Is it possible to WRITE the schema attribute to a DataSource? I think I would just need it in memory, for the duration of the session, not an actual write to the DataSource XML file.
MY LARGER GOAL is to be able to more easily between switch target deployment environments (DEV to TEST to PROD) by a variable in Java code.
I know I can switch db connection info w/ the server-side Config class; and I can supply other values I need as Velocity variables (e.g., ${urlHostname}, ${urlTargetSuffix}, etc).
I'm just hung up on the DataSource "schema" attribute (and "dbName"). I'm guessing these two are withheld for security reasons?
Any guidance appreciated, thanks.
Comment