Package org.thymeleaf.spring4.util
Class FieldUtils
- Object
-
- org.thymeleaf.spring4.util.FieldUtils
-
public final class FieldUtils extends Object
Static utility class containing methods for dealing with form fields in Spring-enabled environments.
Note a class with this name existed since 1.0, but it was completely reimplemented in Thymeleaf 3.0
- Since:
- 3.0.0
- Author:
- Daniel Fernández, Tobias Gafner
-
-
Field Summary
Fields Modifier and Type Field Description static String
ALL_EXPRESSION
static String
ALL_FIELDS
static String
GLOBAL_EXPRESSION
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static List<DetailedError>
detailedErrors(org.thymeleaf.context.IExpressionContext context)
static List<DetailedError>
detailedErrors(org.thymeleaf.context.IExpressionContext context, String field)
static List<String>
errors(org.thymeleaf.context.IExpressionContext context)
static List<String>
errors(org.thymeleaf.context.IExpressionContext context, String field)
static org.springframework.web.servlet.support.BindStatus
getBindStatus(org.thymeleaf.context.IExpressionContext context, boolean optional, String expression)
static org.springframework.web.servlet.support.BindStatus
getBindStatus(org.thymeleaf.context.IExpressionContext context, String expression)
static org.springframework.web.servlet.support.BindStatus
getBindStatusFromParsedExpression(org.thymeleaf.context.IExpressionContext context, boolean optional, boolean useSelectionAsRoot, String expression)
static org.springframework.web.servlet.support.BindStatus
getBindStatusFromParsedExpression(org.thymeleaf.context.IExpressionContext context, boolean useSelectionAsRoot, String expression)
static List<DetailedError>
globalDetailedErrors(org.thymeleaf.context.IExpressionContext context)
static List<String>
globalErrors(org.thymeleaf.context.IExpressionContext context)
static boolean
hasAnyErrors(org.thymeleaf.context.IExpressionContext context)
static boolean
hasErrors(org.thymeleaf.context.IExpressionContext context, String field)
static boolean
hasGlobalErrors(org.thymeleaf.context.IExpressionContext context)
static String
idFromName(String fieldName)
-
-
-
Field Detail
-
ALL_FIELDS
public static final String ALL_FIELDS
- See Also:
- Constant Field Values
-
GLOBAL_EXPRESSION
public static final String GLOBAL_EXPRESSION
- See Also:
- Constant Field Values
-
ALL_EXPRESSION
public static final String ALL_EXPRESSION
- See Also:
- Constant Field Values
-
-
Method Detail
-
hasErrors
public static boolean hasErrors(org.thymeleaf.context.IExpressionContext context, String field)
-
hasAnyErrors
public static boolean hasAnyErrors(org.thymeleaf.context.IExpressionContext context)
-
hasGlobalErrors
public static boolean hasGlobalErrors(org.thymeleaf.context.IExpressionContext context)
-
errors
public static List<String> errors(org.thymeleaf.context.IExpressionContext context, String field)
-
globalErrors
public static List<String> globalErrors(org.thymeleaf.context.IExpressionContext context)
-
detailedErrors
public static List<DetailedError> detailedErrors(org.thymeleaf.context.IExpressionContext context)
-
detailedErrors
public static List<DetailedError> detailedErrors(org.thymeleaf.context.IExpressionContext context, String field)
-
globalDetailedErrors
public static List<DetailedError> globalDetailedErrors(org.thymeleaf.context.IExpressionContext context)
-
getBindStatus
public static org.springframework.web.servlet.support.BindStatus getBindStatus(org.thymeleaf.context.IExpressionContext context, String expression)
-
getBindStatus
public static org.springframework.web.servlet.support.BindStatus getBindStatus(org.thymeleaf.context.IExpressionContext context, boolean optional, String expression)
-
getBindStatusFromParsedExpression
public static org.springframework.web.servlet.support.BindStatus getBindStatusFromParsedExpression(org.thymeleaf.context.IExpressionContext context, boolean useSelectionAsRoot, String expression)
-
getBindStatusFromParsedExpression
public static org.springframework.web.servlet.support.BindStatus getBindStatusFromParsedExpression(org.thymeleaf.context.IExpressionContext context, boolean optional, boolean useSelectionAsRoot, String expression)
-
-