Hi all,
I'm using SmartGwt v2.2.
My problem is i have a Grid with 2 Fields, one should have a Tree, and the other one the values of each tree node.
I am using a DS to extract those values from a XML. Problem is i can't get the values out of the DS. Is there a way to get the value of a given field?
I tried statisticsDS.getField("dataSourcesIdExtracted"), but from here i can't get the field's value only it's name.
Anyone can help?
My DS code is:
public RepoxStatisticsDS() {
setID("statisticsList");
setRecordXPath("/repox-statistics");
DataSourceIntegerField pkField = new DataSourceIntegerField("itemID");
pkField.setHidden(true);
pkField.setPrimaryKey(true);
DataSourceTextField nameField = new DataSourceTextField("dataSourcesIdExtracted", "dataSourcesIdExtracted", 128, true);
DataSourceTextField dataSourcesIdGeneratedField = new DataSourceTextField("dataSourcesIdGenerated", "dataSourcesIdGenerated", 128, true);
DataSourceTextField recordsField = new DataSourceTextField("records", "Records", 128, true);
recordsField.setValueXPath("countriesRecords/countryRecords/records");
setFields(pkField, nameField, dataSourcesIdGeneratedField, recordsField);
setDataURL("data/repoxStatistics.xml");
setClientOnly(true);
}
I'm using SmartGwt v2.2.
My problem is i have a Grid with 2 Fields, one should have a Tree, and the other one the values of each tree node.
I am using a DS to extract those values from a XML. Problem is i can't get the values out of the DS. Is there a way to get the value of a given field?
I tried statisticsDS.getField("dataSourcesIdExtracted"), but from here i can't get the field's value only it's name.
Anyone can help?
My DS code is:
public RepoxStatisticsDS() {
setID("statisticsList");
setRecordXPath("/repox-statistics");
DataSourceIntegerField pkField = new DataSourceIntegerField("itemID");
pkField.setHidden(true);
pkField.setPrimaryKey(true);
DataSourceTextField nameField = new DataSourceTextField("dataSourcesIdExtracted", "dataSourcesIdExtracted", 128, true);
DataSourceTextField dataSourcesIdGeneratedField = new DataSourceTextField("dataSourcesIdGenerated", "dataSourcesIdGenerated", 128, true);
DataSourceTextField recordsField = new DataSourceTextField("records", "Records", 128, true);
recordsField.setValueXPath("countriesRecords/countryRecords/records");
setFields(pkField, nameField, dataSourcesIdGeneratedField, recordsField);
setDataURL("data/repoxStatistics.xml");
setClientOnly(true);
}
Comment