Package org.apache.tapestry5.alerts
Class Alert
-
- org.apache.tapestry5.alerts.Alert
-
- All Implemented Interfaces:
public class Alert extends implements
An Alert that may be presented to the user. The Alert has a message, but also includes a severity (that controls how it is presented to the user), and a duration (that controls how long it is presented to the user). If themarkup
field istrue
, the message is treated as HTML and used without any escaping.- Since:
- 5.3
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description Duration
duration
long
id
A unique id (unique within this JVM and execution), used to identify an alert (used primarily when individually dismissing an alert).boolean
markup
Defines whether the message will be treated as HTML or not.message
Severity
severity
-
Constructor Summary
Constructors Constructor Description message)
Alert with default duration ofDuration.SINGLE
and default severity ofSeverity.INFO
.Alert(Duration duration, Severity severity, message)
Alert(Duration duration, Severity severity, message, boolean markup)
Alert(Severity severity, message)
Alert with default duration ofDuration.SINGLE
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description JSONObject
toJSON()
toString()
-
-
-
Field Detail
-
id
public final long id
A unique id (unique within this JVM and execution), used to identify an alert (used primarily when individually dismissing an alert).
-
message
public final message
-
markup
public final boolean markup
Defines whether the message will be treated as HTML or not.- Since:
- 5.4
-
-
Constructor Detail
-
Alert
public message)
Alert with default duration ofDuration.SINGLE
and default severity ofSeverity.INFO
.
-
Alert
public Alert(Severity severity, message)
Alert with default duration ofDuration.SINGLE
.
-
-
Method Detail
-
toString
public toString()
- Overrides:
in class
-
toJSON
public JSONObject toJSON()
-
-