Hi Thiago.
First of all thanks for your response.
I have tried with a property conduit but the problem is my new column is not an
attribute of my object Structure so I don't know how to use it :
PropertyConduit propCdtAttribute =
this.propertyConduitSource.create(String.class, "relation");
model.add("relation",propCdtAttribute).sortable(true);
This solution doesn't work because the attribute "relation" doesn't exists in
String.class
I have also tried with PropertyConduit propCdtAttribute =
this.propertyConduitSource.create(String.class, "relation"); without success.
Cheers
-----Message d'origine-----
De : Thiago H. de Paula Figueiredo [mailto:[email protected]]
Envoyé : lundi 27 septembre 2010 14:47
À : Tapestry users
Objet : Re: Attribute sortable in grid
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]
Ce message et les pièces jointes sont confidentiels et réservés à l'usage
exclusif de ses destinataires. Il peut également être protégé par le secret
professionnel. Si vous recevez ce message par erreur, merci d'en avertir
immédiatement l'expéditeur et de le détruire. L'intégrité du message ne pouvant
être assurée sur Internet, la responsabilité du groupe Atos Origin ne pourra
être recherchée quant au contenu de ce message. Bien que les meilleurs efforts
soient faits pour maintenir cette transmission exempte de tout virus,
l'expéditeur ne donne aucune garantie à cet égard et sa responsabilité ne
saurait être recherchée pour tout dommage résultant d'un virus transmis.
This e-mail and the documents attached are confidential and intended solely for
the addressee; it may also be privileged. If you receive this e-mail in error,
please notify the sender immediately and destroy it. As its integrity cannot be
secured on the Internet, the Atos Origin group liability cannot be triggered
for the message content. Although the sender endeavours to maintain a computer
virus-free network, the sender does not warrant that this transmission is
virus-free and will not be liable for any damages resulting from any virus
transmitted.