Re: T5: disabling column sorting programmatically in Grid

2009-01-19 Thread Thiago H. de Paula Figueiredo
The code above should be, as found by Immutability: public BeanModel getBeanModel() { BeanModel model = beanModelSource.createDisplayModel(YourClass.class, messages); if (disableSorting) { PropertyModel nameColumn = model.getById("name"); nameColum

Re: T5: disabling column sorting programmatically in Grid

2009-01-19 Thread immutability
Thanks again, now you got me started (finally)! It really seems to be a better idea to just create the bean model for each request in this case. A note for others who may be trying the code above - don't ever try to call grid.getBeanModel within a getter for the model for the same grid - that will

Re: T5: disabling column sorting programmatically in Grid

2009-01-19 Thread Thiago H. de Paula Figueiredo
Em Mon, 19 Jan 2009 14:27:35 -0300, immutability escreveu: Thiago, thank you for a quick response, I still have a lot to learn! You're welcome! We all stilee need a lot to learn . . . One way to do it is to nameColumn.sortable(false) the the method that returns the BeanModel. I'm confuse

Re: T5: disabling column sorting programmatically in Grid

2009-01-19 Thread immutability
Thiago, thank you for a quick response, I still have a lot to learn! > One way to do it is to nameColumn.sortable(false) the > the method that returns the BeanModel. I'm confused at this point. I'm currently not returning the BeanModel anywhere. When I was using BeanModel to add custom columns,

Re: T5: disabling column sorting programmatically in Grid

2009-01-19 Thread Thiago H. de Paula Figueiredo
Em Mon, 19 Jan 2009 13:33:42 -0300, immutability escreveu: So I thought of the standard way of doing this - in the onSuccessFromFormFilter handler I do the following: As Tapestry uses redirect-after-post by default, it does not renders the page in the same request it processes form submis

T5: disabling column sorting programmatically in Grid

2009-01-19 Thread immutability
Hey guys, I have a very specific page where I need to disable/enable sorting for a single-column grid - the grid is under a small form, and based on the form input I need to disable or enable the sorting. So I thought of the standard way of doing this - in the onSuccessFromFormFilter handler I do