permaculture playing cards
The moose likes Struts and the fly likes Element Array: Text-boxes 2D Array - How to... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Building Microservices this week in the Design forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Element Array: Text-boxes 2D Array - How to..." Watch "Element Array: Text-boxes 2D Array - How to..." New topic

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

Ganesh Ramani

Joined: Aug 07, 2007
Posts: 20
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

Joined: Feb 15, 2005
Posts: 4864
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 ]

Consultant, Sima Solutions
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link:
subject: Element Array: Text-boxes 2D Array - How to...
It's not a secret anymore!