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

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


        buildAdvisoryImagePanel();
      }

      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().setUserAdvisory(permissibleObject, advisory, callback);
  }
View Full Code Here


        buildAdvisoryImagePanel();
      }

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

        user.setBirthday(birthdayPicker.getValue().getTime());
        user.setAdministrator(administratorCheckBox.getValue());
        user.setValidated(validatedCheckBox.getValue());
        final AsyncCallback<User> loginCallback = new AsyncCallback<User>() {
          public void onFailure(Throwable caught) {
            MessageDialogBox dialog = new MessageDialogBox("Error", "Could not edit account.", true, true, true);
            dialog.center();
          }

          public void onSuccess(User user) {
            if (user == null) {
              MessageDialogBox dialog = new MessageDialogBox("Error", "Could not edit account.", true, true, true);
              dialog.center();
            } else {
              MessageDialogBox dialog = new MessageDialogBox("Success", "Account modified.", true, true, true);
              dialog.center();
              callback.invoke(user);
            }
          };
        };
View Full Code Here

  }

  public void fetchPendingGroupMemberships() {
    final AsyncCallback<List<PendingGroupMembership>> approveCallback = new AsyncCallback<List<PendingGroupMembership>>() {
      public void onFailure(Throwable caught) {
        MessageDialogBox dialog = new MessageDialogBox("Error", caught.getMessage(), true, true, true);
        dialog.center();
      }

      public void onSuccess(List<PendingGroupMembership> newPendingList) {
        populateUI(newPendingList);
      };
View Full Code Here

  public void submitPendingGroupMembershipApproval(Set<PendingGroupMembership> members, boolean approve) {
    // go to server and approve these group memberships
    final AsyncCallback<List<PendingGroupMembership>> approveCallback = new AsyncCallback<List<PendingGroupMembership>>() {
      public void onFailure(Throwable caught) {
        MessageDialogBox dialog = new MessageDialogBox("Error", caught.getMessage(), true, true, true);
        dialog.center();
      }

      public void onSuccess(List<PendingGroupMembership> newPendingList) {
        populateUI(newPendingList);
      };
View Full Code Here

          PermissibleObject permissibleObject = (PermissibleObject) repositoryTree.getLastItem().getUserObject();
          parentFolder = permissibleObject.getParent();
        }
        AsyncCallback<Folder> callback = new AsyncCallback<Folder>() {
          public void onFailure(Throwable caught) {
            MessageDialogBox messageDialog = new MessageDialogBox("Error", caught.getMessage(), false, true, true);
            messageDialog.center();
          }

          public void onSuccess(Folder newFolder) {
            repositoryTree.setLastItemId(newFolder.getId());
            repositoryTree.fetchRepositoryTree(repositoryCallback);
View Full Code Here

    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;
        }
        return true;
      }
    });
View Full Code Here

    try {
      if (permissibleObject != null) {
        final PromptDialogBox dialogBox = new PromptDialogBox("Properties", "OK", null, "Cancel", false, true);
        final AsyncCallback<Void> callback = new AsyncCallback<Void>() {
          public void onFailure(Throwable caught) {
            MessageDialogBox messageDialog = new MessageDialogBox("Error", caught.getMessage(), false, true, true);
            messageDialog.setCallback(new IDialogCallback() {
              public void okPressed() {
              }

              public void cancelPressed() {
                dialogBox.center();
              }
            });
            messageDialog.center();
          }

          public void onSuccess(Void result) {
          }
        };
View Full Code Here

        final int index = membersListBox.getSelectedIndex();
        final String username = membersListBox.getItemText(index);
        final User user = userMap.get(username);
        final AsyncCallback<Void> deleteUserCallback = new AsyncCallback<Void>() {
          public void onFailure(Throwable caught) {
            MessageDialogBox dialog = new MessageDialogBox("Error", caught.getMessage(), true, true, true);
            dialog.center();
          }

          public void onSuccess(Void nothing) {
            members.remove(user);
            populateUI();
            try {
              if (index < membersListBox.getItemCount()) {
                membersListBox.setSelectedIndex(index);
              } else {
                membersListBox.setSelectedIndex(index - 1);
              }
            } catch (Exception e) {
            }
            onChange(new com.google.gwt.event.dom.client.ChangeEvent() {
              public Object getSource() {
                return membersListBox;
              }
            });
          };
        };
        BaseServiceCache.getService().deleteUser(user, group, deleteUserCallback);
      }
    });
    removeButton.setText(" < ");
    removeButton.setTitle("Remove Member");

    addButton.setText(" > ");
    addButton.setTitle("Add Member");
    addButton.addClickHandler(new ClickHandler() {
      public void onClick(ClickEvent event) {
        final int index = allUsersListBox.getSelectedIndex();
        final String username = allUsersListBox.getItemText(index);
        final User user = userMap.get(username);
        final AsyncCallback<GroupMembership> addUserCallback = new AsyncCallback<GroupMembership>() {
          public void onFailure(Throwable caught) {
            MessageDialogBox dialog = new MessageDialogBox("Error", caught.getMessage(), true, true, true);
            dialog.center();
          }

          public void onSuccess(GroupMembership membership) {
            members.add(user);
            populateUI();
View Full Code Here

  }

  public void fetchGroupMembers() {
    final AsyncCallback<List<User>> getGroupMemsCallback = new AsyncCallback<List<User>>() {
      public void onFailure(Throwable caught) {
        MessageDialogBox dialog = new MessageDialogBox("Error", caught.getMessage(), true, true, true);
        dialog.center();
      }

      public void onSuccess(List<User> members) {
        EditGroupMembersPanel.this.members = members;
        if (members == null) {
          MessageDialogBox dialog = new MessageDialogBox("Error", "Could not get users in group.", true, true, true);
          dialog.center();
        } else {
          if (allUsers == null) {
            fetchUsers();
          } else {
            populateUI();
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.