|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.salespointframework.web.helper.MessagesUtil
public class MessagesUtil
Toolbox class helping to handle a List of Strings
under specific Keys(s.b.) inside a ModelAndView.
| Field Summary | |
|---|---|
static java.lang.String |
errorsKey
key of error message list in model map |
static java.lang.String |
flashKey
key of success message list in model map |
| Constructor Summary | |
|---|---|
MessagesUtil()
|
|
| Method Summary | |
|---|---|
static void |
addError(org.springframework.web.servlet.ModelAndView mav,
java.lang.String error)
adds an error message into the given model map |
static void |
addFlash(org.springframework.web.servlet.ModelAndView mav,
java.lang.String flash)
adds an success message into the given model map |
static java.util.List<java.lang.String> |
clearErrors(org.springframework.web.servlet.ModelAndView mav)
clears the given model map from error messages |
static java.util.List<java.lang.String> |
clearFlash(org.springframework.web.servlet.ModelAndView mav)
clears the given model map from success messages |
static boolean |
hasErrors(org.springframework.web.servlet.ModelAndView mav)
checks if there are error messages in the given model map |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String errorsKey
public static final java.lang.String flashKey
| Constructor Detail |
|---|
public MessagesUtil()
| Method Detail |
|---|
public static void addError(org.springframework.web.servlet.ModelAndView mav,
java.lang.String error)
mav - the model map to insert error intoerror - the error message to insert
public static void addFlash(org.springframework.web.servlet.ModelAndView mav,
java.lang.String flash)
mav - the model map to insert error intoflash - the success message to insertpublic static java.util.List<java.lang.String> clearErrors(org.springframework.web.servlet.ModelAndView mav)
mav - the model map to clear
public static java.util.List<java.lang.String> clearFlash(org.springframework.web.servlet.ModelAndView mav)
mav - the model map to clear
public static boolean hasErrors(org.springframework.web.servlet.ModelAndView mav)
mav - the model map to check
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||