org.springframework.web.servlet.view.velocity
Class VelocityView.LocaleAwareNumberTool

java.lang.Object
  extended by org.apache.velocity.tools.generic.NumberTool
      extended by org.springframework.web.servlet.view.velocity.VelocityView.LocaleAwareNumberTool
Enclosing class:
VelocityView

private static class VelocityView.LocaleAwareNumberTool
extends org.apache.velocity.tools.generic.NumberTool

Subclass of NumberTool from Velocity Tools, using a passed-in Locale (usually the RequestContext Locale) instead of the default Locale.

See Also:
RequestContextUtils.getLocale(javax.servlet.http.HttpServletRequest)

Field Summary
private  java.util.Locale locale
           
 
Fields inherited from class org.apache.velocity.tools.generic.NumberTool
DEFAULT_FORMAT, DEFAULT_FORMAT_KEY, DEFAULT_LOCALE_KEY, LOCK_CONFIG_KEY
 
Constructor Summary
private VelocityView.LocaleAwareNumberTool(java.util.Locale locale)
           
 
Method Summary
 java.util.Locale getLocale()
           
 
Methods inherited from class org.apache.velocity.tools.generic.NumberTool
configure, configure, currency, format, format, format, getFormat, getNumberFormat, getNumberFormat, getStyleAsInt, integer, number, percent, setFormat, setLocale, toNumber, toNumber, toNumber
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

locale

private final java.util.Locale locale
Constructor Detail

VelocityView.LocaleAwareNumberTool

private VelocityView.LocaleAwareNumberTool(java.util.Locale locale)
Method Detail

getLocale

public java.util.Locale getLocale()
Overrides:
getLocale in class org.apache.velocity.tools.generic.NumberTool