Package org.jboss.errai.widgets.client

Examples of org.jboss.errai.widgets.client.WSModalDialog


{
  public void callback(Message message)
  {
    String errorMessage = message.get(String.class, MessageParts.ErrorMessage);

    WSModalDialog errorDialog = new WSModalDialog();
    errorDialog.ask(errorMessage, new AcceptsCallback() {
      public void callback(Object message, Object data) {
      }
    });
    errorDialog.showModal();
  }
View Full Code Here


                       .noErrorHandling()
                       .sendNowWith(ErraiBus.get());

                return;
            } else {
                WSModalDialog dialog = new WSModalDialog();
                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();
                            } else {
                                createMessage()
                                        .toSubject(getInstanceSubject(componentId))
                                        .command(LayoutCommands.ActivateTool)
                                        .noErrorHandling()
                                        .sendNowWith(ErraiBus.get());
                            }
                        }
                    }
                };

                dialog.ask("A panel is already open for '" + name + "'. What do you want to do?", openCallback);
                dialog.showModal();
                return;
            }
        }

        _openTab(DOMID, initSubject, componentId, name, componentId, icon);
View Full Code Here

                       .noErrorHandling()
                       .sendNowWith(ErraiBus.get());

                return;
            } else {
                WSModalDialog dialog = new WSModalDialog();
                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();
                            } else {
                                createMessage()
                                        .toSubject(getInstanceSubject(componentId))
                                        .command(LayoutCommands.ActivateTool)
                                        .noErrorHandling()
                                        .sendNowWith(ErraiBus.get());
                            }
                        }
                    }
                };

                dialog.ask("A panel is already open for '" + name + "'. What do you want to do?", openCallback);
                dialog.showModal();
                return;
            }
        }

        _openTab(DOMID, initSubject, componentId, name, componentId, icon);
View Full Code Here

{
  public void callback(Message message)
  {
    String errorMessage = message.get(String.class, MessageParts.ErrorMessage);

    WSModalDialog errorDialog = new WSModalDialog();
    errorDialog.ask(errorMessage, new AcceptsCallback() {
      public void callback(Object message, Object data) {
      }
    });
    errorDialog.showModal();
  }
View Full Code Here

TOP

Related Classes of org.jboss.errai.widgets.client.WSModalDialog

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.