public abstract class

BindingResultUtils

extends Object
java.lang.Object
   ↳ org.springframework.validation.BindingResultUtils

Class Overview

Convenience methods for looking up BindingResults in a model Map.

See Also

Summary

Public Constructors
BindingResultUtils()
Public Methods
static BindingResult getBindingResult(Map model, String name)
Find the BindingResult for the given name in the given model.
static BindingResult getRequiredBindingResult(Map model, String name)
Find a required BindingResult for the given name in the given model.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public BindingResultUtils ()

Public Methods

public static BindingResult getBindingResult (Map model, String name)

Find the BindingResult for the given name in the given model.

Parameters
model the model to search
name the name of the target object to find a BindingResult for
Returns
  • the BindingResult, or null if none found
Throws
IllegalStateException if the attribute found is not of type BindingResult

public static BindingResult getRequiredBindingResult (Map model, String name)

Find a required BindingResult for the given name in the given model.

Parameters
model the model to search
name the name of the target object to find a BindingResult for
Returns
  • the BindingResult (never null)
Throws
IllegalStateException if no BindingResult found