myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jwald...@apache.org
Subject svn commit: r1511870 - in /myfaces/trinidad/trunk: ./ trinidad-api/ trinidad-api/src/main/java/org/apache/myfaces/trinidad/context/ trinidad-api/src/main/java/org/apache/myfaces/trinidad/convert/ trinidad-api/src/main/resources/ trinidad-api/src/main/x...
Date Thu, 08 Aug 2013 16:53:35 GMT
Author: jwaldman
Date: Thu Aug  8 16:53:34 2013
New Revision: 1511870

URL: http://svn.apache.org/r1511870
Log:
TRINIDAD-2405 Allow numberConverter to specify roundingmode 
This checkin is to the trinidad/trunk branch
Thanks to Yee-Wah Lee for the patch

Modified:
    myfaces/trinidad/trunk/pom.xml
    myfaces/trinidad/trunk/trinidad-api/pom.xml
    myfaces/trinidad/trunk/trinidad-api/src/main/java/org/apache/myfaces/trinidad/context/RequestContext.java
    myfaces/trinidad/trunk/trinidad-api/src/main/java/org/apache/myfaces/trinidad/convert/NumberConverter.java
    myfaces/trinidad/trunk/trinidad-api/src/main/resources/trinidad-config.xsd
    myfaces/trinidad/trunk/trinidad-api/src/main/xrts/org/apache/myfaces/trinidad/resource/LoggerBundle.xrts
    myfaces/trinidad/trunk/trinidad-assembly/pom.xml
    myfaces/trinidad/trunk/trinidad-build/pom.xml
    myfaces/trinidad/trunk/trinidad-build/src/main/resources/META-INF/maven-faces-plugin/converters/trinidad/Number.xml
    myfaces/trinidad/trunk/trinidad-examples/pom.xml
    myfaces/trinidad/trunk/trinidad-examples/trinidad-blank/pom.xml
    myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/pom.xml
    myfaces/trinidad/trunk/trinidad-examples/trinidad-demo/pom.xml
    myfaces/trinidad/trunk/trinidad-examples/trinidad-demo/src/main/webapp/convertValidate/convertValidate.jspx
    myfaces/trinidad/trunk/trinidad-examples/trinidad-example-assembly/pom.xml
    myfaces/trinidad/trunk/trinidad-impl/pom.xml
    myfaces/trinidad/trunk/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/context/RequestContextBean.java
    myfaces/trinidad/trunk/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/context/RequestContextImpl.java

