First of all sorry for my english.
I want to write simple GUI widget that will help me to add and delete
some business groops
like this.
public class GroupWidget extends Composite implements ClickListener {
private Controller controller;
private List<Group> groups;
public GroupWidget(List<Group> groups, Controller
controller) {
this.controller = controller;
//build widget skeleton
//init structures
}
public void onClick(Widget sender) {
if(sender == addBtn) {
//creating group object using entered date
such as name, picture etc...
this.controller.add(group);
}
}
static interface Controller {
Group add(Group group);
void delete(Group group);
}
}
but, i can't understand how it must work with async requests
Application that will use this widget will use async requests, so
methods in controller must have void as
a return type, but how can i notify widget that group is created ?
Should i add such methods to widget
onAdd(Group newlyCreatedGroup) and
onDelete() , that controller implementor have to call after receiving
a response or maybe there is some
approach or pattern.
Thanks a lot
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---