Hi,
I recently upgraded to SmartGWT ver 2.2 from ver 2.0. I immediately noticed a difference in how a tree we have in our application is rendering.
The tree uses the following xm format to render data:
<List>
<accountInfo>
<id>309876</id>
<type>relationship</type>
<identifier>ABC</identifier>
</accountInfo>
<accountInfo>
<id>998</id>
<clientId>961028611</clientId>
<parentId>309876</parentId>
<type>client</type>
<identifier>XYZ</identifier>
</accountInfo>
<accountInfo>
<id>755799479998</id>
<parentId>998</parentId>
<type>account</type>
<identifier>100000000</identifier>
</accountInfo>
<accountInfo>
<id>998</id>
<clientId>78452263</clientId>
<parentId>309876</parentId>
<type>client</type>
<identifier>XYZ</identifier>
</accountInfo>
<accountInfo>
<id>781780865998</id>
<parentId>998</parentId>
<type>account</type>
<identifier>200000000</identifier>
</accountInfo>
</List>
With version 2.0 it rendered the nodes correctly, with ABC as the topmost. XYZ as the child of ABC and the two accounts under XYZ.
ABC--|
|
XYZ--|
|
200000000
100000000
With version 2.2 it renders only one account and it seems like a node is overwritten:
ABC--|
|
XYZ--|
|
200000000
The client side code displays the nodes based on the <identifier> field, thus:
TreeGridField treeGridField = new TreeGridField("identifier");
Including the Datasource code also:
setID(id);
setTitleField("identifier");
setRecordXPath("//List/accountInfo");
DataSourceTextField nameField = new DataSourceTextField("identifier", "AC", 128);
DataSourceIntegerField acInfoField = new DataSourceIntegerField("id", "id");
acInfoField.setPrimaryKey(true);
acInfoField.setRequired(true);
DataSourceIntegerField parentField = new DataSourceIntegerField("parentId", "parentId");
parentField.setRequired(true);
parentField.setForeignKey(id + ".id");
parentField.setRootValue("1");
DataSourceTextField typeField = new DataSourceTextField("type", "type");
DataSourceTextField clIdField = new DataSourceTextField("clientId", "clientId");
setFields(nameField, acInfoField, parentField, typeField,clIdField);
setDataURL(fetchUrl+accountNumber);
Could anyone know why this is happening and what the resolution might be?
Thanks.
I recently upgraded to SmartGWT ver 2.2 from ver 2.0. I immediately noticed a difference in how a tree we have in our application is rendering.
The tree uses the following xm format to render data:
<List>
<accountInfo>
<id>309876</id>
<type>relationship</type>
<identifier>ABC</identifier>
</accountInfo>
<accountInfo>
<id>998</id>
<clientId>961028611</clientId>
<parentId>309876</parentId>
<type>client</type>
<identifier>XYZ</identifier>
</accountInfo>
<accountInfo>
<id>755799479998</id>
<parentId>998</parentId>
<type>account</type>
<identifier>100000000</identifier>
</accountInfo>
<accountInfo>
<id>998</id>
<clientId>78452263</clientId>
<parentId>309876</parentId>
<type>client</type>
<identifier>XYZ</identifier>
</accountInfo>
<accountInfo>
<id>781780865998</id>
<parentId>998</parentId>
<type>account</type>
<identifier>200000000</identifier>
</accountInfo>
</List>
With version 2.0 it rendered the nodes correctly, with ABC as the topmost. XYZ as the child of ABC and the two accounts under XYZ.
ABC--|
|
XYZ--|
|
200000000
100000000
With version 2.2 it renders only one account and it seems like a node is overwritten:
ABC--|
|
XYZ--|
|
200000000
The client side code displays the nodes based on the <identifier> field, thus:
TreeGridField treeGridField = new TreeGridField("identifier");
Including the Datasource code also:
setID(id);
setTitleField("identifier");
setRecordXPath("//List/accountInfo");
DataSourceTextField nameField = new DataSourceTextField("identifier", "AC", 128);
DataSourceIntegerField acInfoField = new DataSourceIntegerField("id", "id");
acInfoField.setPrimaryKey(true);
acInfoField.setRequired(true);
DataSourceIntegerField parentField = new DataSourceIntegerField("parentId", "parentId");
parentField.setRequired(true);
parentField.setForeignKey(id + ".id");
parentField.setRootValue("1");
DataSourceTextField typeField = new DataSourceTextField("type", "type");
DataSourceTextField clIdField = new DataSourceTextField("clientId", "clientId");
setFields(nameField, acInfoField, parentField, typeField,clIdField);
setDataURL(fetchUrl+accountNumber);
Could anyone know why this is happening and what the resolution might be?
Thanks.
Comment