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

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

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

Table.setValue介绍

暂无

代码示例

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

protected void setSelectedIds(Collection<Object> itemIds) {
  if (component.isMultiSelect()) {
    component.setValue(itemIds);
  } else {
    component.setValue(itemIds.size() > 0 ? itemIds.iterator().next() : null);
  }
}

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

@Override
public void setSelected(E item) {
  if (item == null) {
    component.setValue(null);
  } else {
    setSelected(Collections.singletonList(item));
  }
}

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

@Override
protected void setInternalValue(Collection newValue) {
  super.setInternalValue(newValue);
  table.setValue(newValue);
}

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

@Override
public void selectAll() {
  if (isMultiSelect()) {
    component.setValue(component.getItemIds());
  }
}

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

@Override
protected void setValue(Object newValue, boolean repaintIsNotNeeded) throws ReadOnlyException {
  Set<ET> oldvalue = (Set<ET>) getValue();
  super.setValue(newValue, repaintIsNotNeeded);
  if (clientSideChange) {
    // TODO add strategies for maintaining the order in case of List
    // e.g. same as listing, selection order ...
    Set newvalue = (Set) getValue();
    Set<ET> orphaned = new HashSet<>(oldvalue);
    orphaned.removeAll(newvalue);
    removeRelation(orphaned);
    allRemovedRelations.addAll(orphaned);
    allAddedRelations.removeAll(orphaned);
    Set<ET> newValues = new LinkedHashSet<>(newvalue);
    newValues.removeAll(oldvalue);
    addRelation(newValues);
    allAddedRelations.addAll(newValues);
    allRemovedRelations.removeAll(newValues);
    MultiSelectTable.this.fireValueChange(true);
  }
}

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

setValue(newValue, true);

代码示例来源:origin: info.magnolia.ui/magnolia-ui-framework-compatibility

@Override
  protected Table createTable(Container container) {
    Table table = new Table(null, container);
    table.setSelectable(true);
    table.setMultiSelect(true);
    // use B as default selected value here
    table.setValue(Lists.newArrayList(B));
    return table;
  }
};

相关文章

微信公众号

最新文章

更多

Table类方法