Anyone?

On Sat, Mar 28, 2015 at 11:40 AM, Dimitris Zenios <dimitris.zen...@gmail.com
> wrote:

> Hello everyone
>
> I have a problem with a mixin that sets the first column sorted when sort
> constraints is empty.
>
> The problem goes like that
>
> Without Mixin after
>
> Mixin SetupRender
> 1.In order to get the first column I have to get the data model from grid
> 2.After getting the data model I get the first column name
> 3.Get the sort Model
> 4.Apply the sort column to the sort model.
>
> Grid Setup Render
> 1. Setup render clears the data model variable that was set when called
> from the mixin
> 2.Grid tries to prepare the caching source by passing the source
> constraints to the prepare method
> 3.In trying to get the sort constraints grid gets the data model
> 4.Since the data model was already null from  Grid setup render step 1 it
> tries to create it again
> 5.OperationException Bean editor model TheModelObject already contains a
> property model for property 'propertyname'.
>
> With Mixin After
> Grid Setup Render
> 1.Grid prepares the caching source without sort constraints (Mixin setup
> render will be called after)
>
> Mixin Setup Render
> 1.Get the data model
> 2.Get the first column name
> 3.Get the sort model
> 4.Apply the sort column to the sort model.
> 5.The grid was already prepared from grids setup render without sort
> constraints so even though I set up the sort constraints first rendering of
> the grid will go unsorted.Following renderings will be OK since sort
> constraints are persisted.
>
> Looking forwards for your comments
>
> Thanks
> Dimitris Zenios
>
>
>
>
>
>

Reply via email to