Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

passing parameters in spring

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
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,
 
Ranch Hand
Posts: 1211
Mac IntelliJ IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
hirak chatterjee
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 156
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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,
 
machines help you to do more, but experience less. Experience this tiny ad:
the value of filler advertising in 2020
https://coderanch.com/t/730886/filler-advertising
    Bookmark Topic Watch Topic
  • New Topic