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

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

本文整理了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

  1. /**
  2. * Sorts the table by currently selected sorting column.
  3. *
  4. * @throws UnsupportedOperationException
  5. * if the container data source does not implement
  6. * Container.Sortable
  7. */
  8. public void sort() {
  9. if (getSortContainerPropertyId() == null) {
  10. return;
  11. }
  12. sort(new Object[] { sortContainerPropertyId },
  13. new boolean[] { sortAscending });
  14. }

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

  1. protected boolean isSettingsSortPropertyChanged(String settingsSortProperty, String settingsSortAscending) {
  2. MetaPropertyPath sortProperty = (MetaPropertyPath) component.getSortContainerPropertyId();
  3. if (sortProperty == null) {
  4. return !Strings.isNullOrEmpty(settingsSortProperty);
  5. }
  6. if (settingsSortProperty == null ||
  7. !sortProperty.toString().equals(settingsSortProperty)) {
  8. return true;
  9. }
  10. Boolean sortAscending = component.isSortAscending();
  11. if (!sortAscending.equals(Boolean.parseBoolean(settingsSortAscending))) {
  12. return true;
  13. }
  14. return false;
  15. }

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

  1. @Nullable
  2. @Override
  3. public SortInfo getSortInfo() {
  4. Object sortContainerPropertyId = component.getSortContainerPropertyId();
  5. return sortContainerPropertyId != null
  6. ? new SortInfo(sortContainerPropertyId, component.isSortAscending())
  7. : null;
  8. }

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

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

相关文章

Table类方法