Hi,
I am working on SmartGWT Enterprise Edition version "12.1-p20200926".
I was trying the audit data sources and for the same made the following DS:
As per the documentation, A new DB table with the name "audit_XYZSQL" was created and all the changes done to audited ListGrid (with DS XYZSQL) are being persisted in the audit DB table.
When I try to fetch the ds by simple
, it always returns null. Also, I am trying to use "audit_XYZSQL" as a DS in my seperate ListGrid, but the fetch operation on audit ListGrid is not working stating
.
I can see my audit Datasource under the Datasources tab of Admin console (under the option All data sources). It is not shown under "Application Datasources.
Please help me with how can I access the audit datasource as a normal datasource in my application.
Please let me know in case more details are required.
I am working on SmartGWT Enterprise Edition version "12.1-p20200926".
I was trying the audit data sources and for the same made the following DS:
Code:
<DataSource ID="XYZSQL" serverType="sql" tableName="XYZ" audit="true" xmlns:fmt="WEB-INF/"> <fmt:bundle basename="DSMessages"/> <fields> <field name="xyz_id" type="sequence" hidden="true" primaryKey="true"/> <field name="xyz_type_id" type="integer" foreignKey="CdSQL.cd_id" joinType="outer" required="true"/> <field name="company_id" type="text" length="36" foreignKey="CompanySQL.company_id" required="true"/> <field name="name" type="text" length="100" required="true"> <title> <fmt:message key="name"/> </title> </field> <field name="address1" type="text" length="35"> <title> <fmt:message key="address1"/> </title> </field> <field name="address2" type="text" length="35"> <title> <fmt:message key="address2"/> </title> </field> <field name="address3" type="text" length="35"> <title> <fmt:message key="address3"/> </title> </field> <field name="city" type="text" length="35"> <title> <fmt:message key="city"/> </title> </field> <field name="state" type="text" length="2"> <title> <fmt:message key="state"/> </title> </field> <field name="zip" type="text" length="10"> <title> <fmt:message key="zip"/> </title> </field> <field name="country" type="text" length="50"> <title> <fmt:message key="country"/> </title> </field> <field name="phone" type="text" length="30"> <title> <fmt:message key="phone"/> </title> </field> <field name="fax" type="text" length="30"> <title> <fmt:message key="fax"/> </title> </field> <field name="email" type="text" length="100"> <title> <fmt:message key="email"/> </title> </field> </fields> </DataSource>
As per the documentation, A new DB table with the name "audit_XYZSQL" was created and all the changes done to audited ListGrid (with DS XYZSQL) are being persisted in the audit DB table.
When I try to fetch the ds by simple
Code:
final DataSource ds = DataSource.get("audit_XYZSQL");
No DataSource or invalid DataSource specified, can't create data model
I can see my audit Datasource under the Datasources tab of Admin console (under the option All data sources). It is not shown under "Application Datasources.
Please help me with how can I access the audit datasource as a normal datasource in my application.
Please let me know in case more details are required.
Comment