incubator-adffaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mat...@apache.org
Subject svn commit: r499424 - in /incubator/adffaces/trunk/trinidad/trinidad-api/src/main: java/org/apache/myfaces/trinidad/convert/NumberConverter.java xrts/org/apache/myfaces/trinidad/resource/MessageBundle.xrts
Date Wed, 24 Jan 2007 15:00:26 GMT
Author: matzew
Date: Wed Jan 24 07:00:22 2007
New Revision: 499424

URL: http://svn.apache.org/viewvc?view=rev&rev=499424
Log:
-first step in making the <tr:numberConverter> working on the client (ADFFACES-164)
-number is working and no pattern can be set (currently)
-Didn't close bug, only commenting on the new progress here

Modified:
    incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/convert/NumberConverter.java
    incubator/adffaces/trunk/trinidad/trinidad-api/src/main/xrts/org/apache/myfaces/trinidad/resource/MessageBundle.xrts

Modified: incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/convert/NumberConverter.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/convert/NumberConverter.java?view=diff&rev=499424&r1=499423&r2=499424
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/convert/NumberConverter.java
(original)
+++ incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/convert/NumberConverter.java
Wed Jan 24 07:00:22 2007
@@ -462,6 +462,29 @@
     Object msg = _facesBean.getProperty(_CONVERT_PERCENT_MESSAGE_DETAIL_KEY);
     return ComponentUtils.resolveString(msg);
   }
+  
+  /**
+   * <p>Custom hintPattern message.</p>
+   * Overrides default hint message
+   * @param hintPattern Custom hint message.
+   */
+  public void setHintPattern(String hintPattern)
+  {
+    _facesBean.setProperty(_HINT_PATTERN_KEY, hintPattern);
+  }
+
+  /**
+   * <p>Return custom hintPattern message.</p>
+   * @return Custom hint message.
+   * @see  #setHintPattern(String)
+   */
+  public String getHintPattern()
+  {
+    Object obj = _facesBean.getProperty(_HINT_PATTERN_KEY);
+    return ComponentUtils.resolveString(obj);
+  }
+
+  
 
   @Override
   public void setCurrencyCode(String currencyCode)
@@ -1141,6 +1164,9 @@
 
   private static final PropertyKey _CONVERT_PERCENT_MESSAGE_DETAIL_KEY
    = _TYPE.registerKey("messageDetailConvertPercent", String.class);
+  
+  private static final PropertyKey  _HINT_PATTERN_KEY =
+    _TYPE.registerKey("hintPattern", String.class);
 
   private static final PropertyKey _CURRENCY_CODE_KEY
    = _TYPE.registerKey("currencyCode", String.class);

Modified: incubator/adffaces/trunk/trinidad/trinidad-api/src/main/xrts/org/apache/myfaces/trinidad/resource/MessageBundle.xrts
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-api/src/main/xrts/org/apache/myfaces/trinidad/resource/MessageBundle.xrts?view=diff&rev=499424&r1=499423&r2=499424
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-api/src/main/xrts/org/apache/myfaces/trinidad/resource/MessageBundle.xrts
(original)
+++ incubator/adffaces/trunk/trinidad/trinidad-api/src/main/xrts/org/apache/myfaces/trinidad/resource/MessageBundle.xrts
Wed Jan 24 07:00:22 2007
@@ -305,6 +305,8 @@
   <resource key="org.apache.myfaces.trinidad.convert.DateTimeConverter.BOTH_HINT">Example
format: "{0}".</resource>
   <!-- default hint for ColorConverter-->
   <resource key="org.apache.myfaces.trinidad.convert.ColorConverter.FORMAT_HINT">Example
format: "{0}".</resource>
+  <!-- default hint for NumberConverter-->
+  <resource key="org.apache.myfaces.trinidad.convert.NumberConverter.FORMAT_HINT">Example
format: "{0}".</resource>
 
   <!-- default hint for IntegerConverter-->
   <!-- resource key="org.apache.myfaces.trinidad.convert.IntegerConverter.FORMAT_HINT">The
entered value must be a integer</resource-->



Mime
View raw message