Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
There is no way to display success message(s). [SPR-2657] #7346
There is no way to display success message(s) like struts' ActionMessage. Spring should provide Messages inteface in a similar way of Errors and related tag libraries.
12 votes, 12 watchers
Rick Evans commented
I'm not quite sure what you mean with this issue; can you please explain a little more, perhaps supplying a use case?
If you want to display data upon sucess, you can put the data that you want displayed in the ModelAndView.
Daigo Kobayashi commented
Actually I can set message to ModelAndView. However, I can't handle following issue cleverly.
Akram BEN AISSI commented
I would be also interrested with this evolution for a secondary purpose:
In fact, I want to warn (or inform) users about some validation problems (that are not critical, not errors in facts). if the user submit the form again with no changes, I want to perform the submit.
Gunnar Hillert commented
This is one area where Struts is superior IMO and I wish Spring MVC would offer functionality similar to Struts' ActionMessage. (In my opinion good success messages are just as important as good error messages :-)
Also, on a side note - would it be wise to have messages support for spring core? In quite a few cases my service layer methods need to pass back messages and I wonder if that is something to 'standardize' instead of rolling your own approach?
I also need this feature. In the meanwhile I think we'll be developing (or borrowing) a custom one.
SWF appears to have this feature : http://static.springsource.org/spring-webflow/docs/2.3.x/reference/htmlsingle/spring-webflow-reference.html#view-messages.
JSF has a similar feature (http://wiki.apache.org/myfaces/Displaying_Errors/Infos/Warnings_in_JSF_Pages).
Here's the API to add an info message to the queue :
Seam 2 (works on top of JSF) has a simple API for info messages, and a less simple for ERROR/WARN messages (http://docs.jboss.org/seam/2.2.2.Final/reference/en-US/html/framework.html#d0e8463)