0

I want to send a list of string using hidden field or any other way it can be done. I send a list of lists to the view from action & want to send the list selected by the user which is a list of String.

Action -----> List<List<String>> -------> View (using iterator within iterator)
want to do...
View ---------> List<String> [as selected by user] ----------> Action

Please help me by giving a example or link.

Any guidance,link or reference will be appreciable.

Amit Kumar
  • 2,685
  • 2
  • 37
  • 72
  • 1
    Try modelling your objects better (`List` and `YourObject` contains a `List`), [like described in this answer](http://stackoverflow.com/a/15009137/1654265), or try with `@Element` Annotation like [in the accepted one](http://stackoverflow.com/a/15108654/1654265) – Andrea Ligios Oct 03 '13 at 13:17
  • 1
    have a look at http://stackoverflow.com/questions/10012648/passing-a-list-from-action-class-to-jsp-and-from-jsp-to-action-class-in-struts2 – Umesh Awasthi Oct 03 '13 at 13:19
  • Thank you Andrea & Umesh This link helped me http://stackoverflow.com/questions/10012648/passing-a-list-from-action-class-to-jsp-and-from-jsp-to-action-class-in-struts2 – Amit Kumar Oct 03 '13 at 13:57

0 Answers0