public void onSuccess(UserListModel model) {

    if (!GwtClientUtils.preSuccessCheck(model, null)) {
      // just simple display message on panel
      msgLabel.clear();
      msgLabel.add(ErrorCode.getMessage(model.errorCode, model.errorCode));
      return;
    }
    // show all users in this space group in table;
    fillPanel(model.getUserModelList());
  }
Ejemplo n.º 2
0
  /**
   * @param model
   * @param content
   */
  private void callback(PortletModel model, RenderMarkupModel content) {
    busy(false);
    messagePanel.clear();
    clearControl();

    if (!GwtClientUtils.preSuccessCheck(model, null)) {
      // show error message on item part rather than general error message on HTML page above
      messagePanel.add(ErrorCode.getMessage(model.errorCode, model.errorMsg));
      return;
    }
    if (content.renderContent == null || content.renderContent.size() == 0) {
      contentPanel.clear();
      Label none = new Label("(" + Msg.consts.none() + ")");
      none.setStyleName(Css.PORTLET_WEAK_TEXT);
      contentPanel.add(none);
      contentPanel.submit();
    } else {
      PageRender render = new PageRender(contentPanel);
      render.renderContent(null, null, content.renderContent, false);

      controlBar.setPaginationInfo(model.hasPre, model.hasNxt, model.currentPage);
      addControl(controlBar);
    }
  }