Example usage for org.springframework.ui ModelMap mergeAttributes

List of usage examples for org.springframework.ui ModelMap mergeAttributes

Introduction

In this page you can find the example usage for org.springframework.ui ModelMap mergeAttributes.

Prototype

public ModelMap mergeAttributes(@Nullable Map<String, ?> attributes) 

Source Link

Document

Copy all attributes in the supplied Map into this Map , with existing objects of the same name taking precedence (i.e.

Usage

From source file:org.impalaframework.extension.mvc.flash.FlashHelper.java

void mergeFlashState(HttpServletRequest request, ModelMap modelMap) {
    final Map<String, Object> flashState = (Map<String, Object>) request.getAttribute("flashState");
    if (flashState != null) {
        modelMap.mergeAttributes(flashState);
        request.removeAttribute("flashState");
    }//from   ww  w. j  av  a2 s .  c  om
}