예제 #1
0
  public void render() {
    controlBar.addMoreLessButtonBarListener(this);

    this.header.addStyleDependentName(Css.DEP_WIDGET);
    this.addStyleDependentName(Css.DEP_WIDGET);

    setPortletTitle(getPortletTitle(), getPortletTitle(), null);
    setPortletLogo(new Image(IconBundle.I.get().message()));

    contentPanel.setStyleName(Css.ACTIVITIES);

    messagePanel.setWidth("100%");
    container.add(contentPanel);
    container.add(messagePanel);
    // try to get page
    refresh();
  }
예제 #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);
    }
  }
예제 #3
0
 public void pageChange(int currentPageNum) {
   controlBar.busy(true);
   HelperControllerAsync helperController =
       (HelperControllerAsync) ControllerFactory.getHelperController();
   helperController.getActivityLogs(currentPageNum, paginationAsync);
 }