Class 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
    • 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)
      • errors

        public static List<String> errors​(org.thymeleaf.context.IExpressionContext context)
      • 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)
      • idFromName

        public static String idFromName​(String fieldName)
      • 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)