• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

HIBERNATE: retrive a List in a jsp

 
Marco Vanoli
Ranch Hand
Posts: 99
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
Junilu Lacar
Bartender
Posts: 7600
53
Android Eclipse IDE IntelliJ IDE Java Linux Mac Scala Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Marco Vanoli
Ranch Hand
Posts: 99
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks your help was very useful
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic