本文整理了Java中com.vaadin.v7.ui.Table.setContainerDataSource()
方法的一些代码示例,展示了Table.setContainerDataSource()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Table.setContainerDataSource()
方法的具体详情如下:
包路径:com.vaadin.v7.ui.Table
类名称:Table
方法名:setContainerDataSource
[英]Sets the Container that serves as the data source of the viewer. As a side-effect the table's selection value is set to null as the old selection might not exist in new Container.
All rows and columns are generated as visible using this method. If the new container contains properties that are not meant to be shown you should use Table#setContainerDataSource(Container,Collection)instead, especially if the table is editable.
Keeps propertyValueConverters if the corresponding id exists in the new data source and is of a compatible type.
[中]设置用作查看器数据源的容器。作为一个副作用,表的选择值被设置为null,因为新容器中可能不存在旧的选择。
使用此方法生成的所有行和列都是可见的。如果新容器包含不打算显示的属性,则应改用表#setContainerDataSource(容器、集合),尤其是在该表可编辑的情况下。
如果新数据源中存在相应的id且其类型兼容,则保留propertyValueConverters。
代码示例来源:origin: tepi/FilteringTable
@Override
public void setContainerDataSource(Container newDataSource) {
super.setContainerDataSource(newDataSource);
}
代码示例来源:origin: viritin/viritin
public MultiSelectTable(Class<ET> optionType) {
this();
table.setContainerDataSource(new ListContainer(optionType));
this.optionType = optionType;
}
代码示例来源:origin: com.vaadin/vaadin-compatibility-server
/**
* Creates a new table with caption and connect it to a Container.
*
* @param caption
* @param dataSource
*/
public Table(String caption, Container dataSource) {
this();
setCaption(caption);
setContainerDataSource(dataSource);
}
代码示例来源:origin: tepi/FilteringTable
@Override
public void setContainerDataSource(Container newDataSource, Collection<?> visibleIds) {
super.setContainerDataSource(newDataSource, visibleIds);
resetFilters();
}
代码示例来源:origin: viritin/viritin
/**
* Sets the list of options available.
*
* @param list the list of available options
* @return this for fluent configuration
*/
public MultiSelectTable<ET> setOptions(ET... list) {
if (visProps == null) {
table.setContainerDataSource(new ListContainer(optionType, Arrays.
asList(list)));
} else {
table.setContainerDataSource(new ListContainer(optionType, Arrays.
asList(list)), Arrays.asList(
visProps));
}
if (pendingHeaders != null) {
table.setColumnHeaders(pendingHeaders);
}
return this;
}
代码示例来源:origin: viritin/viritin
/**
* Sets the list of options available.
*
* @param list the list of available options
* @return this for fluent configuration
*/
public MultiSelectTable<ET> setOptions(List<ET> list) {
if (visProps == null) {
table.setContainerDataSource(new ListContainer(optionType, list));
} else {
table.setContainerDataSource(new ListContainer(optionType, list), Arrays.asList(
visProps));
}
if (pendingHeaders != null) {
table.setColumnHeaders(pendingHeaders);
}
return this;
}
代码示例来源:origin: com.vaadin/vaadin-compatibility-server
@Override
public void setContainerDataSource(Container newDataSource) {
cStrategy = null;
// FIXME: This disables partial updates until TreeTable is fixed so it
// does not change component hierarchy during paint
containerSupportsPartialUpdates = (newDataSource instanceof ItemSetChangeNotifier)
&& false;
if (newDataSource != null && !(newDataSource instanceof Hierarchical)) {
newDataSource = new ContainerHierarchicalWrapper(newDataSource);
}
if (newDataSource != null && !(newDataSource instanceof Ordered)) {
newDataSource = new HierarchicalContainerOrderedWrapper(
(Hierarchical) newDataSource);
}
super.setContainerDataSource(newDataSource);
}
代码示例来源:origin: com.vaadin/vaadin-compatibility-server
setContainerDataSource(newDataSource, visibleIds);
代码示例来源:origin: OpenNMS/opennms
void refreshTable() {
if (m_table != null) {
m_beanItemContainer = WallboardProvider.getInstance().getBeanContainer();
m_table.setContainerDataSource(m_beanItemContainer);
m_table.setVisibleColumns(new Object[]{"title", "Edit", "Remove", "Preview", "Default"});
m_table.setColumnHeader("title", "Title");
m_table.sort();
m_table.refreshRowCache();
}
}
}
代码示例来源:origin: com.haulmont.cuba/cuba-web
this.component.setContainerDataSource(null);
this.component.setContainerDataSource(this.dataBinding);
代码示例来源:origin: info.magnolia.ui/magnolia-ui-framework-compatibility
table.setContainerDataSource(hierarchicalJcrContainer);
代码示例来源:origin: OpenNMS/opennms
m_table.setContainerDataSource(m_beanItemContainer);
m_table.setSizeFull();
m_table.sort(new Object[]{"name"}, new boolean[]{true});
代码示例来源:origin: OpenNMS/opennms
columnsTable.setContainerDataSource(columns);
rowsTable.setContainerDataSource(rows);
内容来源于网络,如有侵权,请联系作者删除!