|
Version 4.10.0 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface MessageList
List of AppResponseMessage
objects to be shown to the user.
Used for error messages, success messages, or any such item communicated to the user. See displayMessages.tag in the example application for an illustration of rendering a MessageList.
If a message needs to survive a redirect, it must be placed in session scope, not request scope. Typically, successful edits to the database use a redirect (to avoid the duplicate-upon-browser-reload problem), so success messages will almost always be placed in session scope. Conversely, failure messages will usually be placed in request scope.
Design Note
The forces which WEB4J resolves are :
This item is provided as an interface because
AppException
needs to be both an Exception
and a MessageList.
Method Summary | |
---|---|
void |
add(AppException aAppEx)
Add all AppResponseMessage s attached to aAppEx to this list. |
void |
add(String aErrorMessage)
Add a simple AppResponseMessage to this list. |
void |
add(String aErrorMessage,
Object... aParams)
Add a compound AppResponseMessage to this list. |
List<AppResponseMessage> |
getMessages()
Return an unmodifiable List of AppResponseMessage s. |
boolean |
isEmpty()
Return true only if there are no messages in this list. |
boolean |
isNotEmpty()
Return the negation of isEmpty() . |
Method Detail |
---|
void add(String aErrorMessage)
AppResponseMessage
to this list.
The argument satisfies the same conditions as AppResponseMessage.forSimple(java.lang.String)
.
void add(String aErrorMessage, Object... aParams)
AppResponseMessage
to this list.
The arguments satisfy the same conditions as AppResponseMessage.forCompound(java.lang.String, java.lang.Object...)
.
void add(AppException aAppEx)
AppResponseMessage
s attached to aAppEx to this list.
boolean isEmpty()
Note that this method name conflicts with the empty keyword
of JSTL. Thus, isNotEmpty()
is supplied as an alternative.
boolean isNotEmpty()
isEmpty()
.
List<AppResponseMessage> getMessages()
AppResponseMessage
s.
|
Version 4.10.0 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |