These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Problème d'affichage de Collection
PostPosted: Fri Jul 28, 2006 6:49 am 
Newbie

Joined: Thu Jun 29, 2006 7:32 am
Posts: 2
Bonjour,

J'ai une table "ClientPresent" resultat d'une relation many to many entre:

Contrat <---> Contart.java
Client <---> Client.java

mes fichiers de mapping

Contrat

Code:
....
<set name="clientsPossedantLeContrat" table="ClientPresent" lazy="false">
         <key column="CONTRATID"/>
         <many-to-many column="NOMCLIENT" class="service.hibernate.Client"/>         
</set>   


et le Client


Code:
....
<set name="contratsPresentsPourLeClient" table="ClientPresent" lazy="false">
         <key column="NOMCLIENTFK"/>
         <many-to-many column="CONTRATID" class="service.hibernate.Contrat"/>
</set>


sur ma page JSP, quand je veux afficher la presence d'un contrat pour un client, je fais ceci

Code:
<logic:iterate name="DataUserChoices" property="listClient" scope="session" id="client" indexId="index">

<logic:equal name="ssa" property="viewChecked" value="true">      
<display:column sortable="true" property="<%="ssasPossedantLeContrat"%>"      title="<%=client.getLibelle())%>" />
</logic:equal>

</logic:iterate>


lors de l'affichage, j'ai ça:
[service.hibernate.Client@3f4b95f0, service.hibernate.Ssa@3f30cc44]

ça veut dire que le contrat est présents chez deux clients.

Ce que je veux, c'est afficher le nom du client, en d'autre terme utliser les methodes de la classe Client.

Comment je peux faire.
et ajouter quelque choses à :

Code:
....

<logic:equal name="ssa" property="viewChecked" value="true">      
<display:column sortable="true" property="<%="ssasPossedantLeContrat" << ici >>%>"      title="<%=client.getLibelle())%>" />
....


en évitant l'erreur
Error looking up property "" in object type "org.hibernate.collection.PersistentSet"


Si j'étais pas très claire, merci de me le signaler .. asking 4 your help plzzzzzzzzzzzzz


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
cron
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.