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

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

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

Table.getSortContainerPropertyId介绍

[英]Gets the currently sorted column property ID.
[中]获取当前已排序的列属性ID。

代码示例

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

/**
 * Sorts the table by currently selected sorting column.
 *
 * @throws UnsupportedOperationException
 *             if the container data source does not implement
 *             Container.Sortable
 */
public void sort() {
  if (getSortContainerPropertyId() == null) {
    return;
  }
  sort(new Object[] { sortContainerPropertyId },
      new boolean[] { sortAscending });
}

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

protected boolean isSettingsSortPropertyChanged(String settingsSortProperty, String settingsSortAscending) {
  MetaPropertyPath sortProperty = (MetaPropertyPath) component.getSortContainerPropertyId();
  if (sortProperty == null) {
    return !Strings.isNullOrEmpty(settingsSortProperty);
  }
  if (settingsSortProperty == null ||
      !sortProperty.toString().equals(settingsSortProperty)) {
    return true;
  }
  Boolean sortAscending = component.isSortAscending();
  if (!sortAscending.equals(Boolean.parseBoolean(settingsSortAscending))) {
    return true;
  }
  return false;
}

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

@Nullable
@Override
public SortInfo getSortInfo() {
  Object sortContainerPropertyId = component.getSortContainerPropertyId();
  return sortContainerPropertyId != null
      ? new SortInfo(sortContainerPropertyId, component.isSortAscending())
      : null;
}

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

MetaPropertyPath sortProperty = (MetaPropertyPath) component.getSortContainerPropertyId();
boolean sortAscending = component.isSortAscending();

相关文章

微信公众号

最新文章

更多

Table类方法