Modified: myfaces/trinidad/trunk/pom.xml
URL: http://svn.apache.org/viewvc/myfaces/trinidad/trunk/pom.xml?rev=1511870&r1=1511869&r2=1511870&view=diff
==============================================================================
--- myfaces/trinidad/trunk/pom.xml (original)
+++ myfaces/trinidad/trunk/pom.xml Thu Aug  8 16:53:34 2013
@@ -56,7 +56,7 @@ Create A Branch (http://maven.apache.org
 
   <groupId>org.apache.myfaces.trinidad</groupId>
   <artifactId>trinidad</artifactId>
-  <version>2.1.0-SNAPSHOT</version>
+  <version>2.1.1-SNAPSHOT</version>
   <packaging>pom</packaging>
 
   <properties>
@@ -81,7 +81,7 @@ Create A Branch (http://maven.apache.org
     <junit.version>4.4</junit.version>
     
     <!-- Plugins -->
-    <trinidad-plugins.version>2.0.8-SNAPSHOT</trinidad-plugins.version>
+    <trinidad-plugins.version>2.0.9-SNAPSHOT</trinidad-plugins.version>
     <wagon-plugin.version>1.0.6</wagon-plugin.version>
     <jetty-plugin.version>6.1.21</jetty-plugin.version>
     <pluto.version>1.1.6</pluto.version>

Modified: myfaces/trinidad/trunk/trinidad-api/pom.xml
URL: http://svn.apache.org/viewvc/myfaces/trinidad/trunk/trinidad-api/pom.xml?rev=1511870&r1=1511869&r2=1511870&view=diff
==============================================================================
--- myfaces/trinidad/trunk/trinidad-api/pom.xml (original)
+++ myfaces/trinidad/trunk/trinidad-api/pom.xml Thu Aug  8 16:53:34 2013
@@ -27,7 +27,7 @@
   <parent>
     <groupId>org.apache.myfaces.trinidad</groupId>
     <artifactId>trinidad</artifactId>
-    <version>2.1.0-SNAPSHOT</version>
+    <version>2.1.1-SNAPSHOT</version>
   </parent>
 
   <artifactId>trinidad-api</artifactId>

Modified: myfaces/trinidad/trunk/trinidad-api/src/main/java/org/apache/myfaces/trinidad/context/RequestContext.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/trunk/trinidad-api/src/main/java/org/apache/myfaces/trinidad/context/RequestContext.java?rev=1511870&r1=1511869&r2=1511870&view=diff
==============================================================================
--- myfaces/trinidad/trunk/trinidad-api/src/main/java/org/apache/myfaces/trinidad/context/RequestContext.java
(original)
+++ myfaces/trinidad/trunk/trinidad-api/src/main/java/org/apache/myfaces/trinidad/context/RequestContext.java
Thu Aug  8 16:53:34 2013
@@ -22,6 +22,7 @@ import java.awt.Color;
 
 import java.io.IOException;
 
+import java.math.RoundingMode;
 import java.util.Collection;
 import java.util.Collections;
 import java.util.HashMap;
@@ -619,6 +620,14 @@ abstract public class RequestContext
    */
   public abstract RegionManager getRegionManager();
 
+  /**
+   * Gets the RoundingMode used by NumberConverter instances for the current application.
+   */
+  public  RoundingMode getRoundingMode()
+  {
+    return null;
+  }
+
   //
   // Partial Page Rendering support
   //

Modified: myfaces/trinidad/trunk/trinidad-api/src/main/java/org/apache/myfaces/trinidad/convert/NumberConverter.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/trunk/trinidad-api/src/main/java/org/apache/myfaces/trinidad/convert/NumberConverter.java?rev=1511870&r1=1511869&r2=1511870&view=diff
==============================================================================
--- myfaces/trinidad/trunk/trinidad-api/src/main/java/org/apache/myfaces/trinidad/convert/NumberConverter.java
(original)
+++ myfaces/trinidad/trunk/trinidad-api/src/main/java/org/apache/myfaces/trinidad/convert/NumberConverter.java
Thu Aug  8 16:53:34 2013
@@ -18,6 +18,7 @@
  */
 package org.apache.myfaces.trinidad.convert;
 
+import java.math.RoundingMode;
 import java.text.DecimalFormat;
 import java.text.DecimalFormatSymbols;
 import java.text.NumberFormat;
@@ -385,7 +386,7 @@ public class NumberConverter extends jav
 
     NumberFormat formatter = _getNumberFormat(pattern, type, locale, reqCtx);
 
-    _setFormatProperties(formatter);
+    _setFormatProperties(formatter, reqCtx);
 
     if("currency".equals(type))
     {
@@ -759,6 +760,18 @@ public class NumberConverter extends jav
     return ComponentUtils.resolveInteger(value);
   }
 
+  public void setRoundingMode (RoundingMode mode)
+  {
+    _facesBean.setProperty (_ROUNDING_MODE_KEY, mode);
+  }
+
+  @JSFProperty
+  public RoundingMode getRoundingMode()
+  {
+    Object roundingMode = _facesBean.getProperty(_ROUNDING_MODE_KEY);
+    return (roundingMode != null ? (RoundingMode) roundingMode : null);
+  }
+
   @Override
   public void setPattern(String pattern)
   {
@@ -1128,7 +1141,7 @@ public class NumberConverter extends jav
 
    // Configure the specified NumberFormat  based on the
    // formatting properties that have been set.
-  private void _setFormatProperties(NumberFormat formatter) {
+  private void _setFormatProperties(NumberFormat formatter, RequestContext reqCtx) {
 
     formatter.setGroupingUsed(isGroupingUsed());
 
@@ -1151,6 +1164,12 @@ public class NumberConverter extends jav
     {
       formatter.setMinimumIntegerDigits(getMinIntegerDigits());
     }
+
+    RoundingMode rmode = _getRoundingMode (reqCtx);
+    if (rmode != null)    
+    {      
+      formatter.setRoundingMode (rmode);
+    }
   }
 
   private void _setCurrencyInformation(
@@ -1315,6 +1334,24 @@ public class NumberConverter extends jav
 
     return currencyCode;
   }
+  
+  private RoundingMode _getRoundingMode (RequestContext context)
+  {
+    RoundingMode rmode = getRoundingMode ();
+    
+    if (rmode == null)
+    {
+      if (context == null)
+      {
+        _LOG.warning("NULL_REQUEST_CONTEXT_UNABLE_GET_ROUNDING_MODE");
+      }
+      else
+      {
+        rmode = context.getRoundingMode();
+      }
+    }    
+    return rmode;
+  }
 
   // applied only while formatting
   private void _setCurrencyFormattingProperties(
@@ -1440,6 +1477,10 @@ public class NumberConverter extends jav
   private static final PropertyKey _PATTERN_KEY
    = _TYPE.registerKey("pattern", String.class);
 
+  private static final PropertyKey  _ROUNDING_MODE_KEY
+   = _TYPE.registerKey("roundingMode", RoundingMode.class);
+
+
   private static final PropertyKey  _TYPE_KEY
    = _TYPE.registerKey("type", String.class, "numeric");
   

Modified: myfaces/trinidad/trunk/trinidad-api/src/main/resources/trinidad-config.xsd
URL: http://svn.apache.org/viewvc/myfaces/trinidad/trunk/trinidad-api/src/main/resources/trinidad-config.xsd?rev=1511870&r1=1511869&r2=1511870&view=diff
==============================================================================
--- myfaces/trinidad/trunk/trinidad-api/src/main/resources/trinidad-config.xsd (original)
+++ myfaces/trinidad/trunk/trinidad-api/src/main/resources/trinidad-config.xsd Thu Aug  8
16:53:34 2013
@@ -84,6 +84,15 @@ output mode used by Apache MyFaces Trini
           </annotation>
         </element>
 
+       <element name="roundingMode" minOccurs="0" maxOccurs="1"
+                 type="config:roundingModeExpressionType">
+          <annotation>
+            <documentation>The &lt;rounding-mode&gt; element controls the
+default rounding mode for number converters.
+            </documentation>
+          </annotation>
+        </element>
+
         <element name="skin-family" minOccurs="0" maxOccurs="1"
                  type="config:stringExpressionType">
           <annotation>
@@ -307,6 +316,19 @@ override the locale that converters use 
     </restriction>
   </simpleType>
 
+     <simpleType name="roundingModeType">
+        <restriction base="string">
+          <enumeration value="CEILING"/>
+          <enumeration value="DOWN"/>
+          <enumeration value="FLOOR"/>
+          <enumeration value="HALF_DOWN"/>
+          <enumeration value="HALF_EVEN"/>
+          <enumeration value="HALF_UP"/>
+          <enumeration value="UNNECESSARY"/>
+          <enumeration value="UP"/>
+        </restriction>
+      </simpleType>
+
   <simpleType name="stringExpressionType">
     <union memberTypes="string config:expressionType" />
   </simpleType>
@@ -343,6 +365,10 @@ override the locale that converters use 
     <union memberTypes="config:clientValidationType config:expressionType" />
   </simpleType>
 
+  <simpleType name="roundingModeExpressionType">
+    <union memberTypes="config:roundingModeType config:expressionType" />
+  </simpleType>
+
   <simpleType name="anyURIExpressionType">
     <union memberTypes="anyURI config:expressionType" />
   </simpleType>

Modified: myfaces/trinidad/trunk/trinidad-api/src/main/xrts/org/apache/myfaces/trinidad/resource/LoggerBundle.xrts
URL: http://svn.apache.org/viewvc/myfaces/trinidad/trunk/trinidad-api/src/main/xrts/org/apache/myfaces/trinidad/resource/LoggerBundle.xrts?rev=1511870&r1=1511869&r2=1511870&view=diff
==============================================================================
--- myfaces/trinidad/trunk/trinidad-api/src/main/xrts/org/apache/myfaces/trinidad/resource/LoggerBundle.xrts
(original)
+++ myfaces/trinidad/trunk/trinidad-api/src/main/xrts/org/apache/myfaces/trinidad/resource/LoggerBundle.xrts
Thu Aug  8 16:53:34 2013
@@ -90,6 +90,9 @@
 <!-- NULL_REQUEST_CONTEXT_UNABLE_GET_CURRENCY_CODE -->
 <resource key="NULL_REQUEST_CONTEXT_UNABLE_GET_CURRENCY_CODE">RequestContext is null,
unable to get currency code</resource>
 
+<!-- NULL_REQUEST_CONTEXT_UNABLE_GET_ROUNDING_MODE -->
+<resource key="NULL_REQUEST_CONTEXT_UNABLE_GET_ROUNDING_MODE">RequestContext is null,
unable to get default RoundingMode for the application.</resource>
+
 <!-- NUMBER_NOT_DECIMALFORMAT_IGNORE_CURRENCY -->
 <resource key="NUMBER_NOT_DECIMALFORMAT_IGNORE_CURRENCY">Number format was not instance
of DecimalFormat: ignoring currency information while formatting.</resource>
 

Modified: myfaces/trinidad/trunk/trinidad-assembly/pom.xml
URL: http://svn.apache.org/viewvc/myfaces/trinidad/trunk/trinidad-assembly/pom.xml?rev=1511870&r1=1511869&r2=1511870&view=diff
==============================================================================
--- myfaces/trinidad/trunk/trinidad-assembly/pom.xml (original)
+++ myfaces/trinidad/trunk/trinidad-assembly/pom.xml Thu Aug  8 16:53:34 2013
@@ -26,7 +26,7 @@
   <parent>
     <groupId>org.apache.myfaces.trinidad</groupId>
     <artifactId>trinidad</artifactId>
-    <version>2.1.0-SNAPSHOT</version>
+    <version>2.1.1-SNAPSHOT</version>
   </parent>
 
   <artifactId>trinidad-assembly</artifactId>

Modified: myfaces/trinidad/trunk/trinidad-build/pom.xml
URL: http://svn.apache.org/viewvc/myfaces/trinidad/trunk/trinidad-build/pom.xml?rev=1511870&r1=1511869&r2=1511870&view=diff
==============================================================================
--- myfaces/trinidad/trunk/trinidad-build/pom.xml (original)
+++ myfaces/trinidad/trunk/trinidad-build/pom.xml Thu Aug  8 16:53:34 2013
@@ -27,7 +27,7 @@
   <parent>
     <groupId>org.apache.myfaces.trinidad</groupId>
     <artifactId>trinidad</artifactId>
-    <version>2.1.0-SNAPSHOT</version>
+    <version>2.1.1-SNAPSHOT</version>
   </parent>
 
   <artifactId>trinidad-build</artifactId>

Modified: myfaces/trinidad/trunk/trinidad-build/src/main/resources/META-INF/maven-faces-plugin/converters/trinidad/Number.xml
URL: http://svn.apache.org/viewvc/myfaces/trinidad/trunk/trinidad-build/src/main/resources/META-INF/maven-faces-plugin/converters/trinidad/Number.xml?rev=1511870&r1=1511869&r2=1511870&view=diff
==============================================================================
--- myfaces/trinidad/trunk/trinidad-build/src/main/resources/META-INF/maven-faces-plugin/converters/trinidad/Number.xml
(original)
+++ myfaces/trinidad/trunk/trinidad-build/src/main/resources/META-INF/maven-faces-plugin/converters/trinidad/Number.xml
Thu Aug  8 16:53:34 2013
@@ -279,6 +279,14 @@
         </fmd:property-metadata>
       </property-extension>                  
     </property>
+    <property>    
+      <description><![CDATA[Sets the default RoundingMode for the converter. If
unset, uses JDK default (usually RoundingMode.HALF_EVEN).]]>
+      </description>
+      <property-name>roundingMode</property-name>
+      <property-class>java.math.RoundingMode</property-class>
+      <mfp:enum>true</mfp:enum>
+      <fmd:enum>true</fmd:enum>
+    </property>
     <property>
       <description><![CDATA[Specifies how the number string will be formatted and
parsed.
            Valid values are "number", "currency", and "percent".

Modified: myfaces/trinidad/trunk/trinidad-examples/pom.xml
URL: http://svn.apache.org/viewvc/myfaces/trinidad/trunk/trinidad-examples/pom.xml?rev=1511870&r1=1511869&r2=1511870&view=diff
==============================================================================
--- myfaces/trinidad/trunk/trinidad-examples/pom.xml (original)
+++ myfaces/trinidad/trunk/trinidad-examples/pom.xml Thu Aug  8 16:53:34 2013
@@ -28,7 +28,7 @@
   <parent>
     <groupId>org.apache.myfaces.trinidad</groupId>
     <artifactId>trinidad</artifactId>
-    <version>2.1.0-SNAPSHOT</version>
+    <version>2.1.1-SNAPSHOT</version>
   </parent>
 
   <artifactId>trinidad-example</artifactId>

Modified: myfaces/trinidad/trunk/trinidad-examples/trinidad-blank/pom.xml
URL: http://svn.apache.org/viewvc/myfaces/trinidad/trunk/trinidad-examples/trinidad-blank/pom.xml?rev=1511870&r1=1511869&r2=1511870&view=diff
==============================================================================
--- myfaces/trinidad/trunk/trinidad-examples/trinidad-blank/pom.xml (original)
+++ myfaces/trinidad/trunk/trinidad-examples/trinidad-blank/pom.xml Thu Aug  8 16:53:34 2013
@@ -27,7 +27,7 @@
   <parent>
     <groupId>org.apache.myfaces.trinidad</groupId>
     <artifactId>trinidad-example</artifactId>
-    <version>2.1.0-SNAPSHOT</version>
+    <version>2.1.1-SNAPSHOT</version>
   </parent>
 
   <artifactId>trinidad-blank</artifactId>

Modified: myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/pom.xml
URL: http://svn.apache.org/viewvc/myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/pom.xml?rev=1511870&r1=1511869&r2=1511870&view=diff
==============================================================================
--- myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/pom.xml (original)
+++ myfaces/trinidad/trunk/trinidad-examples/trinidad-components-showcase/pom.xml Thu Aug
 8 16:53:34 2013
@@ -28,7 +28,7 @@
 	<parent>
 		<groupId>org.apache.myfaces.trinidad</groupId>
 		<artifactId>trinidad-example</artifactId>
-		<version>2.1.0-SNAPSHOT</version>
+		<version>2.1.1-SNAPSHOT</version>
 	</parent>
 	
 	<artifactId>trinidad-components-showcase</artifactId>

Modified: myfaces/trinidad/trunk/trinidad-examples/trinidad-demo/pom.xml
URL: http://svn.apache.org/viewvc/myfaces/trinidad/trunk/trinidad-examples/trinidad-demo/pom.xml?rev=1511870&r1=1511869&r2=1511870&view=diff
==============================================================================
--- myfaces/trinidad/trunk/trinidad-examples/trinidad-demo/pom.xml (original)
+++ myfaces/trinidad/trunk/trinidad-examples/trinidad-demo/pom.xml Thu Aug  8 16:53:34 2013
@@ -27,7 +27,7 @@
   <parent>
     <groupId>org.apache.myfaces.trinidad</groupId>
     <artifactId>trinidad-example</artifactId>
-    <version>2.1.0-SNAPSHOT</version>
+    <version>2.1.1-SNAPSHOT</version>
   </parent>
 
   <artifactId>trinidad-demo</artifactId>

Modified: myfaces/trinidad/trunk/trinidad-examples/trinidad-demo/src/main/webapp/convertValidate/convertValidate.jspx
URL: http://svn.apache.org/viewvc/myfaces/trinidad/trunk/trinidad-examples/trinidad-demo/src/main/webapp/convertValidate/convertValidate.jspx?rev=1511870&r1=1511869&r2=1511870&view=diff
==============================================================================
--- myfaces/trinidad/trunk/trinidad-examples/trinidad-demo/src/main/webapp/convertValidate/convertValidate.jspx
(original)
+++ myfaces/trinidad/trunk/trinidad-examples/trinidad-demo/src/main/webapp/convertValidate/convertValidate.jspx
Thu Aug  8 16:53:34 2013
@@ -80,6 +80,14 @@
                 <f:convertNumber type="currency" locale="en_US"
                                  currencySymbol="#"/>
               </tr:inputText>
+              <tr:inputText value="#{converterValidator.currencyValue}"
+                            label="number converter with roundingMode=FLOOR">
+                <f:facet name="help">
+                  <tr:outputText value="roundingMode='FLOOR' maxFractionDigits=1 - This
results in the value rounded down from 78.57 to 78.5"/>
+                </f:facet>
+                <tr:convertNumber maxFractionDigits="0" locale="en_US" 
+                                 roundingMode="FLOOR"/>
+              </tr:inputText>
             </tr:panelFormLayout>
             <tr:panelHeader text="Validators"/>
             <tr:panelFormLayout>

Modified: myfaces/trinidad/trunk/trinidad-examples/trinidad-example-assembly/pom.xml
URL: http://svn.apache.org/viewvc/myfaces/trinidad/trunk/trinidad-examples/trinidad-example-assembly/pom.xml?rev=1511870&r1=1511869&r2=1511870&view=diff
==============================================================================
--- myfaces/trinidad/trunk/trinidad-examples/trinidad-example-assembly/pom.xml (original)
+++ myfaces/trinidad/trunk/trinidad-examples/trinidad-example-assembly/pom.xml Thu Aug  8
16:53:34 2013
@@ -27,7 +27,7 @@
   <parent>
     <groupId>org.apache.myfaces.trinidad</groupId>
     <artifactId>trinidad</artifactId>
-    <version>2.1.0-SNAPSHOT</version>
+    <version>2.1.1-SNAPSHOT</version>
   </parent>
 
   <artifactId>trinidad-example-assembly</artifactId>

Modified: myfaces/trinidad/trunk/trinidad-impl/pom.xml
URL: http://svn.apache.org/viewvc/myfaces/trinidad/trunk/trinidad-impl/pom.xml?rev=1511870&r1=1511869&r2=1511870&view=diff
==============================================================================
--- myfaces/trinidad/trunk/trinidad-impl/pom.xml (original)
+++ myfaces/trinidad/trunk/trinidad-impl/pom.xml Thu Aug  8 16:53:34 2013
@@ -27,7 +27,7 @@
   <parent>
     <groupId>org.apache.myfaces.trinidad</groupId>
     <artifactId>trinidad</artifactId>
-    <version>2.1.0-SNAPSHOT</version>
+    <version>2.1.1-SNAPSHOT</version>
   </parent>
 
   <artifactId>trinidad-impl</artifactId>

Modified: myfaces/trinidad/trunk/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/context/RequestContextBean.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/trunk/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/context/RequestContextBean.java?rev=1511870&r1=1511869&r2=1511870&view=diff
==============================================================================
--- myfaces/trinidad/trunk/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/context/RequestContextBean.java
(original)
+++ myfaces/trinidad/trunk/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/context/RequestContextBean.java
Thu Aug  8 16:53:34 2013
@@ -20,6 +20,7 @@ package org.apache.myfaces.trinidadinter
 
 import java.util.Locale;
 import java.util.TimeZone;
+import java.math.RoundingMode;
 
 import org.apache.myfaces.trinidad.bean.FacesBeanImpl;
 import org.apache.myfaces.trinidad.bean.PropertyKey;
@@ -65,6 +66,8 @@ public class RequestContextBean extends 
     TYPE.registerKey("time-zone", TimeZone.class);
   static public final PropertyKey ORACLE_HELP_SERVLET_URL_KEY =
     TYPE.registerKey("oracle-help-servlet-url");  
+  static public final PropertyKey ROUNDING_MODE_KEY =
+    TYPE.registerKey("rounding-mode", RoundingMode.class);
   static public final PropertyKey TWO_DIGIT_YEAR_START =
     TYPE.registerKey("two-digit-year-start", Integer.class);
   static public final PropertyKey SKIN_FAMILY_KEY =

Modified: myfaces/trinidad/trunk/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/context/RequestContextImpl.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/trunk/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/context/RequestContextImpl.java?rev=1511870&r1=1511869&r2=1511870&view=diff
==============================================================================
--- myfaces/trinidad/trunk/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/context/RequestContextImpl.java
(original)
+++ myfaces/trinidad/trunk/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/context/RequestContextImpl.java
Thu Aug  8 16:53:34 2013
@@ -23,6 +23,8 @@ import java.awt.Color;
 import java.io.Serializable;
 
 import java.util.ArrayDeque;
+import java.math.RoundingMode;
+
 import java.util.Collections;
 import java.util.HashMap;
 import java.util.HashSet;
@@ -690,6 +692,15 @@ public class RequestContextImpl extends 
   }
 
   @Override
+  public RoundingMode getRoundingMode()
+  {
+    RoundingMode mode = (RoundingMode) _bean.getProperty(
+      RequestContextBean.ROUNDING_MODE_KEY);
+
+    return (mode);
+  }
+
+  @Override
   public int getTwoDigitYearStart()
   {
     Integer twoDigitYearStart  = (Integer) _bean.getProperty(



Mime
View raw message