There is no way to change the default sort order of a Grid due to methods being
private
---------------------------------------------------------------------------------------
Key: TAP5-1242
URL: https://issues.apache.org/jira/browse/TAP5-1242
Project: Tapestry 5
Issue Type: Improvement
Components: tapestry-core
Affects Versions: 5.2.0
Reporter: Darren Williams
There is currently no way to supply the default sort order for the grid when
pragrammatically populating the grid as shown below. If the sortAscending
method was made public we could set it on render.
@Inject
private BeanModelSource beanModelSource;
private BeanModel beanModel;
@Inject
private Messages messages;
public void setupRender() {
logger.warn("Setup");
beanModel=beanModelSource.createDisplayModel(License.class,
messages);
beanModel.include("entered","endDate");
beanModel.add("purchase.orgUnit.name").label("Organization");
beanModel.add("purchase.product.name").label("Product");
beanModel.add("purchase.licenseType.name").label("License");
//sorting
if (_grid.getSortModel().getSortConstraints().isEmpty() ) {
_grid.getSortModel().updateSort("entered");
//this is still a private method.....
//_grid.setSortAscending(false);
}
}
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.