Package org.opennms.web.tags
Class AlertTag
- java.lang.Object
-
- javax.servlet.jsp.tagext.SimpleTagSupport
-
- org.opennms.web.tags.AlertTag
-
- All Implemented Interfaces:
javax.servlet.jsp.tagext.JspTag
,javax.servlet.jsp.tagext.SimpleTag
public class AlertTag extends javax.servlet.jsp.tagext.SimpleTagSupport
Is used to render messages from any controller in the ui. Another word for alert could be notification, message, information. The tag is used to inform the user e.g. about successful operations.
-
-
Constructor Summary
Constructors Constructor Description AlertTag()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static void
addAlertToRequest(org.springframework.web.servlet.ModelAndView modelAndView, java.lang.String message)
Adds the message as anAlert
with type=AlertType.INFO
to the current modelAndView.static void
addAlertToRequest(org.springframework.web.servlet.ModelAndView modelAndView, java.lang.String message, AlertType alertType)
Adds the message as anAlert
with the given alertType to the current modelAndView.void
doTag()
-
-
-
Method Detail
-
addAlertToRequest
public static void addAlertToRequest(org.springframework.web.servlet.ModelAndView modelAndView, java.lang.String message)
Adds the message as anAlert
with type=AlertType.INFO
to the current modelAndView.- Parameters:
modelAndView
- The request where to save the alert in.message
- The alert message (e.g. Download successful)
-
addAlertToRequest
public static void addAlertToRequest(org.springframework.web.servlet.ModelAndView modelAndView, java.lang.String message, AlertType alertType)
Adds the message as anAlert
with the given alertType to the current modelAndView.- Parameters:
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
)
-
doTag
public void doTag() throws javax.servlet.jsp.JspException, java.io.IOException
- Specified by:
doTag
in interfacejavax.servlet.jsp.tagext.SimpleTag
- Overrides:
doTag
in classjavax.servlet.jsp.tagext.SimpleTagSupport
- Throws:
javax.servlet.jsp.JspException
java.io.IOException
-
-