spring-framework / org.springframework.web.bind / EscapedErrors

EscapedErrors

open class EscapedErrors : Errors

Errors wrapper that adds automatic HTML escaping to the wrapped instance, for convenient usage in HTML views. Can be retrieved easily via RequestContext's getErrors method.

Note that BindTag does not use this class to avoid unnecessary creation of ObjectError instances. It just escapes the messages and values that get copied into the respective BindStatus instance.

Author
Juergen Hoeller

Since
01.03.2003

See Also
org.springframework.web.servlet.support.RequestContext#getErrorsorg.springframework.web.servlet.tags.BindTag

Constructors

<init>

EscapedErrors(source: Errors)

Create a new EscapedErrors instance for the given source instance.

Functions

addAllErrors

open fun addAllErrors(errors: Errors): Unit

getAllErrors

open fun getAllErrors(): MutableList<ObjectError>

getErrorCount

open fun getErrorCount(): Int

getFieldError

open fun getFieldError(): FieldError
open fun getFieldError(field: String): FieldError

getFieldErrorCount

open fun getFieldErrorCount(): Int
open fun getFieldErrorCount(field: String): Int

getFieldErrors

open fun getFieldErrors(): MutableList<FieldError>
open fun getFieldErrors(field: String): MutableList<FieldError>

getFieldType

open fun getFieldType(field: String): Class<*>

getFieldValue

open fun getFieldValue(field: String): Any

getGlobalError

open fun getGlobalError(): ObjectError

getGlobalErrorCount

open fun getGlobalErrorCount(): Int

getGlobalErrors

open fun getGlobalErrors(): MutableList<ObjectError>

getNestedPath

open fun getNestedPath(): String

getObjectName

open fun getObjectName(): String

getSource

open fun getSource(): Errors

hasErrors

open fun hasErrors(): Boolean

hasFieldErrors

open fun hasFieldErrors(): Boolean
open fun hasFieldErrors(field: String): Boolean

hasGlobalErrors

open fun hasGlobalErrors(): Boolean

popNestedPath

open fun popNestedPath(): Unit

pushNestedPath

open fun pushNestedPath(subPath: String): Unit

reject

open fun reject(errorCode: String): Unit
open fun reject(errorCode: String, defaultMessage: String): Unit
open fun reject(errorCode: String, errorArgs: Array<Any>, defaultMessage: String): Unit

rejectValue

open fun rejectValue(field: String, errorCode: String): Unit
open fun rejectValue(field: String, errorCode: String, defaultMessage: String): Unit
open fun rejectValue(field: String, errorCode: String, errorArgs: Array<Any>, defaultMessage: String): Unit

setNestedPath

open fun setNestedPath(nestedPath: String): Unit