public class AlertTag
extends javax.servlet.jsp.tagext.SimpleTagSupport
Constructor and Description |
---|
AlertTag() |
Modifier and Type | Method and Description |
---|---|
static void |
addAlertToRequest(org.springframework.web.servlet.ModelAndView modelAndView,
String message)
Adds the message as an
Alert with type=AlertType.INFO to the current modelAndView. |
static void |
addAlertToRequest(org.springframework.web.servlet.ModelAndView modelAndView,
String message,
AlertType alertType)
Adds the message as an
Alert with the given alertType to the current modelAndView. |
void |
doTag() |
public static void addAlertToRequest(org.springframework.web.servlet.ModelAndView modelAndView, String message)
Alert
with type=AlertType.INFO
to the current modelAndView.modelAndView
- The request where to save the alert in.message
- The alert message (e.g. Download successful)public static void addAlertToRequest(org.springframework.web.servlet.ModelAndView modelAndView, String message, AlertType alertType)
Alert
with the given alertType to the current modelAndView.modelAndView
- the request where to save the alert in.message
- The alert message (e.g. Download failed)alertType
- The alert type (e.g. AlertType.ERROR
)public void doTag() throws javax.servlet.jsp.JspException, IOException
doTag
in interface javax.servlet.jsp.tagext.SimpleTag
doTag
in class javax.servlet.jsp.tagext.SimpleTagSupport
javax.servlet.jsp.JspException
IOException
Copyright © 2016. All rights reserved.