Thank you! This is what I wanted to do...

But anyways, I could avoid doing this because of the sorting+activation context 
issues (i made the Entity object persistent in the page), but this will come 
come in handy in another situation.

Everton




________________________________
De: Thiago H. de Paula Figueiredo <thiag...@gmail.com>
Para: Tapestry users <users@tapestry.apache.org>
Enviadas: Sábado, 9 de Janeiro de 2010 16:07:38
Assunto: Re: How to disable column sorting on a Grid component?

Em Sat, 09 Jan 2010 15:09:30 -0200, Everton Agner <everton_ag...@yahoo.com.br> 
escreveu:

> Hi,

Hi!

> How can I do that? I haven't found anything about that. I only know that if I 
> add one column to the Grid in the "add" attribute (or directly at it's 
> BeanModel), it will not be part of the Sorting.

@Inject BeanModelSource to create a BeanModel yourserf. Then:

final List<String> propertyNames = model.getPropertyNames();
for (String propertyName : propertyNames) {
    model.get(propertyName).sortable(false);
}

Then pass this BeanModel instance to the model parameter of the Grid component. 
;)

--Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, and 
instructor
Owner, software architect and developer, Ars Machina Tecnologia da Informação 
Ltda.
http://www.arsmachina.com.br

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org


      
____________________________________________________________________________________
Veja quais são os assuntos do momento no Yahoo! +Buscados
http://br.maisbuscados.yahoo.com

Reply via email to