dialog.getOkButton().setText("Open New");
dialog.getCancelButton().setText("Goto");
final WorkspaceLayout layout = this;
AcceptsCallback openCallback = new AcceptsCallback() {
public void callback(Object message, Object data) {
if (MESSAGE_OK.equals(message)) {
String newId;
String newName;
int idx = 1;
while (tabInstances.containsKey(newId = (componentId + "-" + idx))) idx++;
newName = name + " (" + idx + ")";
_openTab(DOMID, initSubject, componentId, newName, newId, icon);
} else if (!"WindowClosed".equals(message)) {
Set<String> s = layout.getActiveByType(componentId);
if (s.size() > 1) {
WSTabSelectorDialog wsd = new WSTabSelectorDialog(s);
wsd.ask("Select an open instance.", new AcceptsCallback() {
public void callback(Object message, Object data) {
}
});
wsd.showModal();