• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
reply
    Bookmark Topic Watch Topic
  • New Topic