Package org.damour.base.client.ui.dialogs

Examples of org.damour.base.client.ui.dialogs.MessageDialogBox


    dialogBox.setContent(new Label("Delete " + permissibleObject.getName() + "?"));
    dialogBox.setCallback(new IDialogCallback() {
      public void okPressed() {
        final AsyncCallback<Void> deleteCallback = new AsyncCallback<Void>() {
          public void onFailure(Throwable caught) {
            MessageDialogBox messageDialog = new MessageDialogBox("Error", caught.getMessage(), false, true, true);
            messageDialog.center();
          }

          public void onSuccess(Void nothing) {
            repositoryCallback.fileDeleted();
          }
View Full Code Here


        }
        if (StringUtils.isEmpty(fromName)) {
          fromName = fromAddress;
        }
        if (StringUtils.isEmpty(fromAddress)) {
          MessageDialogBox messageDialog = new MessageDialogBox("Error", "You must enter your email address.", false, false, true);
          messageDialog.center();
          return;
        }
        sendEmail(permissibleObject, subject, message, fromAddress, fromName, toAddresses);
        hide();
      }
View Full Code Here

        setStars();
      }

      public void onFailure(Throwable t) {
        isSubmitting = false;
        MessageDialogBox dialog = new MessageDialogBox(BaseApplication.getMessages().getString("error", "Error"), t.getMessage(), false, true, true);
        dialog.center();
      }
    };
    BaseServiceCache.getService().setUserRating(permissibleObject, rating, callback);
  }
View Full Code Here

        }
        setStars();
      }

      public void onFailure(Throwable t) {
        MessageDialogBox dialog = new MessageDialogBox(BaseApplication.getMessages().getString("error", "Error"), t.getMessage(), false, true, true);
        dialog.center();
        clear();
      }
    };
    BaseServiceCache.getService().getUserRating(permissibleObject, callback);
  }
View Full Code Here

        }
      }

      public void onFailure(Throwable t) {
        isSubmitting = false;
        MessageDialogBox dialog = new MessageDialogBox(BaseApplication.getMessages().getString("error", "Error"), t.getMessage(), false, true, true);
        dialog.center();
      }
    };
    BaseServiceCache.getService().setUserThumb(permissibleObject, like, callback);
  }
View Full Code Here

        }
        loadThumbUI();
      }

      public void onFailure(Throwable t) {
        MessageDialogBox dialog = new MessageDialogBox(BaseApplication.getMessages().getString("error", "Error"), t.getMessage(), false, true, true);
        dialog.center();
        clear();
      }
    };
    BaseServiceCache.getService().getUserThumb(permissibleObject, callback);
  }
