• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Spring annotation : how to return string value like success or failure

 
Chetan Ram
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have an application which are used by recruitment team. I am using Spring mvc 3.1 annotations.

I have a page where new user information is entered like User profile, Experience, Projects & technology worked.

I am using tabs
i.e. first tab is for User Profile contains user name, age, address etc... with in a form using spring form
second tab is for Experience contains 1st, 2nd and 3rd previous companies worked with in a form
and third tab for Projects & technologies used with in a form.

Initially, only User Profile tab will be enabled



One JSP file contains all the forms, I don't want to have page refresh on adding each user information so want to make AJAX request to add User information i.e. on click of user form button then addUserInfo() method is called which makes AJAX request.

Same approach for adding User Experience and project.

After sending request, I want to know whether User information was successful added to data base or not. If successfully added, I want to return "success" or else "failure".

If the response contains "success" then I will enable next tab i.e. Experience and follow same approach to enable Projects & Technology

Thanks in advance.

Regards,
Chinnu
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yep sounds like AJAX and a Spring MVC REST api design. Also use JQuery on the client side.

Now, unfortunately, trying to write exactly how to do all of that in one post would keep me here all night. It is a long post. It isn't difficult after you have done a couple, just would be a really long post.

Mark
 
Chetan Ram
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Mark for the response.

I understand that it might take more time to write an example. Can you please provide a link which contains the information or sample needed?

Regards,
Chinnu
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Chetan Ram wrote:Thanks Mark for the response.

I understand that it might take more time to write an example. Can you please provide a link which contains the information or sample needed?

Regards,
Chinnu


Unfortuantely, off the top of my head, I would just recommend reading the Spring MVC section in the SpringFramework documentation. Or a Google search.

Good Luck

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