This week's book giveaway is in the Design forum.
We're giving away four copies of Design for the Mind and have Victor S. Yocco on-line!
See this thread for details.
Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Element Array: Text-boxes 2D Array - How to...

 
Ganesh Ramani
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a situation where the page has a table sreucture of text-box 2D array. The page must allow dynamic addition/removal of rows.

This is typically a kind of 2D element-array, which is array of text-boxes.

In struts, how this situation can be handled to retrieve data from form - where the rows are dynamic.

how action-form can be built to capture the data from the 2D text-box array?

Please help.
 
Merrill Higginson
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can use indexed properties to create a dynamic table in Struts, but you must use a single-dimensional array or collection of JavaBeans. Multidimensional arrays are not supported for indexed properties. For more information on indexed properties along with a working example, see question 6 of the JavaRanch Struts FAQ
[ August 14, 2007: Message edited by: Merrill Higginson ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic