Hi all,
I have an issue where in my data source I have a piece of code which adds a entry into a TreeGrid. At the end of the addData the following success callback is called...
Now when debuging this method, I can see that the Record contains the attribute "templates" which is a empty HashSet, which is correct. This code finishes and the entry is added to the Tree, which is perfect.
However, when I go to edit the new added entry, the mapper which converts the Record object to a CaseTypeDto is erroring because the attribute "template" is now of type "JavaScriptObject" ???
Why has this happened, The bit I find odd is that if I reload the Tree and the new entry is fetched then when the mapper runs, "templates" attribute correctly comes through as a HashSet.
So I can only assume something happens in the "processResponse" which causes this to happen. Maybe it only handles simple data types?
What can I do to keep the attribute in its correct format?
Thanks,
Dale
--------------------------------------------------
SmartGWT 2.2
Java 6
I have an issue where in my data source I have a piece of code which adds a entry into a TreeGrid. At the end of the addData the following success callback is called...
Code:
@Override public void onSuccess(CaseTypeDto caseTypeDto) { Record record = getMapper().map(caseTypeDto); response.setData(new Record[]{record}); processResponse(requestId, response); }
However, when I go to edit the new added entry, the mapper which converts the Record object to a CaseTypeDto is erroring because the attribute "template" is now of type "JavaScriptObject" ???
Why has this happened, The bit I find odd is that if I reload the Tree and the new entry is fetched then when the mapper runs, "templates" attribute correctly comes through as a HashSet.
So I can only assume something happens in the "processResponse" which causes this to happen. Maybe it only handles simple data types?
What can I do to keep the attribute in its correct format?
Thanks,
Dale
--------------------------------------------------
SmartGWT 2.2
Java 6