Package org.damour.base.client.objects

Examples of org.damour.base.client.objects.User


  public EmailDialog(final PermissibleObject permissibleObject, final String subject, final String message) {
    super(false, true);

    this.permissibleObject = permissibleObject;

    final User user = AuthenticationHandler.getInstance().getUser();

    setText("E-mail to Friends");
    Button ok = new Button("OK");
    ok.addClickHandler(new ClickHandler() {
      public void onClick(ClickEvent event) {
        // build a map of addresses/names from table
        String toAddresses = "";
        for (int i = 0; i < NUM_ADDRESSES; i++) {
          String address = ((TextBox) emailAddressTable.getWidget(i, 0)).getText();
          if (!StringUtils.isEmpty(address)) {
            String name = ((TextBox) emailAddressTable.getWidget(i, 1)).getText();
            if (StringUtils.isEmpty(name)) {
              name = address;
            }
            toAddresses += address + ";" + name + ";";
          }
        }
        String fromAddress = null;
        String fromName = null;
        if (user == null) {
          fromAddress = userEmailTextBox.getText();
          fromName = userTextBox.getText();
        } else {
          fromAddress = user.getEmail();
          fromName = user.getFirstname();
        }
        if (StringUtils.isEmpty(fromName)) {
          fromName = fromAddress;
        }
        if (StringUtils.isEmpty(fromAddress)) {
View Full Code Here


  private void populateUI() {
    setWidget(0, 1, new Label());
    usersList.clear();
    userMap.clear();
    for (int i = 0; i < users.size(); i++) {
      User user = users.get(i);
      usersList.addItem(user.getUsername());
      if (lastListSelection != null && lastListSelection.equals(user.getUsername())) {
        usersList.setSelectedIndex(i);
      }
      userMap.put(user.getUsername(), user);
    }
    onChange(new com.google.gwt.event.dom.client.ChangeEvent() {
      public Object getSource() {
        return usersList;
      }
View Full Code Here

  }

  public void onChange(ChangeEvent event) {
    if (usersList.getSelectedIndex() >= 0) {
      setWidget(0, 1, new Label("Loading..."));
      User user = userMap.get(usersList.getItemText(usersList.getSelectedIndex()));
      lastListSelection = user.getUsername();
      editUserPanel = new EditGroupsForUserPanel(callback, this, groups, user);
      CaptionPanel captionPanel = new CaptionPanel("Edit Group Membership");
      captionPanel.setContentWidget(editUserPanel);
      setWidget(0, 1, captionPanel);
    }
View Full Code Here

    userMap.put(user.getUsername(), user);
    usersList.setItemText(usersList.getSelectedIndex(), user.getUsername());

    // replace
    for (int i = 0; i < users.size(); i++) {
      User tmpUser = users.get(i);
      if (tmpUser.getId().equals(user.getId())) {
        users.set(i, user);
      }
    }

    if (callback != null) {
View Full Code Here

  private void populateUI() {
    setWidget(0, 1, new Label());
    usersList.clear();
    userMap.clear();
    for (int i = 0; i < users.size(); i++) {
      User user = users.get(i);
      usersList.addItem(user.getUsername());
      if (lastListSelection != null && lastListSelection.equals(user.getUsername())) {
        usersList.setSelectedIndex(i);
      }
      userMap.put(user.getUsername(), user);
    }
    onChange(new com.google.gwt.event.dom.client.ChangeEvent() {
      public Object getSource() {
        return usersList;
      }
View Full Code Here

  }

  public void onChange(ChangeEvent event) {
    if (usersList.getSelectedIndex() >= 0) {
      setWidget(0, 1, new Label("Loading..."));
      User user = userMap.get(usersList.getItemText(usersList.getSelectedIndex()));
      lastListSelection = user.getUsername();
      editUserPanel = new EditAccountPanel(this, user);
      CaptionPanel captionPanel = new CaptionPanel("Edit Account");
      captionPanel.setContentWidget(editUserPanel);
      setWidget(0, 1, captionPanel);
    }
View Full Code Here

    userMap.put(user.getUsername(), user);
    usersList.setItemText(usersList.getSelectedIndex(), user.getUsername());

    // replace
    for (int i = 0; i < users.size(); i++) {
      User tmpUser = users.get(i);
      if (tmpUser.getId().equals(user.getId())) {
        users.set(i, user);
      }
    }

    if (callback != null) {
View Full Code Here

                      "confirmEmailForValidation",
                      "<BR>Thank you for signing up. <BR><BR>We just sent you a confirmation email. <BR><BR>Please click the link inside the email and your account will be activated.<BR><BR>"));
        }
      };
    };
    User user = new User();
    user.setUsername(username);
    user.setFirstname(firstname);
    user.setLastname(lastname);
    user.setPasswordHint(passwordHint);
    user.setEmail(email);
    user.setBirthday(birthday);
    BaseServiceCache.getService().createOrEditAccount(user, password, captchaValidationTextBox.getText().toUpperCase(), loginCallback);
  }
View Full Code Here

      public void onClick(ClickEvent event) {
        String principalName = principalListBox.getValue(principalListBox.getSelectedIndex());
        Permission permission = null;
        for (Permission mypermission : permissions) {
          if (showUserPerms && mypermission.getSecurityPrincipal() instanceof User) {
            User user = (User) mypermission.getSecurityPrincipal();
            if (principalName.equalsIgnoreCase(user.getUsername())) {
              permission = mypermission;
              break;
            }
          } else if (showGroupPerms && mypermission.getSecurityPrincipal() instanceof UserGroup) {
            UserGroup group = (UserGroup) mypermission.getSecurityPrincipal();
View Full Code Here

    String principalName = principalListBox.getValue(principalListBox.getSelectedIndex());
    Permission tmppermission = null;
    for (Permission mypermission : permissions) {
      if (showUserPerms && mypermission.getSecurityPrincipal() instanceof User) {
        User user = (User) mypermission.getSecurityPrincipal();
        if (principalName.equalsIgnoreCase(user.getUsername())) {
          tmppermission = mypermission;
          break;
        }
      } else if (showGroupPerms && mypermission.getSecurityPrincipal() instanceof UserGroup) {
        UserGroup group = (UserGroup) mypermission.getSecurityPrincipal();
View Full Code Here

TOP

Related Classes of org.damour.base.client.objects.User

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.