View Full Code Here

  public void execute() {
    final PromptDialogBox uploadDialog = new PromptDialogBox("Upload File", "Send", null, "Cancel", false, true);
    IFileUploadCallback fileUploadCallback = new IFileUploadCallback() {
      public void uploadFailed() {
        uploadDialog.hide();
        MessageDialogBox messageDialog = new MessageDialogBox("Error", "Upload failed, check file permissions.", false, true, true);
        messageDialog.center();
      }
      public void fileUploaded(String id) {
        uploadDialog.hide();
        if (id == null || "".equals(id)) {
          MessageDialogBox messageDialog = new MessageDialogBox("Error", "Upload failed, check file permissions.", false, true, true);
          messageDialog.center();
          return;
        }
        repositoryCallback.fileUploaded(id);
      }
    };
View Full Code Here

          validationMessage += (usernameTextBox == null || "".equals(usernameTextBox.getText())) ? "<BR>" : ""
              + BaseApplication.getMessages().getString("mustEnterPassword", "You must enter a password.");
          valid = false;
        }
        if (!valid) {
          final MessageDialogBox dialog = new MessageDialogBox(BaseApplication.getMessages().getString("validationFailed", "Validation Failed"),
              validationMessage, true, true, true);
          dialog.center();
        }
        return valid;
      }
    });

    loginDialog.setCallback(new IDialogCallback() {
      public void okPressed() {
        login(usernameTextBox.getText(), passwordTextBox.getText());
      }

      public void cancelPressed() {
      }
    });

    signupButton.addClickHandler(new ClickHandler() {
      public void onClick(final ClickEvent event) {
        loginDialog.hide();
        // create an account, prepopulate UI with values from login dialog (user/pass)
        showNewAccountDialog(true);
      }
    });

    hintLink.setTitle("Retrieve your password hint.");
    hintLink.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_LEFT);
    hintLink.setStyleName("link");
    hintLink.addClickHandler(new ClickHandler() {
      public void onClick(final ClickEvent event) {
        if (usernameTextBox.getText() == null || "".equals(usernameTextBox.getText())) {
          final MessageDialogBox dialog = new MessageDialogBox(BaseApplication.getMessages().getString("error", "Error"), BaseApplication.getMessages()
              .getString("enterUsername", "Enter your username."), true, true, true);
          dialog.center();
        } else {
          getPasswordHint(usernameTextBox.getText());
        }
      }
    });
    readDisclaimer.addClickHandler(new ClickHandler() {

      public void onClick(final ClickEvent event) {
        String companyName = BaseApplication.getMessages().getString("companyName", "the Company");
        String disclaimerText = "By using this website, you acknowledge that you have read and agree to these terms.  Department staff may revise these terms periodically.  If you continue to use this website after changes are made to these terms, it will mean that you accept such changes.  If at any time you do not wish to accept the Terms, you may choose not to use this website.";
        disclaimerText += "<BR><BR>The information contained in this website is for general information purposes only. The information is provided by {0} and whilst we endeavour to keep the information up-to-date and correct, we make no representations or warranties of any kind, express or implied, about the completeness, accuracy, reliability, suitability or availability with respect to the website or the information, products, services, or related graphics contained on the website for any purpose. Any reliance you place on such information is therefore strictly at your own risk.";
        disclaimerText += "<BR><BR>In no event will we be liable for any loss or damage including without limitation, indirect or consequential loss or damage, or any loss or damage whatsoever arising from loss of data or profits arising out of, or in connection with, the use of this website.";
        disclaimerText += "<BR><BR>Through this website you are able to link to other websites which are not under the control of {0}. We have no control over the nature, content and availability of those sites. The inclusion of any links does not necessarily imply a recommendation or endorse the views expressed within them.";
        disclaimerText += "<BR><BR>Every effort is made to keep the website up and running smoothly. However, {0} takes no responsibility for, and will not be liable for, the website being temporarily unavailable due to technical issues beyond our control.";
        disclaimerText = BaseApplication.getMessages().getString("disclaimerText", disclaimerText, companyName);
        final MessageDialogBox dialog = new MessageDialogBox(BaseApplication.getMessages().getString("disclaimerAndTerms", "Disclaimer & Terms of Use"),
            disclaimerText, true, true, true);
        dialog.setWidth("600px");
        dialog.center();
      }
    });
    disclaimerCheckBox.setTitle(BaseApplication.getMessages().getString("disclaimerAgree", "You must read and agree in order to continue."));
    // present account dialog
    accountDialog.setText(BaseApplication.getMessages().getString("newAccount", "New Account"));
View Full Code Here

      public void onSubmit(SubmitEvent event) {
        Cookies.removeCookie(upload.getName());
        // This event is fired just before the form is submitted. We can take
        // this opportunity to perform validation.
        if (upload.getFilename().length() == 0) {
          MessageDialogBox dialog = new MessageDialogBox("Info", "The filename must not be empty", false, true, true);
          dialog.center();
          event.cancel();
        } else {
          progressMeter.setWidth("300px");
          progressPopup.setWidget(progressMeter);
          progressPopup.center();
View Full Code Here

    try {
      super.submit();
    } catch (Throwable t) {
      progressPopup.hide();
      uploadStatusTimer.cancel();
      MessageDialogBox messageDialog = new MessageDialogBox("Error", "Upload failed, check file permissions or filename.", false, true, true);
      messageDialog.center();
    }
  }
View Full Code Here

TOP

Related Classes of org.damour.base.client.ui.dialogs.MessageDialogBox

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.