| java.util.HashMap org.springframework.ui.ModelMap
Constructor Summary | |
public | ModelMap() Construct a new, empty ModelMap . | public | ModelMap(String modelName, Object modelObject) Construct a new ModelMap containing the supplied model object
under the supplied name. | public | ModelMap(Object modelObject) Construct a new ModelMap containing the supplied model object. |
ModelMap | public ModelMap()(Code) | | Construct a new, empty ModelMap .
|
ModelMap | public ModelMap(Object modelObject)(Code) | | Construct a new ModelMap containing the supplied model object.
Uses attribute name generation to generate the key for the supplied model
object.
See Also: ModelMap.addObject(Object) |
addAllObjects | public ModelMap addAllObjects(Map objects)(Code) | | Copy all objects in the supplied Map into this Map .
|
addObject | public ModelMap addObject(String modelName, Object modelObject)(Code) | | Add the supplied Object under the supplied name.
Parameters: modelName - the name of the model attribute (never null ) Parameters: modelObject - the model attribute object (can be null ) |
addObject | public ModelMap addObject(Object modelObject)(Code) | | Add the supplied Object to this Map used a
org.springframework.core.Conventions.getVariableName generated name .
Note: Empty
Collection Collections are not added to
the model when using this method because we cannot correctly determine
the true convention name. View code should check for null rather than
for empty collections as is already done by JSTL tags.
Parameters: modelObject - the model attribute object (never null ) |
|
|