You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "Darren Williams (JIRA)" <ji...@apache.org> on 2010/08/11 21:51:16 UTC

[jira] Created: (TAP5-1242) There is no way to change the default sort order of a Grid due to methods being private

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.