org.broadleafcommerce.core.web.processor
Class PriceTextDisplayProcessor

java.lang.Object
  extended by org.thymeleaf.processor.AbstractProcessor
      extended by org.thymeleaf.processor.attr.AbstractAttrProcessor
          extended by org.thymeleaf.processor.attr.AbstractChildrenModifierAttrProcessor
              extended by org.thymeleaf.processor.attr.AbstractTextChildModifierAttrProcessor
                  extended by org.broadleafcommerce.core.web.processor.PriceTextDisplayProcessor
All Implemented Interfaces:
Comparable<org.thymeleaf.processor.IProcessor>, org.thymeleaf.processor.IProcessor

public class PriceTextDisplayProcessor
extends org.thymeleaf.processor.attr.AbstractTextChildModifierAttrProcessor

A Thymeleaf processor that renders a Money object according to the currently set locale options. For example, when rendering "6.99" in a US locale, the output text would be "$6.99". When viewing in France for example, you might see "6,99 (US)$". Alternatively, if currency conversion was enabled, you may see "5,59 (euro-symbol)"

Author:
apazzolini

Constructor Summary
PriceTextDisplayProcessor()
          Sets the name of this processor to be used in Thymeleaf template
 
Method Summary
 int getPrecedence()
           
protected  String getText(org.thymeleaf.Arguments arguments, org.thymeleaf.dom.Element element, String attributeName)
           
 
Methods inherited from class org.thymeleaf.processor.attr.AbstractTextChildModifierAttrProcessor
getModifiedChildren
 
Methods inherited from class org.thymeleaf.processor.attr.AbstractChildrenModifierAttrProcessor
getReplaceHostElement, processAttribute
 
Methods inherited from class org.thymeleaf.processor.attr.AbstractAttrProcessor
doProcess, getMatcher
 
Methods inherited from class org.thymeleaf.processor.AbstractProcessor
compareTo, getMessage, getMessageForProcessor, getMessageForTemplate, process
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PriceTextDisplayProcessor

public PriceTextDisplayProcessor()
Sets the name of this processor to be used in Thymeleaf template

Method Detail

getPrecedence

public int getPrecedence()
Specified by:
getPrecedence in class org.thymeleaf.processor.AbstractProcessor

getText

protected String getText(org.thymeleaf.Arguments arguments,
                         org.thymeleaf.dom.Element element,
                         String attributeName)
Specified by:
getText in class org.thymeleaf.processor.attr.AbstractTextChildModifierAttrProcessor


Copyright © 2012. All Rights Reserved.