tapestry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Howard M. Lewis Ship (JIRA)" <j...@apache.org>
Subject [jira] [Closed] (TAP5-1242) There is no way to change the default sort order of a Grid due to methods being private
Date Wed, 27 Aug 2014 18:54:01 GMT

     [ 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)

Mime
View raw message