Package honeycrm.client.mvp.views

Source Code of honeycrm.client.mvp.views.DashboardView

package honeycrm.client.mvp.views;

import honeycrm.client.LocalizedMessages;
import honeycrm.client.dashboard.DashboardListViewDataProvider;
import honeycrm.client.dto.Dto;
import honeycrm.client.dto.ListQueryResult;
import honeycrm.client.mvp.presenters.DashboardPresenter.Display;
import honeycrm.client.services.ReadServiceAsync;
import honeycrm.client.view.list.ListViewDataProvider;

import com.google.gwt.view.client.HasData;

public class DashboardView extends ListView implements Display {
  final DashboardListViewDataProvider provider;

  public DashboardView(String module, final ReadServiceAsync readService, final LocalizedMessages constants) {
    super(module, readService, constants);

    setPageSize(20);
    setShowTitle(true);

    this.provider = new DashboardListViewDataProvider(module, readService);
  }

  @Override
  protected ListViewDataProvider getListDataProvider() {
    return provider;
  }

  @Override
  public void insertRefreshedData(ListQueryResult value) {
    if (null != provider) {
      initialize();
      for (final HasData<Dto> display : provider.getDataDisplays()) {
        provider.insertRefreshedData(display, value);
      }
    }
  }

  @Override
  public String getModule() {
    return module;
  }
}
TOP

Related Classes of honeycrm.client.mvp.views.DashboardView

TOP
Copyright © 2018 www.massapi.com. 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.