public boolean execute(ActionContext actionCtx) throws Exception {
// Get session scope
Map session = actionCtx.getSessionScope();
// Remove messages as needed
removeAccessedMessages(session, Globals.MESSAGE_KEY);
// Remove error messages as needed
removeAccessedMessages(session, Globals.ERROR_KEY);
return false;
}
Removes any ActionMessages object stored in the session
under Globals.MESSAGE_KEY and Globals.ERROR_KEY
if the messages' isAccessed method returns true. This
allows messages to be stored in the session, displayed one time, and be
released here.
|