public void setData(List<GerenteZonalProxy> data) {
   this.data = data;
   this.setRowCount(data.size(), true);
   this.setRowData(0, data);
   this.setPageSize(data.size());
   dataProvider.setList(data);
   dataProvider.refresh();
 }
 public void setData(List<PrecioItemProxy> data) {
   this.data = data;
   this.setRowCount(data.size(), true);
   this.setRowData(0, data);
   this.setPageSize(data.size());
   dataProvider.setList(data);
   dataProvider.refresh();
   indexUpdates.clear();
   // redraw();
 }
 private void selection(Boolean select) {
   if (dataProvider.getFilter() != null && !dataProvider.getFilter().isEmpty()) {
     selectionModel.clear();
     for (int i = 0; i < dataProvider.resulted.size(); i++) {
       selectionModel.setSelected(dataProvider.resulted.get(i), select);
     }
   } else {
     selectionModel.clear();
     for (int i = 0; i < data.size(); i++) {
       selectionModel.setSelected(data.get(i), select);
     }
   }
 }
 private void initComponents() {
   this.setWidth("100%");
   this.setHeight("90%");
   initColumns();
   this.setRowCount(data.size(), true);
   this.setRowData(0, data);
   dataProvider.setList(data);
   dataProvider.addDataDisplay(this);
   this.setVisible(true);
   this.setSelectionModel(selectionModel);
   SimplePager.Resources pagerResources = GWT.create(SimplePager.Resources.class);
   pager = new SimplePager(SimplePager.TextLocation.CENTER, pagerResources, false, 0, true);
   pager.setDisplay(this);
   pager.setVisible(true);
 }
  private void calcularDescuento(int index, PrecioItemProxy object, String value) {
    if (!FieldVerifier.notIsNumberPositivo(value, "Descuento")) {
      ContextMantenimientoPrecioItem context = FACTORY.contextMantenimientoPrecioItem();
      FACTORY.initialize(EVENTBUS);
      PrecioItemProxy beanEdit = context.edit(object);
      BigDecimal valPrecioSd = object.getPrecioSD();
      BigDecimal valDescuento = BigDecimal.valueOf(Double.parseDouble(value));
      BigDecimal valPrecioVenta = object.getPrecioSD().subtract(valDescuento);
      BigDecimal valValorVenta =
          valPrecioVenta.divide(
              UISesionImpl.beanInitParam
                  .getIgv()
                  .divide(BigDecimal.valueOf(100), 5, RoundingMode.HALF_UP)
                  .add(BigDecimal.ONE),
              5,
              RoundingMode.HALF_UP);
      BigDecimal igv = valPrecioVenta.subtract(valValorVenta);
      beanEdit.setPrecioSD(valPrecioSd);
      beanEdit.setDescuento(valDescuento);
      beanEdit.setPrecioVenta(valPrecioVenta);
      beanEdit.setValorVenta(valValorVenta);
      beanEdit.setIgv(igv);
      // GWT.log("Index Vista: " + index);
      // index = dataProvider.getList().indexOf(object);
      int indexModel = data.indexOf(object);
      // GWT.log("Index Modelo: " + indexModel);
      data.set(indexModel, beanEdit);
      indexUpdates.add(indexModel);
      context.fire();
      dataProvider.refresh();
      // Update the row and subrow.
      setKeyboardSelectedRow(index, 0, true);
      // Update the column index.
      setKeyboardSelectedColumn(6, true);
    } else {

    }
  }