Exemplo n.º 1
0
 public void onChange(ChangeEvent event) {
   statusDirty = true;
   String str = statusText.getText();
   if (str.length() > 140) {
     // truncate if too long
     statusText.setText(str.substring(0, 140) + "...");
   }
 }
Exemplo n.º 2
0
  private void fillPanel(UserModel model) {
    if (model == null) return;

    resetTitle(model.getLoginname());
    // if it's login user, refresh navbar user name
    if (model.isLogin()) BaseEntryPoint.I.resetLoginUser(model.getFullname());

    //		set display info on left part
    fullname.setText(model.getFullname());

    contacts.setUser(model);
    statusText.setText(StringUtil.trimToEmpty(model.getStatus()));
    this.userUid = model.getUid();

    if (model.getPortrait() != null) {
      // while user update Profile, the portrait won't refresh. See userPortraitUpdated() method
      portrait.clear();
      portrait.setWidget(GwtClientUtils.createUserPortrait(model.getPortrait()));
    }
  }