final EditGroupPanel editGroupPanel = new EditGroupPanel(null, callback, null, group, false, false);
final PromptDialogBox editGroupDialogBox = new PromptDialogBox("Create New Group", "OK", null, "Cancel", false, true);
editGroupDialogBox.setContent(editGroupPanel);
editGroupDialogBox.setFocusWidget(editGroupPanel.getNameTextBox());
editGroupDialogBox.setValidatorCallback(new IDialogValidatorCallback() {
public boolean validate() {
if (editGroupPanel.getNameTextBox().getText() == null || "".equals(editGroupPanel.getNameTextBox().getText())) {
MessageDialogBox dialog = new MessageDialogBox("Error", "Enter a group name.", true, true, true);
dialog.center();
return false;