ZMObject
└─ZMMessages
public class ZMMessages
extends ZMObject
| Field Summary | |
|---|---|
| final str | Catch all (global) message reference type. |
| final str | Message type error. |
| final str | Message type message. |
| final str | Message type success. |
| final str | Message type warn. |
| Fields inherited from org.zenmagick.core.ZMObject | |
|---|---|
| properties_ | |
| Constructor Summary | |
|---|---|
Create new instance. |
|
| Method Summary | |
|---|---|
| void | add(string text, string type, string ref) Generic add a message. |
| void | addAll(array messages) Add a group of messages. |
| void | clear() Clear all messages. |
| void | error(string text, string ref) Add an error message. |
| array | getMessages(string ref, boolean clear) Get all messages. |
| boolean | hasMessages(string ref) Checks if there are any messages available. |
| static void | instance() Get instance. |
| void | msg(string text, string ref) Add a default message. |
| void | success(string text, string ref) Add a success message. |
| void | warn(string text, string ref) Add a warning message. |
| Methods inherited from org.zenmagick.core.ZMObject | |
|---|---|
| attachMethod, get, getAttachedMethods, getPropertyNames, set, singleton | |
public final str REF_GLOBAL = 'global'
Catch all (global) message reference type.
public final str T_ERROR = 'error'
Message type error.
public final str T_MESSAGE = 'msg'
Message type message.
public final str T_SUCCESS = 'success'
Message type success.
public final str T_WARN = 'warn'
Message type warn.
public ZMMessages()
Create new instance.
public void add(string text, string type, string ref)
Generic add a message.
ZMMessages::T_MESSAGE.ZMMessages::REF_GLOBAL.public void addAll(array messages)
Add a group of messages.
ZMMessage instances.public void clear()
Clear all messages.
public void error(string text, string ref)
Add an error message.
ZMMessages::REF_GLOBAL.public array getMessages(string ref, boolean clear)
Get all messages.
null for all.false.ZMMessage instances.public boolean hasMessages(string ref)
Checks if there are any messages available.
null for all.true if messages are available, false if not.public static void instance()
Get instance.
public void msg(string text, string ref)
Add a default message.
ZMMessages::REF_GLOBAL.public void success(string text, string ref)
Add a success message.
ZMMessages::REF_GLOBAL.public void warn(string text, string ref)
Add a warning message.
ZMMessages::REF_GLOBAL.
Messages to be displayed to the user.
Messages will be saved in the session if not delivered.
Code supported message levels are:
T_ERRORT_WARNT_SUCCESST_MESSAGE(this is the default if no type specified)