aspose file tools*
The moose likes Spring and the fly likes Spring annotation : how to return string value like success or failure Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "Spring annotation : how to return string value like success or failure" Watch "Spring annotation : how to return string value like success or failure" New topic
Author

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

Chetan Ram
Greenhorn

Joined: Mar 10, 2011
Posts: 20
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

Joined: Feb 05, 2001
Posts: 17250
    
    6

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


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
Chetan Ram
Greenhorn

Joined: Mar 10, 2011
Posts: 20
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

Joined: Feb 05, 2001
Posts: 17250
    
    6

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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Spring annotation : how to return string value like success or failure