my dog learned polymorphism*
The moose likes Struts and the fly likes HashMap :struts Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "HashMap :struts" Watch "HashMap :struts" New topic
Author

HashMap :struts

sudharshan tettu
Ranch Hand

Joined: Jul 17, 2006
Posts: 124
Hi

I have one requirement like
Initally on the page ,i have to show single row with name[textfield]
and empid[textfield].....
User has to enter the values there ,and can submit.
If he wishes he can add one more similar row before submitting ,and has to submit both .
i want to collect the data in hashmap key-value pairs.How to do it dyanmically in struts

[// for now i have dispatch action : for adding and submitting and i invoke app method in action class , if he has added a row or submitted the forms]

please help
Robert Siqueira
Ranch Hand

Joined: Jan 21, 2008
Posts: 37
Hey !!

To use a hashmap in your struts jsp page, do something like this:



struts always will popullate you hash passing the line number
and the value wich you put in the text..


regards,
Robert
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: HashMap :struts
 
Similar Threads
How to submit multiple records in one trip
mutiple record validate
selecting a table row with 3 columns and sending it to another page.
call Action from javascript
struts: how to list and update data