I have a list which has a another list defined in it.So,assume them as a reflection objects.(List inside a list inside a list …so on). In my view I start with one YES/NO question and based on YES, I have to display a collection of data. Again when a user checks YES display the set.
I can achieve this by constructing the question and hiding them before presenting to the client and when user checks YES,I enable that set.But the collection which I am working is huge,so I don’t want to render the collection and hide if that is of no use. I would like to know if there is a better way to achieve this.(Spring MVC 3, Java 6)
Thanks
To load “nested” questions just when you actually need it you could use ajax.
For example, in your Spring MVC controller you could implement a method like this:
Questioncould be a simple object:Then in your page, if you are using jQuery:
The
getNestedQuestionsfunction can be called from your radiobuttononChangeevent handler, passing the parent question id.