Hi Guys,

just a little side note on Filip“s suggesion. Instead of initializing the 
BeanModel in onActivate() you could do this:

private final BeanModel<User> model; {
  model = beanModelSource.create(User.class, false, componentResources);
  model.get("username").sortable(false);
}

Mind the final. This way the BeanModel is only created once. With onActivate() 
it is created every time the page is requested, which is less efficient. Of 
course this only works, if you do not want to change the BeanModel after 
creation.

Cheers nillehammer


----- original Nachricht --------

> Hi,
> 
> You're not disturbing - this is a mailing list, if you can't post to it, 
> what good is it? :)
> 
> Anyhow, YourGridRowClassType is User in your case. So if you want to 
> disable sorting on the username property, you would do it like this:
> 
>    @Inject
>    private BeanModelSource beanModelSource;
> 
>    @Inject
>    private ComponentResources componentResources;
> 
>    private BeanModel<User> model;
> 
>    void onActivate() {
>      model = beanModelSource.create(User.class, false, componentResources);
>      model.get("username").sortable(false);
>    }
> 
> Hope that helps.
> 
> -Filip

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to