Class ErrorsWithDetails

java.lang.Object
de.odrotbohm.spring.web.model.ErrorsWithDetails

public class ErrorsWithDetails extends Object
A model object to allow replacing the error messages rendered for field errors with custom details.
Author:
Oliver Drotbohm
  • Constructor Details

    • ErrorsWithDetails

      public ErrorsWithDetails()
  • Method Details

    • addDetails

      public ErrorsWithDetails addDetails(String key, Object details)
      Registers the given details object to be used for the given key, i.e. field name.
      Parameters:
      key - must not be null or empty.
      details - can be null.
      Returns:
      will never be null.
    • toMap

      public Map<String,Object> toMap()