This week's book giveaway is in the Big Data forum.
We're giving away four copies of Elasticsearch in Action and have Radu Gheorghe & Matthew Lee Hinman on-line!
See this thread for details.
The moose likes Struts and the fly likes Adding grids in MapBacked form Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Elasticsearch in Action this week in the Big Data forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Adding grids in MapBacked form" Watch "Adding grids in MapBacked form" New topic

Adding grids in MapBacked form

Nick Sher
Ranch Hand

Joined: Nov 10, 2008
Posts: 78

I am using map-backed form in Struts.
I am trying to achieve the following:
1. Create a form where user can add one or more editable grids, the columns of the grid are user-defined.
2. Provide 'Add' button to insert new row to the grid.
3. Each cell inserted in a row is text field.
4. user saves the data entered in the text field.
5. User restores the saved values and will see the results as a table.

I have done Steps 1 to 3 using simple javascript. However, i am unable to come up with an approach to save the grid and restore the table.

Can anyone provide pointers on how can I save the Grid object? Shall I append the values entered in text field as one string so that one row represents one string with some delimiting characters in between?

Please help

Nick Sher
Ranch Hand

Joined: Nov 10, 2008
Posts: 78
Any help please
Sagar Rohankar
Ranch Hand

Joined: Feb 19, 2008
Posts: 2902

Originally posted by Nick Sher:

I am using map-backed form in Struts.

Pardon for my little knowledge , but can you explain me what is map-backed form ? Is it a bean which contains single property which is of type map ?

Or this links may fulfill your requirement !

[LEARNING bLOG] | [Freelance Web Designer] | [and "Rohan" is part of my surname]
I agree. Here's the link:
subject: Adding grids in MapBacked form