Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

HashMap :struts  RSS feed

 
sudharshan tettu
Ranch Hand
Posts: 126
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!