com.vaadin.v7.ui.Table.getContainerDataSource()方法的使用及代码示例

x33g5p2x  于2022-01-30 转载在 其他  
字(4.9k)|赞(0)|评价(0)|浏览(171)

本文整理了Java中com.vaadin.v7.ui.Table.getContainerDataSource()方法的一些代码示例,展示了Table.getContainerDataSource()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Table.getContainerDataSource()方法的具体详情如下:
包路径:com.vaadin.v7.ui.Table
类名称:Table
方法名:getContainerDataSource

Table.getContainerDataSource介绍

暂无

代码示例

代码示例来源:origin: com.vaadin/vaadin-compatibility-server

@Override
public Hierarchical getContainerDataSource() {
  return (Hierarchical) super.getContainerDataSource();
}

代码示例来源:origin: OpenNMS/opennms

public SelectableBeanItemContainer<T> getContainerDataSource() {
  return (SelectableBeanItemContainer<T>) super.getContainerDataSource();
}

代码示例来源:origin: viritin/viritin

private boolean isContainerInitialized() {
  return table.getContainerDataSource() instanceof ListContainer;
}

代码示例来源:origin: com.vaadin/vaadin-compatibility-server

/**
 * Gets the container property IDs, which can be used to sort the item.
 * <p>
 * Note that the {@link #isSortEnabled()} state affects what this method
 * returns. Disabling sorting causes this method to always return an empty
 * collection.
 * </p>
 *
 * @see Container.Sortable#getSortableContainerPropertyIds()
 */
@Override
public Collection<?> getSortableContainerPropertyIds() {
  final Container c = getContainerDataSource();
  if (c instanceof Container.Sortable && isSortEnabled()) {
    return ((Container.Sortable) c).getSortableContainerPropertyIds();
  } else {
    return Collections.EMPTY_LIST;
  }
}

代码示例来源:origin: com.vaadin/vaadin-compatibility-server

private void paintSorting(PaintTarget target) throws PaintException {
  // Sorting
  if (getContainerDataSource() instanceof Container.Sortable) {
    target.addVariable(this, "sortcolumn",
        columnIdMap.key(sortContainerPropertyId));
    target.addVariable(this, "sortascending", sortAscending);
  }
}

代码示例来源:origin: com.vaadin/vaadin-compatibility-server

Collection<?> containerPropertyIds = getContainerDataSource()
    .getContainerPropertyIds();

代码示例来源:origin: com.haulmont.cuba/cuba-web

@Override
public void removeColumn(Table.Column column) {
  if (column == null) {
    return;
  }
  component.removeContainerProperty(column.getId());
  columns.remove(column.getId());
  columnsOrder.remove(column);
  // vaadin8 it seems that it is not required
  if (!(component.getContainerDataSource() instanceof com.vaadin.v7.data.Container.ItemSetChangeNotifier)) {
    component.refreshRowCache();
  }
  column.setOwner(null);
}

代码示例来源:origin: com.vaadin/vaadin-compatibility-server

if (isEditable() && fieldFactory != null) {
  final Field<?> f = fieldFactory
      .createField(getContainerDataSource(), rowId, colId, this);
  if (f != null) {

代码示例来源:origin: info.magnolia.activation/magnolia-module-activation

@Override
  public void textChange(FieldEvents.TextChangeEvent event) {
    Container.Filterable f = (Container.Filterable) table.getContainerDataSource();
    if (filter != null) {
      f.removeContainerFilter(filter);
    }
    filter = new SimpleStringFilter(i18n.translate("activationMonitor.activationLog.user.label"), event.getText(),
        true, false);
    f.addContainerFilter(filter);
  }
});

代码示例来源:origin: com.vaadin/vaadin-compatibility-server

public void sort(Object[] propertyId, boolean[] ascending)
    throws UnsupportedOperationException {
  final Container c = getContainerDataSource();
  if (c instanceof Container.Sortable) {
    final int pageIndex = getCurrentPageFirstItemIndex();

代码示例来源:origin: com.haulmont.cuba/cuba-web

@Override
public void setEditable(boolean editable) {
  if (this.editable != editable) {
    this.editable = editable;
    component.disableContentBufferRefreshing();
    EntityTableItems<E> entityTableSource = (EntityTableItems<E>) getItems();
    if (entityTableSource != null) {
      com.vaadin.v7.data.Container ds = component.getContainerDataSource();
      @SuppressWarnings("unchecked")
      Collection<MetaPropertyPath> propertyIds = (Collection<MetaPropertyPath>) ds.getContainerPropertyIds();
      if (editable) {
        enableEditableColumns(entityTableSource, propertyIds);
      } else {
        disableEditableColumns(entityTableSource, propertyIds);
      }
    }
    component.setEditable(editable);
    component.enableContentBufferRefreshing(true);
  }
}

代码示例来源:origin: com.haulmont.cuba/cuba-web

@Override
public void setLookupSelectHandler(Consumer<Collection<E>> selectHandler) {
  Consumer<Action.ActionPerformedEvent> actionHandler = event ->  {
    Set<E> selected = getSelected();
    selectHandler.accept(selected);
  };
  setEnterPressAction(
      new BaseAction(Window.Lookup.LOOKUP_ENTER_PRESSED_ACTION_ID)
          .withHandler(actionHandler)
  );
  setItemClickAction(
      new BaseAction(Window.Lookup.LOOKUP_ITEM_CLICK_ACTION_ID)
          .withHandler(actionHandler)
  );
  if (isEditable()) {
    EntityTableItems<E> entityTableSource = (EntityTableItems<E>) getItems();
    com.vaadin.v7.data.Container ds = component.getContainerDataSource();
    @SuppressWarnings("unchecked")
    Collection<MetaPropertyPath> propertyIds = (Collection<MetaPropertyPath>) ds.getContainerPropertyIds();
    disableEditableColumns(entityTableSource, propertyIds);
  }
  if (buttonsPanel != null && !buttonsPanel.isAlwaysVisible()) {
    buttonsPanel.setVisible(false);
  }
}

代码示例来源:origin: com.haulmont.cuba/cuba-web

createColumns(component.getContainerDataSource());

相关文章

微信公众号

最新文章

更多

Table类方法