On Mon, 27 Sep 2010 05:33:35 -0300, Cucchietti Denis <[email protected]> wrote:

Hello everybody !

Hi!

I have a little problem in my grid component. I want to offer the possibility to sort a column in my grid. The problem is that this column is not an attribute of my object.
JAVA :

BeanModel<Structure> model = this.beanModelSource.createDisplayModel(Structure.class, this.messages);
model.add("relation", null).sortable(true);

You'll need to create a PropertyConduit and then use it in the model: model.add("relation", yourPropertyConduit). In this case, you can have an empty set() method, as you're not using this inside a BeanEditor ou BeanEditform. This way, Grid will know how to get the values of that column and sort them.

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

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to