When upgrading to Tapestry 5.2 the inPlace Ajax grid no longer works. It 
appears to be related to the sorting and the fact that the _grid sort model 
gets reset to null when using the navigation. It works fine if you don't use 
the AJAX inPlace call.

Is anyone else seeing the same thing on Tap 5.2? It looks like the singleton 
pattern has changed the behavior.


    @Component(id="receiptGrid")
    private Grid _grid;
        
    @Inject
    private BeanModelSource beanModelSource;
    private BeanModel beanModel;
    @Inject
    private Messages messages;
        
        public void setupRender() {
                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() ) {
                        logger.warn("sort constraints");
                        _grid.getSortModel().updateSort("entered");
                        //this is still not exposed in tapestry 5.2 so you 
can't change order
                        //_grid.setSortAscending(false);
            }
        }
        
        public BeanModel getBeanModel() {
                return beanModel;
        }
        

cheers, darren

Reply via email to