1

如何从 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
    }
}
4

0 回答 0