예제 #1
0
  public ProfileDialog() {

    this.setWidget(uiBinder.createAndBindUi(this));
    this.addDialogListener(this);
    addStyleName(Css.PROFILE_DIALOG_BOX);

    profileLink.setText(Msg.consts.edit_profile());
    passwordLink.setText(Msg.consts.edit_password());
    portraitLink.setText(Msg.consts.edit_portrait());
    statusText.setHint(Msg.consts.user_status_hint());

    profileLink.addClickHandler(this);
    passwordLink.addClickHandler(this);
    portraitLink.addClickHandler(this);
    statusText.addChangeHandler(this);
    form1.addListener(this);
    form2.addListener(this);
    form3.addListener(this);

    editDeck.insert(form1, 1);
    editDeck.insert(form2, 2);
    editDeck.insert(form3, 3);

    deck.showWidget(0);

    resetTitle("");
    this.setIcon(ButtonIconBundle.userImage());

    // refresh page
    SecurityControllerAsync securityController = ControllerFactory.getSecurityController();
    // give -1 to get current login user
    securityController.getUser(-1, this);
  }
  public SpaceGroupUsersPanel(SpacePermissionPanel parent) {
    this.parent = parent;

    ClickLink backLink1 =
        new ClickLink(SharedConstants.PREV_LINK + Msg.consts.back_to_space_security(), true);
    backLink1.addClickHandler(this);

    ClickLink backLink2 =
        new ClickLink(SharedConstants.PREV_LINK + Msg.consts.back_to_space_security(), true);
    backLink2.addClickHandler(this);

    VerticalPanel panel = new VerticalPanel();
    panel.add(title);
    panel.add(backLink1);
    panel.add(msgLabel);
    panel.add(table);
    panel.add(backLink2);

    panel.setSpacing(5);
    title.setStyleName(Css.HEADING1);
    setWidget(panel);
  }