Vita Rara: A Life Uncommon

Displaying array of objects using iterator

Hi
I am facing a problem in Struts2, In my sample application I have Array of objects (Say person name) , I need to display these names as a editable text fields , I am using Iterators for this , I am successful in diaplying, But When I cange the same value and submit the form. I am not getting the entire array, intead the array holds null value.

Say for Exaple in my form bean I have a property
Name [] names;

In my JSP I have the iterator as

If there are 3 names then I can get these names on teh UI but when I edit and sumbit, then "names" array is not getting updated. Please help me in this regard

Reply

Please solve the math problem above and type in the result. e.g. for 1+1, type 2
  • Allowed HTML tags: <a> <img> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <pre> <h1> <h2> <h3>
  • Lines and paragraphs break automatically.
More information about formatting options