aspose file tools*
The moose likes Object Relational Mapping and the fly likes HIBERNATE: retrive a List in a jsp Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "HIBERNATE: retrive a List in a jsp" Watch "HIBERNATE: retrive a List in a jsp" New topic
Author

HIBERNATE: retrive a List in a jsp

Marco Vanoli
Ranch Hand

Joined: Jan 12, 2005
Posts: 99
In an Hibernate session i use a createQuery to retrive a list of ITEM object wich have as property :
String a;
Collection b;

and Collection b has String c as property.

Then in the jsp page (using JSTL) i can use normally ITEM.a to show the variable,
but how can i show the nested collection variable? (ITEM.b.c gives ERROR!)

tnkx a lot
[ July 28, 2005: Message edited by: Marco Vanoli ]

bye, <br />Marco
Junilu Lacar
Bartender

Joined: Feb 26, 2001
Posts: 5298
    
  10

Originally posted by Marco Vanoli:
Collection b has String c as property.
...
(ITEM.b.c gives ERROR!)
[ July 28, 2005: Message edited by: Marco Vanoli ]


Given that Item is declared as



"ITEM.b.c" translates to "item.getB().getC()"

which will result in a compilation error since getC() is not part of the Collection API.


Junilu - [How to Ask Questions] [How to Answer Questions]
Marco Vanoli
Ranch Hand

Joined: Jan 12, 2005
Posts: 99
Thanks your help was very useful
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: HIBERNATE: retrive a List in a jsp