Skip to content

Commit

Permalink
adding of collectionView as value in SelectableBeanContainerDataProvider
Browse files Browse the repository at this point in the history
  • Loading branch information
skublik committed Nov 4, 2020
1 parent aea8842 commit 21b2e10
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 16 deletions.
Expand Up @@ -140,12 +140,8 @@ protected List<ObjectOrdering> createObjectOrderings(SortParam<String> sortParam
public ObjectQuery getQuery() {
return createQuery();
}

@Override
protected CompiledObjectCollectionView getCompiledObjectCollectionView() {
return getObjectCollectionView();
}
};
provider.setCompiledObjectCollectionView(getObjectCollectionView());
provider.setOptions(createOptions());
setDefaultSorting(provider);

Expand Down
Expand Up @@ -55,6 +55,7 @@ public class SelectableBeanContainerDataProvider<C extends Containerable> extend

private boolean emptyListOnNullQuery = false;
private boolean useObjectCounting = true;
private CompiledObjectCollectionView objectCollectionView;

// we use special options when exporting to CSV (due to bulk nature of the operation)
private boolean export;
Expand Down Expand Up @@ -326,6 +327,10 @@ public boolean isOrderingDisabled() {
}

protected CompiledObjectCollectionView getCompiledObjectCollectionView() {
return null;
return objectCollectionView;
}

public void setCompiledObjectCollectionView(CompiledObjectCollectionView objectCollectionView) {
this.objectCollectionView = objectCollectionView;
}
}
Expand Up @@ -202,12 +202,8 @@ protected List<ObjectOrdering> createObjectOrderings(SortParam<String> sortParam
public ObjectQuery getQuery() {
return createQuery();
}

@Override
protected CompiledObjectCollectionView getCompiledObjectCollectionView() {
return getObjectCollectionView();
}
};
provider.setCompiledObjectCollectionView(getObjectCollectionView());
provider.setOptions(createOptions());
return provider;
}
Expand Down
Expand Up @@ -98,12 +98,8 @@ protected List<ObjectOrdering> createObjectOrderings(SortParam<String> sortParam
public ObjectQuery getQuery() {
return createQuery();
}

@Override
protected CompiledObjectCollectionView getCompiledObjectCollectionView() {
return getObjectCollectionView();
}
};
provider.setCompiledObjectCollectionView(getObjectCollectionView());
provider.setOptions(createOptions());
provider.setSort(MetadataType.F_CREATE_TIMESTAMP.getLocalPart(), SortOrder.DESCENDING);

Expand Down

0 comments on commit 21b2e10

Please sign in to comment.