Hello SmartGWT experts,
I'm currently evaluating SmartGWT pro, and I have some basic questions regarding datasources.
It mostly revolves around the "granularity" of a datasource: can they handle complex objects.
If good answers to these questions were provided, I'm afraid I didn't find them, if that's the case, could you please send the links?
Let's say I have the following object model:
Typically, the Course, Student, and Article objects would have a separate life-cycle, and we would just reference their ids, but for the sake of the example, let's pretend that they don't, that they are completely linked objects, that don't really exist without the teacher (they don't have ids of their own).
So the 1st question is:
1. Can a datasource deliver both Teacher objects, and Professor objects? (and more if necessary)
UI-binding:
I understand the concept of UI-binding, but:
2. can I define a group of widget to be binded to particular fields, (name-> nameTextField, dob -> dobTextField, courses -> coursesTable) using only 1 datasource?
3. How about client/server communication: I'd like for example to let the user edit the list of courses, the name, etc. and only call the server when the user hits a save button, is it possible?
(I'm under the impression that table widgets will call the datasource (server) once a new row has been added for example).
"Serialization":
I understand that for some datasources, I can return my domain objects; which is great because unlike GWT RPC, I don't need to write and maintain DTOs.
4. But how is this "serialization" done? I assume it must serialize fields that follow the java bean convention? (attributes with getters and setters)?
5. Unlike GWT RPC, it looks like on the client side, the data has to be manipulated with xpath, not java getters and setters,
is this correct?
Well, I have more questions, but this is a good start already.
thanks in advance for your help
I'm currently evaluating SmartGWT pro, and I have some basic questions regarding datasources.
It mostly revolves around the "granularity" of a datasource: can they handle complex objects.
If good answers to these questions were provided, I'm afraid I didn't find them, if that's the case, could you please send the links?
Let's say I have the following object model:
Code:
class Teacher
{
String name;
Date dob;
List<Course> courses;
List<Student> students;
}
class Professor extends Teacher
{
List<Article> articles;
}
class Course {...}
class Student {...}
So the 1st question is:
1. Can a datasource deliver both Teacher objects, and Professor objects? (and more if necessary)
UI-binding:
I understand the concept of UI-binding, but:
2. can I define a group of widget to be binded to particular fields, (name-> nameTextField, dob -> dobTextField, courses -> coursesTable) using only 1 datasource?
3. How about client/server communication: I'd like for example to let the user edit the list of courses, the name, etc. and only call the server when the user hits a save button, is it possible?
(I'm under the impression that table widgets will call the datasource (server) once a new row has been added for example).
"Serialization":
I understand that for some datasources, I can return my domain objects; which is great because unlike GWT RPC, I don't need to write and maintain DTOs.
4. But how is this "serialization" done? I assume it must serialize fields that follow the java bean convention? (attributes with getters and setters)?
5. Unlike GWT RPC, it looks like on the client side, the data has to be manipulated with xpath, not java getters and setters,
is this correct?
Well, I have more questions, but this is a good start already.
thanks in advance for your help
Comment