如何从ActionMessage中删除特定的错误消息。例如,msgKey
下面是"ABC"
,msg.getKey()
是"ABC"
。现在两者都相同时我想从ActionMessage中删除密钥。我该怎么做?
Iterator it = warningMessages.get(ActionMessages.GLOBAL_MESSAGE);
while (it.hasNext()) {
ActionMessage msg = (ActionMessage) it.next();
if (msgKey.equalsIgnoreCase(msg.getKey())) {
// remove msgKey from warningMessages
}
}