@Override
public void groupCreateCallback(final ResourceGroup group) {
// note: "group" is essentially a flyweight - it doesn't have much other than ID
this.groupSelector.setValue(group.getId());
this.handlerRegistrar = this.groupSelector.addDataArrivedHandler(new DataArrivedHandler() {
public void onDataArrived(DataArrivedEvent event) {
handlerRegistrar.removeHandler(); // this handler is only needed once, when group wizard is finished with and we created our group
if (groupSelector.getSelectedRecord() == null) {
// it appears that the user created a group that cannot be a bundle target.
groupSelector.clearValue();