Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Ajax Request - Call different method on Spring controller

 
Cj Recto
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've been having a problem regarding, I have a form which has a lot of fields , and each fields retrieves a data depending on the associated button that was clicked.

So, each my button, needs to call an ajax request, then the response will be displayed on the associated field.

I wonder if it is possible to call different method in my spring controller once i clicked on different button?

In other words, I want to make a multiple ajax request, and each request will call different method.

for example this code :


Currently what I can do, is to have one ajax request only.


Please , if anyone could help me on this.I really need this functionality and would greatly appreciate your feedback.
 
Cj Recto
Greenhorn
Posts: 26
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
CJ. If you are going to post in one location, just post in one location. If that is Stack Overflow, then just keep the question on StackOverflow. If it is here, ask just here. If on either place you don't get a response. Then close the question in the one place, then post to the other.

Because you cross post to different websites it makes it impossible for us to know that you already have an answer to your question and we might spend 10-15 minutes answering it here and it has already been answered elsewhere, therefore wasting someone's time. That really isn't fair to anyone.

I am glad you got your answer. But please don't cross post.

Thanks

Mark
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic