incubator-adffaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mat...@apache.org
Subject svn commit: r497436 - in /incubator/adffaces/trunk/trinidad/trinidad-api/src/main: java/org/apache/myfaces/trinidad/convert/DateTimeConverter.java xrts/org/apache/myfaces/trinidad/resource/MessageBundle.xrts
Date Thu, 18 Jan 2007 14:02:50 GMT
Author: matzew
Date: Thu Jan 18 06:02:49 2007
New Revision: 497436

URL: http://svn.apache.org/viewvc?view=rev&rev=497436
Log:
added new hint properties for dateTimeConverter

Modified:
    incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/convert/DateTimeConverter.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/DateTimeConverter.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/convert/DateTimeConverter.java?view=diff&rev=497436&r1=497435&r2=497436
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/convert/DateTimeConverter.java
(original)
+++ incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/convert/DateTimeConverter.java
Thu Jan 18 06:02:49 2007
@@ -423,23 +423,65 @@
   }
 
   /**
-   * <p>Custom hint message.</p>
+   * <p>Custom hintDate message.</p>
    * Overrides default hint message
-   * @param hintFormat Custom hint message.
+   * @param hintDate Custom hint message.
    */
-  public void setHint(String hintFormat)
+  public void setHintDate(String hintDate)
   {
-    _facesBean.setProperty(_HINT_FORMAT_KEY, hintFormat);
+    _facesBean.setProperty(_HINT_DATE_KEY, hintDate);
   }
 
   /**
-   * <p>Return custom hint message.</p>
+   * <p>Return custom hintDate message.</p>
    * @return Custom hint message.
-   * @see  #setHintFormat(String)
+   * @see  #setHintDate(String)
    */
-  public String getHint()
+  public String getHintDate()
   {
-    Object obj = _facesBean.getProperty(_HINT_FORMAT_KEY);
+    Object obj = _facesBean.getProperty(_HINT_DATE_KEY);
+    return ComponentUtils.resolveString(obj);
+  }
+
+  /**
+   * <p>Custom hintTime message.</p>
+   * Overrides default hint message
+   * @param hintTime Custom hint message.
+   */
+  public void setHintTime(String hintTime)
+  {
+    _facesBean.setProperty(_HINT_TIME_KEY, hintTime);
+  }
+
+  /**
+   * <p>Return custom hintTime message.</p>
+   * @return Custom hint message.
+   * @see  #setHintTime(String)
+   */
+  public String getHintTime()
+  {
+    Object obj = _facesBean.getProperty(_HINT_TIME_KEY);
+    return ComponentUtils.resolveString(obj);
+  }
+
+  /**
+   * <p>Custom hintBoth message.</p>
+   * Overrides default hint message
+   * @param hintBotht Custom hint message.
+   */
+  public void setHintBoth(String hintBoth)
+  {
+    _facesBean.setProperty(_HINT_BOTH_KEY, hintBoth);
+  }
+
+  /**
+   * <p>Return custom hintBoth message.</p>
+   * @return Custom hint message.
+   * @see  #setHintBoth(String)
+   */
+  public String getHintBoth()
+  {
+    Object obj = _facesBean.getProperty(_HINT_BOTH_KEY);
     return ComponentUtils.resolveString(obj);
   }
 
@@ -1746,8 +1788,14 @@
   private static final PropertyKey _CONVERT_BOTH_MESSAGE_DETAIL_KEY
     = _TYPE.registerKey("messageDetailConvertBoth", String.class);
   
-  private static final PropertyKey  _HINT_FORMAT_KEY =
-    _TYPE.registerKey("hintFormat", String.class);
+  private static final PropertyKey  _HINT_DATE_KEY =
+    _TYPE.registerKey("hintDate", String.class);
+
+  private static final PropertyKey  _HINT_TIME_KEY =
+    _TYPE.registerKey("hintTime", String.class);
+
+  private static final PropertyKey  _HINT_BOTH_KEY =
+    _TYPE.registerKey("hintBoth", String.class);
 
   private FacesBean _facesBean = ConverterUtils.getFacesBean(_TYPE);
 

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=497436&r1=497435&r2=497436
==============================================================================
--- 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
Thu Jan 18 06:02:49 2007
@@ -300,7 +300,9 @@
   <!-- hints for converters -->
 
   <!-- default hint for DateTimeConverter-->
-  <resource key="org.apache.myfaces.trinidad.convert.DateTimeConverter.FORMAT_HINT">The
date to enter must follow a format like "{0}".</resource>
+  <resource key="org.apache.myfaces.trinidad.convert.DateTimeConverter.DATE_HINT">The
date to enter must follow a format like "{0}".</resource>
+  <resource key="org.apache.myfaces.trinidad.convert.DateTimeConverter.TIME_HINT">The
time to enter must follow a format like "{0}".</resource>
+  <resource key="org.apache.myfaces.trinidad.convert.DateTimeConverter.BOTH_HINT">The
time and date to enter must follow a format like "{0}".</resource>
   <!-- default hint for ColorConverter-->
   <resource key="org.apache.myfaces.trinidad.convert.ColorConverter.FORMAT_HINT">The
color to enter must follow a format like "{0}".</resource>
 



Mime
View raw message