aspose file tools*
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
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
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: HashMap :struts