Hi, we have been trying to work out a way to set the default sort order on our
BeanModel to descending by default, since this is what out SQL query does but
it appears as though the grid does not expose this method as shown below.
Is there another way we can do this? All the examples I have seen before 5.2
use this technique, but 5.2 has made this method private.
public BeanModel getBeanModel() {
//setup the model for this user
if (beanModel == null) {
beanModel=beanModelSource.createDisplayModel(License.class, messages);
beanModel.include("entered","endDate");
//sorting
if (_grid.getSortModel().getSortConstraints().isEmpty()
) {
_grid.getSortModel().updateSort("entered");
//this is still not exposed in tapestry 5.2 so
you can't change order
//_grid.setSortAscending(false);
}
}
return beanModel;
}
regards, Darren