I Need to create a DataSource Dynamically. The amount of fields or the fields name will be available only at runtime.
I have a list of an object which other embedded lists. And all the data need to be displayed in one DataGrid as a single record.
For the fetch:
RestDataSource dsFields = new RestDataSource();
dsFields.setDataFormat(DSDataFormat.JSON);
dsFields.setFetchDataURL(url);
With the response received, I am not able to read the data as a embedded list. With 'response.getDataAsRecordList()' , I get only one level in the list. I have another level.
If I am able to loop the response, I can use the method addField to create the correctDataSource to display in a Datagrid.
Record1 {
name,
age,
DOB,
address{
line1, line2, town},
PhoneNo{
phone1, phone2},
.
.
.
}
I have been able to loop though Record1 to get name, age, DOB, and adress as a attribute not a new embedded list.
Also I had also tried to start using DynamicDSGenerator, But this am not able to get the jar com.isomorphic
Is com.isomorphic in the professional edition?
I am using SmartGWT/4.1d
I have a list of an object which other embedded lists. And all the data need to be displayed in one DataGrid as a single record.
For the fetch:
RestDataSource dsFields = new RestDataSource();
dsFields.setDataFormat(DSDataFormat.JSON);
dsFields.setFetchDataURL(url);
With the response received, I am not able to read the data as a embedded list. With 'response.getDataAsRecordList()' , I get only one level in the list. I have another level.
If I am able to loop the response, I can use the method addField to create the correctDataSource to display in a Datagrid.
Record1 {
name,
age,
DOB,
address{
line1, line2, town},
PhoneNo{
phone1, phone2},
.
.
.
}
I have been able to loop though Record1 to get name, age, DOB, and adress as a attribute not a new embedded list.
Also I had also tried to start using DynamicDSGenerator, But this am not able to get the jar com.isomorphic
Is com.isomorphic in the professional edition?
I am using SmartGWT/4.1d