Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem in showing nested lists in jsp page

 
dhaval tamboli
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am using struts2.

My design is like I have Araaylist which has another arraylist in it.

i.e.
In My action class I do have



and GenericModel contains



and OptionModel contains



I have eneterd all information correctly but I am not able to show them on JSP in way I want.

my JSP Page contains



I want to show all information contained in previewList, I can see Question_Name and other but I am not sure how to access information from OptionModel list.
Above code is not working (just the oList part) I am not able to see its contents.

please give your thoughts to solve my problem

Thanks,
Dhaval

 
Ankit Garg
Sheriff
Posts: 9521
22
Android Google Web Toolkit Hibernate IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The s:iterator tag pushes the iterated element on the top of the value stack, so this code should work
 
dhaval tamboli
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ankit,

I know I am doing right, but I am not able to get anything in jsp. However I tried to see in action class if I am loading it right or if there is any other problem but there I can see each elements in order by get methods.

Here in JSP page, I tried to see its size but even that also not showing anything.

I tried

but still nothing. I dont know what to do next
please help me

Thanks
Dhaval
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic