File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Other Application Frameworks and the fly likes passing parameters in spring Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Frameworks » Other Application Frameworks
Bookmark "passing parameters in spring" Watch "passing parameters in spring" New topic

passing parameters in spring

hirak chatterjee

Joined: Jul 26, 2007
Posts: 9
I am new to spring and finding it dificult to pass parameters to my controllers from the page when usr presses submit.
Please helpme.
Kind regards,

Be grateful. Thank opensource
Sonny Gill
Ranch Hand

Joined: Feb 02, 2002
Posts: 1211

How do you pass the parameters when not using Spring?

Spring MVC is a very thin layer on top of HttpRequest/HttpResponse. Anything that works with normal servlet code should work with Spring controllers.

The future is here. It's just not evenly distributed yet. - William Gibson
Sonny Gill LinkedIn
hirak chatterjee

Joined: Jul 26, 2007
Posts: 9
but the problem is..
the display:table tag automatically iterates to create table values dynamically.
Now i have a delete button at the end of each row.When user clicks on the delete on any of the rows dynamically created,I have to delete the row both in trhe page and in the back end.
For that I have to track ,which row user clicked on.
I am unable to get a clue about how to find that.
Please help me.
sachin yadav
Ranch Hand

Joined: Nov 24, 2005
Posts: 156
you can have a hidden field on the page containing the id value and onClick of the Delete button use javascript to submit the page along with the value of hidden field. From the URL you can pick this value and can perform the deletion. Hope this will help.
hirak chatterjee

Joined: Jul 26, 2007
Posts: 9
Let me make my page clear to all of you..

I will have a dynamic table which will have a delete and an edit button at the last column of each row.
I also have a back and cancel button below the page.
So I will have 4 "submit"s .
That's why I used multi action form controller.
But I need to get the table object inside each method for "delete" and "edit" because,If I dont get the bean object from the page table I cant delete/edit any row.
Now In simple form controller we get an Object attribute in the Model and View onSubmit() we write which serves the above written purpose.

But can anyone please help me how can I get the object in case of multi form action controller? or if there are any other ways around.

Kind regards,
I agree. Here's the link:
subject: passing parameters in spring
It's not a secret anymore!