You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "Howard M. Lewis Ship (JIRA)" <ji...@apache.org> on 2014/08/27 20:54:01 UTC

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

     [ https://issues.apache.org/jira/browse/TAP5-1242?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Howard M. Lewis Ship closed TAP5-1242.
--------------------------------------

    Resolution: Invalid

Recent fix TAP5-1689 provides an avenue to handle this situation.

> 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
>            Reporter: Darren Williams
>              Labels: bulk-close-candidate
>
> 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 was sent by Atlassian JIRA
(v6.2#6252)