Class BroadleafThymeleaf3MessageResolver
java.lang.Object
org.thymeleaf.messageresolver.AbstractMessageResolver
org.broadleafcommerce.presentation.thymeleaf3.BroadleafThymeleaf3MessageResolver
- All Implemented Interfaces:
org.thymeleaf.messageresolver.IMessageResolver
public class BroadleafThymeleaf3MessageResolver
extends org.thymeleaf.messageresolver.AbstractMessageResolver
This implementation will check to see if the key matches the known i18n value key. If that is the case, we will attempt
to translate the requested field value for the entity/key. If not, we will delegate to other message resolvers.
- Author:
- Andre Azzolini (apazzolini)
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final Stringprotected static final org.apache.commons.logging.Logprotected org.broadleafcommerce.common.i18n.service.TranslationService -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateAbsentMessageRepresentation(org.thymeleaf.context.ITemplateContext context, Class<?> origin, String key, Object[] messageParameters) resolveMessage(org.thymeleaf.context.ITemplateContext context, Class<?> origin, String key, Object[] messageParameters) Resolve a translated value of an object's property.Methods inherited from class org.thymeleaf.messageresolver.AbstractMessageResolver
getName, getOrder, setName, setOrder
-
Field Details
-
LOG
protected static final org.apache.commons.logging.Log LOG -
I18N_VALUE_KEY
- See Also:
-
translationService
protected org.broadleafcommerce.common.i18n.service.TranslationService translationService
-
-
Constructor Details
-
BroadleafThymeleaf3MessageResolver
public BroadleafThymeleaf3MessageResolver()
-
-
Method Details
-
resolveMessage
public String resolveMessage(org.thymeleaf.context.ITemplateContext context, Class<?> origin, String key, Object[] messageParameters) Resolve a translated value of an object's property.- Parameters:
context-origin-key-messageParameters-- Returns:
- the resolved message
-
createAbsentMessageRepresentation
-