incubator-adffaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mat...@apache.org
Subject svn commit: r468175 [1/5] - in /incubator/adffaces/trunk/trinidad: trinidad-api/src/main/java-templates/org/apache/myfaces/trinidad/component/ trinidad-api/src/main/java/org/apache/myfaces/trinidad/convert/ trinidad-api/src/main/java/org/apache/myfaces...
Date Thu, 26 Oct 2006 22:42:23 GMT
Author: matzew
Date: Thu Oct 26 15:42:18 2006
New Revision: 468175

URL: http://svn.apache.org/viewvc?view=rev&rev=468175
Log:
lot's of jira issues fixed (ADFFACES-201, ADFFACES-202, ADFFACES-170, ADFFACES-200, ADFFACES-169, ADFFACES-204, ADFFACES-145, ADFFACES-165, ADFFACES-263)

Added:
    incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/validator/DoubleRangeValidator.java
    incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/validator/LengthValidator.java
    incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/validator/LongRangeValidator.java
    incubator/adffaces/trunk/trinidad/trinidad-build/src/main/resources/META-INF/maven-faces-plugin/validators/javax/faces/DoubleRange.xml
    incubator/adffaces/trunk/trinidad/trinidad-build/src/main/resources/META-INF/maven-faces-plugin/validators/trinidad/DoubleRange.xml
    incubator/adffaces/trunk/trinidad/trinidad-build/src/main/resources/META-INF/maven-faces-plugin/validators/trinidad/Length.xml
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/validator/DoubleRangeValidator.java
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/validator/LengthValidator.java
Removed:
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/util/IntegerUtils.java
Modified:
    incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java-templates/org/apache/myfaces/trinidad/component/UIXEditableValueTemplate.java
    incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/convert/ColorConverter.java
    incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/convert/DateTimeConverter.java
    incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/convert/NumberConverter.java
    incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/validator/ByteLengthValidator.java
    incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/validator/DateTimeRangeValidator.java
    incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/validator/RegExpValidator.java
    incubator/adffaces/trunk/trinidad/trinidad-api/src/main/xrts/org/apache/myfaces/trinidad/resource/MessageBundle.xrts
    incubator/adffaces/trunk/trinidad/trinidad-api/src/main/xrts/org/apache/myfaces/trinidad/resource/MessageBundle_de.xrts
    incubator/adffaces/trunk/trinidad/trinidad-api/src/test/java/org/apache/myfaces/trinidad/convert/ColorConverterTest.java
    incubator/adffaces/trunk/trinidad/trinidad-api/src/test/java/org/apache/myfaces/trinidad/convert/TrinidadDateTimeConverterTest.java
    incubator/adffaces/trunk/trinidad/trinidad-api/src/test/java/org/apache/myfaces/trinidad/convert/TrinidadNumberConverterTest.java
    incubator/adffaces/trunk/trinidad/trinidad-api/src/test/java/org/apache/myfaces/trinidad/validator/ByteLengthValidatorTest.java
    incubator/adffaces/trunk/trinidad/trinidad-api/src/test/java/org/apache/myfaces/trinidad/validator/DateTimeRangeValidatorTest.java
    incubator/adffaces/trunk/trinidad/trinidad-api/src/test/java/org/apache/myfaces/trinidad/validator/RegExpValidatorTest.java
    incubator/adffaces/trunk/trinidad/trinidad-build/src/main/resources/META-INF/maven-faces-plugin/converters/trinidad/Color.xml
    incubator/adffaces/trunk/trinidad/trinidad-build/src/main/resources/META-INF/maven-faces-plugin/converters/trinidad/DateTime.xml
    incubator/adffaces/trunk/trinidad/trinidad-build/src/main/resources/META-INF/maven-faces-plugin/converters/trinidad/Number.xml
    incubator/adffaces/trunk/trinidad/trinidad-build/src/main/resources/META-INF/maven-faces-plugin/validators/trinidad/ByteLength.xml
    incubator/adffaces/trunk/trinidad/trinidad-build/src/main/resources/META-INF/maven-faces-plugin/validators/trinidad/DateTimeRange.xml
    incubator/adffaces/trunk/trinidad/trinidad-build/src/main/resources/META-INF/maven-faces-plugin/validators/trinidad/RegExp.xml
    incubator/adffaces/trunk/trinidad/trinidad-demo/src/main/webapp/convertValidate/clientConvert.jspx
    incubator/adffaces/trunk/trinidad/trinidad-demo/src/main/webapp/convertValidate/convertValidate.jspx
    incubator/adffaces/trunk/trinidad/trinidad-demo/src/main/webapp/convertValidate/convertValidateMessageCustomization.jspx
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/convert/ByteConverter.java
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/convert/ColorConverter.java
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/convert/ConverterUtils.java
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/convert/DateTimeConverter.java
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/convert/DoubleConverter.java
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/convert/FloatConverter.java
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/convert/IntegerConverter.java
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/convert/LongConverter.java
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/convert/ShortConverter.java
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/el/SecondaryWindowHelpProvider.java
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/image/PainterImageRenderer.java
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/image/cache/BaseColorizedIconKey.java
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/image/cache/FileSystemImageCache.java
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/image/encode/GifEncoder.java
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/image/encode/PNGEncoder.java
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/image/laf/browser/ButtonImageRenderer.java
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/image/laf/browser/ColorizedIconImageRenderer.java
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/image/laf/browser/CompositeButtonImageRenderer.java
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/image/laf/browser/FlippedIconImageRenderer.java
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/image/util/MapArea.java
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/image/xml/encode/AbstractXMLEncoder.java
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/image/xml/parse/BaseImageProviderRequestParser.java
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/image/xml/parse/ImageParseUtils.java
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/io/HtmlResponseWriter.java
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/io/XhtmlResponseWriter.java
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/desktop/DesktopTableRenderer.java
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/desktop/TreeTableRenderer.java
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/pda/PdaTableRenderer.java
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/pda/TrainRenderer.java
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/skin/BaseDesktopSkin.java
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/skin/PdaHtmlSkin.java
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/skin/XhtmlSkin.java
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/ChooseDateRenderer.java
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/ColumnGroupRenderer.java
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/CoreFormData.java
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/DesktopPanelPageHeaderRenderer.java
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/MediaRenderer.java
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/PanelHeaderRenderer.java
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/PanelListRenderer.java
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/ProcessUtils.java
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SelectManyShuttleRenderer.java
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SelectRangeChoiceBarRenderer.java
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SimpleInputColorRenderer.java
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SimpleInputDateRenderer.java
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SimpleInputTextRenderer.java
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SimpleSelectManyCheckboxRenderer.java
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SimpleSelectManyListboxRenderer.java
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SimpleSelectOneListboxRenderer.java
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SimpleSelectOneRadioRenderer.java
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SimpleSelectOneRenderer.java
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/TableRenderer.java
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/jsLibs/DateFormatInfoScriptlet.java
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/jsLibs/XhtmlScriptletFactory.java
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/table/CellUtils.java
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/table/DetailColumnRenderer.java
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/table/TreeUtils.java
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/share/expl/Coercions.java
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/skin/SkinCSSDocumentHandler.java
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/style/Style.java
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/style/util/CSSUtils.java
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/style/util/NameUtils.java
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/style/xml/parse/IntegerArrayEnumeration.java
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/style/xml/parse/StyleSheetDocument.java
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/style/xml/parse/StyleSheetNodeParser.java
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/composite/ContextPoppingUINode.java
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/composite/RootChildBoundValue.java
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/laf/base/BaseLafRenderer.java
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/laf/base/BaseLafUtils.java
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/laf/base/desktop/BaseDesktopUtils.java
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/laf/base/desktop/ColorPaletteRenderer.java
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/laf/base/desktop/GeneratedImageRenderer.java
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/laf/base/desktop/GlobalButtonRenderer.java
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/laf/base/desktop/HeaderRenderer.java
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/laf/base/desktop/SideNavRenderer.java
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/laf/base/pda/HeaderRenderer.java
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/laf/base/pda/PdaHtmlLafUtils.java
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/laf/base/xhtml/LinkDataObject.java
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/laf/base/xhtml/NavigationBarRenderer.java
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/laf/base/xhtml/PageRenderer.java
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/laf/base/xhtml/ProcessUtils.java
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/laf/base/xhtml/XhtmlLafRenderer.java
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/laf/base/xhtml/XhtmlLafUtils.java
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/laf/simple/desktop/MessageBoxRenderer.java
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/laf/simple/desktop/SideBarRenderer.java
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/laf/simple/pda/SimplePdaUtils.java
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/laf/xml/parse/ImageIconParser.java
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/path/PathImpl.java
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/validator/ByteLengthValidator.java
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/validator/DateTimeRangeValidator.java
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/validator/LongRangeValidator.java
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/validator/RegExpValidator.java
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/javascript/META-INF/adf/jsLibs/CharSets.js
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/javascript/META-INF/adf/jsLibs/ColorField.js
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/javascript/META-INF/adf/jsLibs/ColorFieldFormat.js
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/javascript/META-INF/adf/jsLibs/ColorFormat.js
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/javascript/META-INF/adf/jsLibs/Core.js
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/javascript/META-INF/adf/jsLibs/CoreFormat.js
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/javascript/META-INF/adf/jsLibs/DateFieldFormat.js
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/javascript/META-INF/adf/jsLibs/DateFormat.js
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/test/java/org/apache/myfaces/trinidadinternal/renderkit/TestResponseWriter.java

Modified: incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java-templates/org/apache/myfaces/trinidad/component/UIXEditableValueTemplate.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java-templates/org/apache/myfaces/trinidad/component/UIXEditableValueTemplate.java?view=diff&rev=468175&r1=468174&r2=468175
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java-templates/org/apache/myfaces/trinidad/component/UIXEditableValueTemplate.java (original)
+++ incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java-templates/org/apache/myfaces/trinidad/component/UIXEditableValueTemplate.java Thu Oct 26 15:42:18 2006
@@ -112,7 +112,7 @@
     // Submitted value == null means "the component was not submitted
     // at all";  validation should not continue
     Object submittedValue = getSubmittedValue();
-    if (submittedValue == null)
+    if (submittedValue == null && !this.isRequired())
       return;
 
     Object newValue = null;

Modified: incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/convert/ColorConverter.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/convert/ColorConverter.java?view=diff&rev=468175&r1=468174&r2=468175
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/convert/ColorConverter.java (original)
+++ incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/convert/ColorConverter.java Thu Oct 26 15:42:18 2006
@@ -351,8 +351,8 @@
     return ( ( this.isTransient() == other.isTransient() ) &&
              ( this.isTransparentAllowed() == other.isTransparentAllowed()) &&
              ( _isEqualPatterns(other.getPatterns())) &&
-             ( ConverterUtils.equals(getConvertMessageDetail(),
-                                     other.getConvertMessageDetail()))
+             ( ConverterUtils.equals(getMessageDetailConvert(),
+                                     other.getMessageDetailConvert()))
             );
   }
 
@@ -371,7 +371,7 @@
     {
       result = 37 * result + patterns[i].hashCode();
     }
-    String convMsgDet = getConvertMessageDetail();
+    String convMsgDet = getMessageDetailConvert();
     result = result * 37 + (convMsgDet == null ? 0 : convMsgDet.hashCode());
     return result;
   }
@@ -439,7 +439,7 @@
    * @param convertMessageDetail Custom error message.
    * @see #CONVERT_MESSAGE_ID
    */
-  public void setConvertMessageDetail(String convertMessageDetail)
+  public void setMessageDetailConvert(String convertMessageDetail)
   {
     _facesBean.setProperty(_CONVERT_MESSAGE_DETAIL_KEY, convertMessageDetail);
   }
@@ -450,7 +450,7 @@
    * @return Custom error message.
    * @see #setConvertMessageDetail(String)
    */
-  public String getConvertMessageDetail()
+  public String getMessageDetailConvert()
   {
     return ComponentUtils.resolveString(_facesBean.getProperty(_CONVERT_MESSAGE_DETAIL_KEY));
   }
@@ -608,7 +608,7 @@
     = _TYPE.registerKey("patterns", String[].class, DEFAULT_COLOR_FORMAT_PATTERNS);
 
   private static final PropertyKey _CONVERT_MESSAGE_DETAIL_KEY
-    = _TYPE.registerKey("convertMessageDetail", String.class);
+    = _TYPE.registerKey("messageDetailConvert", String.class);
 
   private FacesBean _facesBean = ConverterUtils.getFacesBean(_TYPE);
 

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=468175&r1=468174&r2=468175
==============================================================================
--- 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 Oct 26 15:42:18 2006
@@ -349,7 +349,7 @@
   * @param convertDateMessageDetail custom error message.
   *
   */
-  public void setConvertDateMessageDetail(String convertDateMessageDetail)
+  public void setMessageDetailConvertDate(String convertDateMessageDetail)
   {
     _facesBean.setProperty(_CONVERT_DATE_MESSAGE_DETAIL_KEY, convertDateMessageDetail);
   }
@@ -362,7 +362,7 @@
    * @return custom error message that was set.
    * @see #setConvertDateMessageDetail(String)
    */
-  public String getConvertDateMessageDetail()
+  public String getMessageDetailConvertDate()
   {
     Object msg = _facesBean.getProperty(_CONVERT_DATE_MESSAGE_DETAIL_KEY);
     return ComponentUtils.resolveString(msg);
@@ -375,7 +375,7 @@
    * Overrides detail message identified by message id {@link #CONVERT_TIME_MESSAGE_ID}
    * @param convertTimeMessageDetail custom error message.
    */
-  public void setConvertTimeMessageDetail(String convertTimeMessageDetail)
+  public void setMessageDetailConvertTime(String convertTimeMessageDetail)
   {
     _facesBean.setProperty(_CONVERT_TIME_MESSAGE_DETAIL_KEY, convertTimeMessageDetail);
   }
@@ -387,7 +387,7 @@
    * @return custom error message that was set.</p>
    * @see #setConvertTimeMessageDetail(java.lang.String)
    */
-  public String getConvertTimeMessageDetail()
+  public String getMessageDetailConvertTime()
   {
     Object msg =_facesBean.getProperty(_CONVERT_TIME_MESSAGE_DETAIL_KEY);
     return ComponentUtils.resolveString(msg);
@@ -401,7 +401,7 @@
    * @param convertBothMessageDetail custom error message.
    * @see #CONVERT_BOTH_MESSAGE_ID
    */
-  public void setConvertBothMessageDetail(String convertBothMessageDetail)
+  public void setMessageDetailConvertBoth(String convertBothMessageDetail)
   {
     _facesBean.setProperty(_CONVERT_BOTH_MESSAGE_DETAIL_KEY, convertBothMessageDetail);
   }
@@ -413,7 +413,7 @@
    * @return custom error message that was set.
    * @see #setConvertBothMessageDetail(java.lang.String)
    */
-  public String getConvertBothMessageDetail()
+  public String getMessageDetailConvertBoth()
   {
      Object msg = _facesBean.getProperty(_CONVERT_BOTH_MESSAGE_DETAIL_KEY);
      return ComponentUtils.resolveString(msg);
@@ -941,12 +941,12 @@
            && ConverterUtils.equals(getTimeZone(), other.getTimeZone())
            && ConverterUtils.equals(getType(), other.getType())
            && ConverterUtils.equals(getSecondaryPattern(), other.getSecondaryPattern())
-           && ConverterUtils.equals(getConvertDateMessageDetail(),
-                                    other.getConvertDateMessageDetail())
-           && ConverterUtils.equals(getConvertTimeMessageDetail(),
-                                    other.getConvertTimeMessageDetail())
-           && ConverterUtils.equals(getConvertBothMessageDetail(),
-                                    other.getConvertBothMessageDetail())
+           && ConverterUtils.equals(getMessageDetailConvertDate(),
+                                    other.getMessageDetailConvertDate())
+           && ConverterUtils.equals(getMessageDetailConvertTime(),
+                                    other.getMessageDetailConvertTime())
+           && ConverterUtils.equals(getMessageDetailConvertBoth(),
+                                    other.getMessageDetailConvertBoth())
          )
       {
         return true;
@@ -971,9 +971,9 @@
     result = result * 37 + _getHashValue(getTimeZone());
     result = result * 37 + _getHashValue(getType());
     result = result * 37 + _getHashValue(getSecondaryPattern());
-    result = result * 37 + _getHashValue(getConvertDateMessageDetail());
-    result = result * 37 + _getHashValue(getConvertTimeMessageDetail());
-    result = result * 37 + _getHashValue(getConvertBothMessageDetail());
+    result = result * 37 + _getHashValue(getMessageDetailConvertDate());
+    result = result * 37 + _getHashValue(getMessageDetailConvertTime());
+    result = result * 37 + _getHashValue(getMessageDetailConvertBoth());
     return result;
   }
 
@@ -1696,13 +1696,13 @@
     = _TYPE.registerKey("type", String.class, "date");
 
   private static final PropertyKey _CONVERT_DATE_MESSAGE_DETAIL_KEY
-    = _TYPE.registerKey("convertDateMessageDetail", String.class);
+    = _TYPE.registerKey("messageDetailConvertDate", String.class);
 
   private static final PropertyKey _CONVERT_TIME_MESSAGE_DETAIL_KEY
-    = _TYPE.registerKey("convertTimeMessageDetail", String.class);
+    = _TYPE.registerKey("messageDetailConvertTime", String.class);
 
   private static final PropertyKey _CONVERT_BOTH_MESSAGE_DETAIL_KEY
-    = _TYPE.registerKey("convertBothMessageDetail", String.class);
+    = _TYPE.registerKey("messageDetailConvertBoth", String.class);
 
   private FacesBean _facesBean = ConverterUtils.getFacesBean(_TYPE);
 

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=468175&r1=468174&r2=468175
==============================================================================
--- 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 Thu Oct 26 15:42:18 2006
@@ -363,7 +363,7 @@
    * Overrides detail message identified by message id {@link #CONVERT_PATTERN_MESSAGE_ID}
    * @param convertPatternMessageDetail Custom error message.
    */
-  public void setConvertPatternMessageDetail(String convertPatternMessageDetail)
+  public void setMessageDetailConvertPattern(String convertPatternMessageDetail)
   {
     _facesBean.setProperty(_CONVERT_PATTERN_MESSAGE_DETAIL_KEY, convertPatternMessageDetail);
   }
@@ -375,7 +375,7 @@
    * @see #setConvertPatternMessageDetail(String)
    *
    */
-  public String getConvertPatternMessageDetail()
+  public String getMessageDetailConvertPattern()
   {
     Object msg = _facesBean.getProperty(_CONVERT_PATTERN_MESSAGE_DETAIL_KEY);
     return ComponentUtils.resolveString(msg);
@@ -389,7 +389,7 @@
    * Overrides detail message identified by message id {@link #CONVERT_NUMBER_MESSAGE_ID}
    * @param convertNumberMessageDetail custom error message.
    */
-  public void setConvertNumberMessageDetail(String convertNumberMessageDetail)
+  public void setMessageDetailConvertNumber(String convertNumberMessageDetail)
   {
     _facesBean.setProperty(_CONVERT_NUMBER_MESSAGE_DETAIL_KEY, convertNumberMessageDetail);
   }
@@ -401,7 +401,7 @@
    * @return Custom error message.
    * @see #setConvertNumberMessageDetail(String)
    */
-  public String getConvertNumberMessageDetail()
+  public String getMessageDetailConvertNumber()
   {
     Object msg = _facesBean.getProperty(_CONVERT_NUMBER_MESSAGE_DETAIL_KEY);
     return ComponentUtils.resolveString(msg);
@@ -416,7 +416,7 @@
    * @param convertCurrencyMessageDetail custom error message.
    *
    */
-  public void setConvertCurrencyMessageDetail(String convertCurrencyMessageDetail)
+  public void setMessageDetailConvertCurrency(String convertCurrencyMessageDetail)
   {
     _facesBean.setProperty(_CONVERT_CURRENCY_MESSAGE_DETAIL_KEY,convertCurrencyMessageDetail);
   }
@@ -428,7 +428,7 @@
    * @return Custom error message.
    * @see #setConvertCurrencyMessageDetail(String)
    */
-  public String getConvertCurrencyMessageDetail()
+  public String getMessageDetailConvertCurrency()
   {
     Object msg = _facesBean.getProperty(_CONVERT_CURRENCY_MESSAGE_DETAIL_KEY);
     return ComponentUtils.resolveString(msg);
@@ -442,7 +442,7 @@
    * Overrides detail message identified by message id {@link #CONVERT_PERCENT_MESSAGE_ID}
    * @param convertPercentMessageDetail custom error message.
    */
-  public void setConvertPercentMessageDetail(String convertPercentMessageDetail)
+  public void setMessageDetailConvertPercent(String convertPercentMessageDetail)
   {
     _facesBean.setProperty(_CONVERT_PERCENT_MESSAGE_DETAIL_KEY, convertPercentMessageDetail);
   }
@@ -455,7 +455,7 @@
    * @return Custom error message.
    * @see #setConvertPercentMessageDetail(String)
    */
-  public String getConvertPercentMessageDetail()
+  public String getMessageDetailConvertPercent()
   {
     Object msg = _facesBean.getProperty(_CONVERT_PERCENT_MESSAGE_DETAIL_KEY);
     return ComponentUtils.resolveString(msg);
@@ -642,10 +642,10 @@
     result = result * 37 + (isGroupingUsed() ? 1: 0);
     result = result * 37 + (isIntegerOnly()? 1: 0);
     result = result * 37 + (isTransient() ? 1: 0);
-    result = result * 37 + _getHashValue(getConvertPatternMessageDetail());
-    result = result * 37 + _getHashValue(getConvertNumberMessageDetail());
-    result = result * 37 + _getHashValue(getConvertCurrencyMessageDetail());
-    result = result * 37 + _getHashValue(getConvertPercentMessageDetail());
+    result = result * 37 + _getHashValue(getMessageDetailConvertPattern());
+    result = result * 37 + _getHashValue(getMessageDetailConvertNumber());
+    result = result * 37 + _getHashValue(getMessageDetailConvertCurrency());
+    result = result * 37 + _getHashValue(getMessageDetailConvertPercent());
     return result;
   }
 
@@ -676,14 +676,14 @@
         ConverterUtils.equals(getCurrencyCode(), nConv.getCurrencyCode()) &&
         ConverterUtils.equals(getCurrencySymbol(), nConv.getCurrencySymbol()) &&
         ConverterUtils.equals(getPattern(), nConv.getPattern()) &&
-        ConverterUtils.equals(getConvertPatternMessageDetail(),
-                              nConv.getConvertPatternMessageDetail()) &&
-        ConverterUtils.equals(getConvertNumberMessageDetail(),
-                              nConv.getConvertNumberMessageDetail())  &&
-        ConverterUtils.equals(getConvertCurrencyMessageDetail(),
-                              nConv.getConvertCurrencyMessageDetail())&&
-        ConverterUtils.equals(getConvertPercentMessageDetail(),
-                              nConv.getConvertPercentMessageDetail());
+        ConverterUtils.equals(getMessageDetailConvertPattern(),
+                              nConv.getMessageDetailConvertPattern()) &&
+        ConverterUtils.equals(getMessageDetailConvertNumber(),
+                              nConv.getMessageDetailConvertNumber())  &&
+        ConverterUtils.equals(getMessageDetailConvertCurrency(),
+                              nConv.getMessageDetailConvertCurrency())&&
+        ConverterUtils.equals(getMessageDetailConvertPercent(),
+                              nConv.getMessageDetailConvertPercent());
 
     }
     return false;
@@ -1123,16 +1123,16 @@
   private static final FacesBean.Type _TYPE = new FacesBean.Type();
 
   private static final PropertyKey _CONVERT_CURRENCY_MESSAGE_DETAIL_KEY
-   = _TYPE.registerKey("convertCurrencyMessageDetail", String.class);
+   = _TYPE.registerKey("messageDetailConvertCurrency", String.class);
 
   private static final PropertyKey _CONVERT_NUMBER_MESSAGE_DETAIL_KEY
-   = _TYPE.registerKey("convertNumberMessageDetail", String.class);
+   = _TYPE.registerKey("messageDetailConvertNumber", String.class);
 
   private static final PropertyKey _CONVERT_PATTERN_MESSAGE_DETAIL_KEY
-   = _TYPE.registerKey("convertPatternMessageDetail", String.class);
+   = _TYPE.registerKey("messageDetailConvertPattern", String.class);
 
   private static final PropertyKey _CONVERT_PERCENT_MESSAGE_DETAIL_KEY
-   = _TYPE.registerKey("convertPercentMessageDetail", String.class);
+   = _TYPE.registerKey("messageDetailConvertPercent", String.class);
 
   private static final PropertyKey _CURRENCY_CODE_KEY
    = _TYPE.registerKey("currencyCode", String.class);

Modified: incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/validator/ByteLengthValidator.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/validator/ByteLengthValidator.java?view=diff&rev=468175&r1=468174&r2=468175
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/validator/ByteLengthValidator.java (original)
+++ incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/validator/ByteLengthValidator.java Thu Oct 26 15:42:18 2006
@@ -159,7 +159,7 @@
    * Overrides detail message identified by message id {@link #MAXIMUM_MESSAGE_ID}
    * @param maximumMessageDetail Custom error message.
    */
-  public void setMaximumMessageDetail(String maximumMessageDetail)
+  public void setMessageDetailMaximum(String maximumMessageDetail)
   {
     _facesBean.setProperty(_MAXIMUM_MESSAGE_DETAIL_KEY, maximumMessageDetail);
   }
@@ -170,7 +170,7 @@
    * @return Custom error message.
    * @see  #setMaximumMessageDetail(String)
    */
-  public String getMaximumMessageDetail()
+  public String getMessageDetailMaximum()
   {
     Object obj = _facesBean.getProperty(_MAXIMUM_MESSAGE_DETAIL_KEY);
     return ComponentUtils.resolveString(obj);
@@ -296,8 +296,8 @@
       ByteLengthValidator other = (ByteLengthValidator) object;
       String encoding = getEncoding();
       String otherEncoding = other.getEncoding();
-      String otherMsgMaxDet = other.getMaximumMessageDetail();
-      String msgMaxDet = getMaximumMessageDetail();
+      String otherMsgMaxDet = other.getMessageDetailMaximum();
+      String msgMaxDet = getMessageDetailMaximum();
 
       if ( this.isTransient() == other.isTransient() &&
             ValidatorUtils.equals(encoding, otherEncoding) &&
@@ -319,7 +319,7 @@
   public int hashCode()
   {
     int result = 17;
-    String maximumMsgDet = getMaximumMessageDetail();
+    String maximumMsgDet = getMessageDetailMaximum();
     String encoding = getEncoding();
     result = 37 * result + (encoding == null? 0 : encoding.hashCode());
     result = 37 * result + (_isTransient ? 0 : 1);
@@ -369,7 +369,7 @@
     _TYPE.registerKey("maximumBytes", int.class, 0);
 
   private static final PropertyKey  _MAXIMUM_MESSAGE_DETAIL_KEY =
-    _TYPE.registerKey("maximumMessageDetail", String.class);
+    _TYPE.registerKey("messageDetailMaximum", String.class);
 
   private FacesBean _facesBean = ValidatorUtils.getFacesBean(_TYPE);
 

Modified: incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/validator/DateTimeRangeValidator.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/validator/DateTimeRangeValidator.java?view=diff&rev=468175&r1=468174&r2=468175
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/validator/DateTimeRangeValidator.java (original)
+++ incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/validator/DateTimeRangeValidator.java Thu Oct 26 15:42:18 2006
@@ -202,7 +202,7 @@
    * Overrides detail message identified by message id {@link #MAXIMUM_MESSAGE_ID}
    * @param maximumMessageDetail Custom error message.
    */
-  public void setMaximumMessageDetail(String maximumMessageDetail)
+  public void setMessageDetailMaximum(String maximumMessageDetail)
   {
     _facesBean.setProperty(_MAXIMUM_MESSAGE_DETAIL_KEY, maximumMessageDetail);
   }
@@ -213,7 +213,7 @@
    * @return Custom error message.
    * @see #setMaximumMessageDetail(String)
    */
-  public String getMaximumMessageDetail()
+  public String getMessageDetailMaximum()
   {
     Object maxMsgDet = _facesBean.getProperty(_MAXIMUM_MESSAGE_DETAIL_KEY);
     return ComponentUtils.resolveString(maxMsgDet);
@@ -226,7 +226,7 @@
    * Overrides detail message identified by message id {@link #MINIMUM_MESSAGE_ID}
    * @param minimumMessageDetail Custom error message.
    */
-  public void setMinimumMessageDetail(String minimumMessageDetail)
+  public void setMessageDetailMinimum(String minimumMessageDetail)
   {
     _facesBean.setProperty(_MINIMUM_MESSAGE_DETAIL_KEY, minimumMessageDetail);
   }
@@ -237,7 +237,7 @@
    * @return Custom error message.
    * @see #setMinimumMessageDetail(String)
    */
-  public String getMinimumMessageDetail()
+  public String getMessageDetailMinimum()
   {
     Object minMsgDet = _facesBean.getProperty(_MINIMUM_MESSAGE_DETAIL_KEY);
     return ComponentUtils.resolveString(minMsgDet);
@@ -250,7 +250,7 @@
    * Overrides detail message identified by message id {@link #NOT_IN_RANGE_MESSAGE_ID}
    * @param notInRangeMessageDetail Custom error message.
    */
-  public void setNotInRangeMessageDetail(String notInRangeMessageDetail)
+  public void setMessageDetailNotInRange(String notInRangeMessageDetail)
   {
     _facesBean.setProperty(_NOT_IN_RANGE_MESSAGE_DETAIL_KEY, notInRangeMessageDetail);
   }
@@ -262,7 +262,7 @@
    * @return Custom error message.
    * @see #setNotInRangeMessageDetail(String)
    */
-  public String getNotInRangeMessageDetail()
+  public String getMessageDetailNotInRange()
   {
     Object notInRngMsg = _facesBean.getProperty(_NOT_IN_RANGE_MESSAGE_DETAIL_KEY);
     return ComponentUtils.resolveString(notInRngMsg);
@@ -382,12 +382,12 @@
       if ( _transientValue == that._transientValue &&
            (ValidatorUtils.equals(getMinimum(), that.getMinimum())) &&
            (ValidatorUtils.equals(getMaximum(), that.getMaximum())) &&
-           (ValidatorUtils.equals(getMaximumMessageDetail(),
-                                   that.getMaximumMessageDetail())) &&
-           (ValidatorUtils.equals(getMinimumMessageDetail(),
-                                   that.getMinimumMessageDetail())) &&
-           (ValidatorUtils.equals(getNotInRangeMessageDetail(),
-                                   that.getNotInRangeMessageDetail()))
+           (ValidatorUtils.equals(getMessageDetailMaximum(),
+                                   that.getMessageDetailMaximum())) &&
+           (ValidatorUtils.equals(getMessageDetailMinimum(),
+                                   that.getMessageDetailMinimum())) &&
+           (ValidatorUtils.equals(getMessageDetailNotInRange(),
+                                   that.getMessageDetailNotInRange()))
           )
       {
         return true;
@@ -402,9 +402,9 @@
     int result = 17;
     Object max = getMaximum();
     Object min = getMinimum();
-    Object maxMsgDet        =  getMaximumMessageDetail();
-    Object minMsgDet        =  getMinimumMessageDetail();
-    Object notInRangeMsgDet =  getNotInRangeMessageDetail();
+    Object maxMsgDet        =  getMessageDetailMaximum();
+    Object minMsgDet        =  getMessageDetailMinimum();
+    Object notInRangeMsgDet =  getMessageDetailNotInRange();
 
     result = 37 * result + ( max == null ? 0 : max.hashCode());
     result = 37 * result + ( min == null ? 0 : min.hashCode());
@@ -443,7 +443,7 @@
     Object value,
     Object min,
     Object max)
-  {
+  { 
     Converter converter = _getConverter(context, component);
 
     Object cValue = _getConvertedValue(context, component, converter, value);
@@ -564,16 +564,16 @@
     _TYPE.registerKey("maximum", Date.class );
 
   private static final PropertyKey _MAXIMUM_MESSAGE_DETAIL_KEY =
-    _TYPE.registerKey("maximumMessageDetail", String.class);
+    _TYPE.registerKey("messageDetailMaximum", String.class);
 
   private static final PropertyKey _MINIMUM_MESSAGE_DETAIL_KEY =
-    _TYPE.registerKey("minimumMessageDetail", String.class);
+    _TYPE.registerKey("messageDetailMinimum", String.class);
 
   private static final PropertyKey _NOT_IN_RANGE_MESSAGE_DETAIL_KEY =
-    _TYPE.registerKey("notInRangeMessageDetail", String.class);
+    _TYPE.registerKey("messageDetailNotInRange", String.class);
 
   private FacesBean _facesBean = ValidatorUtils.getFacesBean(_TYPE);
 
   private boolean _transientValue = false;
 
-}
+}
\ No newline at end of file

Added: incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/validator/DoubleRangeValidator.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/validator/DoubleRangeValidator.java?view=auto&rev=468175
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/validator/DoubleRangeValidator.java (added)
+++ incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/validator/DoubleRangeValidator.java Thu Oct 26 15:42:18 2006
@@ -0,0 +1,424 @@
+/*
+ * Copyright  2003-2006 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.myfaces.trinidad.validator;
+
+import javax.faces.application.FacesMessage;
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+import javax.faces.el.ValueBinding;
+import javax.faces.validator.Validator;
+import javax.faces.validator.ValidatorException;
+
+import org.apache.myfaces.trinidad.bean.FacesBean;
+import org.apache.myfaces.trinidad.bean.PropertyKey;
+import org.apache.myfaces.trinidad.util.ComponentUtils;
+import org.apache.myfaces.trinidad.util.MessageFactory;
+
+/**
+ * <p>Implementation for <code>java.lang.Long</code> values.</p>
+ *
+ * @author Apache Trinidad Podling
+ */
+public class DoubleRangeValidator extends javax.faces.validator.DoubleRangeValidator
+{
+  
+  public static final String VALIDATOR_ID = "org.apache.myfaces.trinidad.DoubleRange";
+
+  /**
+   * <p>The message identifier of the {@link javax.faces.application.FacesMessage}
+   * to be created if the maximum value check fails.  The message format
+   * string for this message may optionally include <code>{0}</code>,
+   * <code>{1}</code> and <code>{3}</code> placeholders,
+   * which will be replaced by user input, component label and configured
+   * maximum value.</p>
+   */
+  public static final String MAXIMUM_MESSAGE_ID =
+      "org.apache.myfaces.trinidad.validator.DoubleRangeValidator.MAXIMUM";
+
+  /**
+   * <p>The message identifier of the {@link javax.faces.application.FacesMessage}
+   * to be created if the minimum value check fails.  The message format
+   * string for this message may optionally include <code>{0}</code>,
+   * <code>{1}</code> and <code>{2}</code> placeholders, which will be replaced
+   * by user input, component label and configured minimum value.</p>
+   */
+  public static final String MINIMUM_MESSAGE_ID =
+      "org.apache.myfaces.trinidad.validator.DoubleRangeValidator.MINIMUM";
+
+
+  /**
+   * <p>The message identifier of the {@link javax.faces.application.FacesMessage}
+   * to be created if the maximum or minimum value check fails, and both
+   * the maximum and minimum values for this validator have been set.
+   * The message format string for this message may optionally include
+   * <code>{0}</code>, <code>{1}</code>, <code>{2}</code> and <code>{3}</code>
+   * placeholders, which will be replaced by user input, component label,
+   * configured minimum value and configured maximum value.</p>
+   */
+  public static final String NOT_IN_RANGE_MESSAGE_ID =
+      "org.apache.myfaces.trinidad.validator.DoubleRangeValidator.NOT_IN_RANGE";
+
+  
+  /**
+   * Construct a {@link Validator} with no preconfigured limits.
+   */
+  public DoubleRangeValidator() {
+    super();
+  }
+
+  /**
+   * Construct a {@link Validator} with the specified preconfigured
+   * limit.
+   *
+   * @param maximum Maximum value to allow
+   */
+  public DoubleRangeValidator(long maximum) {
+    super(new Long(maximum));
+  }
+
+  /**
+   * Construct a {@link Validator} with the specified preconfigured
+   * limits.
+   *
+   * @param maximum Maximum value to allow
+   * @param minimum Minimum value to allow
+   *
+   */
+  public DoubleRangeValidator(long maximum, long minimum) {
+    super(new Long(minimum), new Long(maximum));
+  }
+  
+  /**
+   * Return the maximum value to be enforced by this {@link
+   * Validator} or null if it has not been
+   * set.
+   */
+  public double getMaximum()
+  {
+    Object maxLong = _facesBean.getProperty(_MAXIMUM_KEY);
+    return ComponentUtils.resolveDouble(maxLong);
+  }
+
+  /**
+   * Set the maximum value to be enforced by this {@link Validator}.
+   *
+   * @param maximum The new maximum value
+   *
+   */
+  public void setMaximum(double maximum)
+  {
+    _facesBean.setProperty(_MAXIMUM_KEY, new Double(maximum));
+  }
+
+
+  /**
+   * Return the minimum value to be enforced by this {@link
+   * Validator}, or null if it has not been
+   * set.
+   */
+  public double getMinimum()
+  {
+    Object minLong = _facesBean.getProperty(_MINIMUM_KEY);
+    return ComponentUtils.resolveDouble(minLong);
+  }
+
+  /**
+   * Set the minimum value to be enforced by this {@link Validator}.
+   *
+   * @param minimum The new minimum value
+   *
+   */
+  public void setMinimum(double minimum)
+  {
+    _facesBean.setProperty(_MINIMUM_KEY, new Double(minimum));
+  }
+
+  /**
+   * <p>Custom error message to be used, for creating detail part of the
+   * {@link FacesMessage}, when input value exceeds the maximum value set.</p>
+   * Overrides detail message identified by message id {@link #MAXIMUM_MESSAGE_ID}
+   * @param maximumMessageDetail Custom error message.
+   */
+  public void setMessageDetailMaximum(String maximumMessageDetail)
+  {
+    _facesBean.setProperty(_MAXIMUM_MESSAGE_DETAIL_KEY, maximumMessageDetail);
+  }
+
+  /**
+   *  <p>Return custom detail error message that was set for creating {@link FacesMessage},
+   *  for cases where input value exceeds the <code>maximum</code> value set.</p>
+   * @return Custom error message.
+   * @see #setMaximumMessageDetail(String)
+   */
+  public String getMessageDetailMaximum()
+  {
+    Object maxMsgDet = _facesBean.getProperty(_MAXIMUM_MESSAGE_DETAIL_KEY);
+    return ComponentUtils.resolveString(maxMsgDet);
+  }
+
+  /**
+   * <p>Custom error message to be used, for creating detail part of the
+   * {@link FacesMessage}, when input value is less the set
+   * <code>minimum</code> value.</p>
+   * Overrides detail message identified by message id {@link #MINIMUM_MESSAGE_ID}
+   * @param minimumMessageDetail Custom error message.
+   */
+  public void setMessageDetailMinimum(String minimumMessageDetail)
+  {
+    _facesBean.setProperty(_MINIMUM_MESSAGE_DETAIL_KEY, minimumMessageDetail);
+  }
+
+  /**
+   * <p>Return custom detail error message that was set for creating {@link FacesMessage},
+   * for cases where, input value is less than the <code>minimum</code> value set.</p>
+   * @return Custom error message.
+   * @see #setMinimumMessageDetail(String)
+   */
+  public String getMessageDetailMinimum()
+  {
+    Object minMsgDet = _facesBean.getProperty(_MINIMUM_MESSAGE_DETAIL_KEY);
+    return ComponentUtils.resolveString(minMsgDet);
+  }
+
+  /**
+   * <p>Custom error message to be used, for creating detail part of the
+   * {@link FacesMessage}, when input value is not with in the range,
+   * when <code>minimum</code> and <code>maximum</code> is set.</p>
+   * Overrides detail message identified by message id {@link #NOT_IN_RANGE_MESSAGE_ID}
+   * @param notInRangeMessageDetail Custom error message.
+   */
+  public void setMessageDetailNotInRange(String notInRangeMessageDetail)
+  {
+    _facesBean.setProperty(_NOT_IN_RANGE_MESSAGE_DETAIL_KEY, notInRangeMessageDetail);
+  }
+
+  /**
+   * <p>Return custom detail error message that was set for creating {@link FacesMessage},
+   * for cases where, input value exceeds the <code>maximum</code> value and is
+   * less than the <code>minimum</code> value set.</p>
+   * @return Custom error message.
+   * @see #setNotInRangeMessageDetail(String)
+   */
+  public String getMessageDetailNotInRange()
+  {
+    Object notInRngMsg = _facesBean.getProperty(_NOT_IN_RANGE_MESSAGE_DETAIL_KEY);
+    return ComponentUtils.resolveString(notInRngMsg);
+  }
+
+  @Override
+  public void validate(
+    FacesContext context,
+    UIComponent component,
+    Object value
+    ) throws ValidatorException
+  {
+    try
+    {
+      super.validate(context, component, value);
+    }
+    catch (ValidatorException ve)
+    {
+         
+      if (value != null && value instanceof Number)
+      {
+        double doubleValue = ((Number)value).doubleValue(); 
+        
+        double min = getMinimum();
+        double max = getMaximum();
+        
+        if (doubleValue > max)
+        {
+          if (min == Double.MIN_VALUE)//the default...
+          {
+             throw new ValidatorException
+                        (_getNotInRangeMessage(context, component, value, min, max));
+          }
+          else
+          {
+             throw new ValidatorException
+                        (_getMaximumMessage(context, component, value, max));
+          }
+        }
+
+        if (doubleValue < min)
+        {
+          if (max == Double.MAX_VALUE)//the default...
+          {
+            throw new ValidatorException
+                        (_getNotInRangeMessage(context, component, value, min, max));
+          }
+          else
+          {
+            FacesMessage msg = _getMinimumMessage(context, component, value, min);
+            throw new ValidatorException(msg);
+          }
+        }
+      }
+      else
+      {
+        throw ve;
+      }
+    }     
+  }
+
+  //  StateHolder Methods
+  public Object saveState(FacesContext context)
+  {
+    return _facesBean.saveState(context);
+  }
+
+
+  public void restoreState(FacesContext context, Object state)
+  {
+    _facesBean.restoreState(context, state);
+  }
+
+  /**
+   * <p>Set the {@link ValueBinding} used to calculate the value for the
+   * specified attribute if any.</p>
+   *
+   * @param name Name of the attribute for which to set a {@link ValueBinding}
+   * @param binding The {@link ValueBinding} to set, or <code>null</code>
+   *  to remove any currently set {@link ValueBinding}
+   *
+   * @exception NullPointerException if <code>name</code>
+   *  is <code>null</code>
+   * @exception IllegalArgumentException if <code>name</code> is not a valid
+   *            attribute of this validator
+   */
+  public void setValueBinding(String name, ValueBinding binding)
+  {
+    ValidatorUtils.setValueBinding(_facesBean, name, binding) ;
+  }
+
+  /**
+   * <p>Return the {@link ValueBinding} used to calculate the value for the
+   * specified attribute name, if any.</p>
+   *
+   * @param name Name of the attribute or property for which to retrieve a
+   *  {@link ValueBinding}
+   *
+   * @exception NullPointerException if <code>name</code>
+   *  is <code>null</code>
+   * @exception IllegalArgumentException if <code>name</code> is not a valid
+   * attribute of this validator
+   */
+  public ValueBinding getValueBinding(String name)
+  {
+    return ValidatorUtils.getValueBinding(_facesBean, name);
+  }
+  
+  public boolean isTransient()
+  {
+    return (_transientValue);
+  }
+
+
+  public void setTransient(boolean transientValue)
+  {
+    _transientValue = transientValue;
+  }
+
+  private FacesMessage _getNotInRangeMessage(
+      FacesContext context,
+      UIComponent component,
+      Object value,
+      Object min,
+      Object max)
+    {
+      Object msg   = _getRawNotInRangeMessageDetail();
+      Object label = ValidatorUtils.getComponentLabel(component);
+
+      Object[] params = {label, value, min, max};
+
+      return MessageFactory.getMessage(context, NOT_IN_RANGE_MESSAGE_ID,
+                                        msg, params, component);
+    }
+
+
+    
+    private Object _getRawNotInRangeMessageDetail()
+    {
+      return _facesBean.getRawProperty(_NOT_IN_RANGE_MESSAGE_DETAIL_KEY);
+    }
+
+
+    private FacesMessage _getMaximumMessage(
+      FacesContext context,
+      UIComponent component,
+      Object value,
+      Object max)
+    {
+
+      Object msg   = _getRawMaximumMessageDetail();
+      Object label = ValidatorUtils.getComponentLabel(component);
+
+      Object[] params = {label, value, max};
+
+      return MessageFactory.getMessage(context,
+                                       MAXIMUM_MESSAGE_ID,
+                                       msg,
+                                       params,
+                                       component);
+    }
+
+    private Object _getRawMaximumMessageDetail()
+    {
+      return _facesBean.getRawProperty(_MAXIMUM_MESSAGE_DETAIL_KEY);
+    }
+
+    private FacesMessage _getMinimumMessage(
+      FacesContext context,
+      UIComponent component,
+      Object value,
+      Object min)
+    {
+      Object msg      = _getRawMinimumMessageDetail();
+      Object label    = ValidatorUtils.getComponentLabel(component);
+
+      Object[] params = {label, value, min};
+
+      return MessageFactory.getMessage(context, MINIMUM_MESSAGE_ID,
+                                       msg, params, component);
+    }
+
+    private Object _getRawMinimumMessageDetail()
+    {
+      return _facesBean.getRawProperty(_MINIMUM_MESSAGE_DETAIL_KEY);
+    }
+
+  private static final FacesBean.Type _TYPE = new FacesBean.Type();
+
+  private static final PropertyKey _MINIMUM_KEY =
+    _TYPE.registerKey("minimum", Double.class, Double.MIN_VALUE);
+
+  private static final PropertyKey _MAXIMUM_KEY =
+    _TYPE.registerKey("maximum", Double.class, Double.MAX_VALUE );
+
+  private static final PropertyKey _MAXIMUM_MESSAGE_DETAIL_KEY =
+    _TYPE.registerKey("messageDetailMaximum", String.class);
+
+  private static final PropertyKey _MINIMUM_MESSAGE_DETAIL_KEY =
+    _TYPE.registerKey("messageDetailMinimum", String.class);
+
+  private static final PropertyKey _NOT_IN_RANGE_MESSAGE_DETAIL_KEY =
+    _TYPE.registerKey("messageDetailNotInRange", String.class);
+
+  private FacesBean _facesBean = ValidatorUtils.getFacesBean(_TYPE);
+
+  private boolean _transientValue = false;
+}
\ No newline at end of file

Added: incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/validator/LengthValidator.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/validator/LengthValidator.java?view=auto&rev=468175
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/validator/LengthValidator.java (added)
+++ incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/validator/LengthValidator.java Thu Oct 26 15:42:18 2006
@@ -0,0 +1,426 @@
+/*
+ * Copyright  2003-2006 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.myfaces.trinidad.validator;
+
+import javax.faces.application.FacesMessage;
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+import javax.faces.el.ValueBinding;
+
+import javax.faces.validator.Validator;
+import javax.faces.validator.ValidatorException;
+
+import org.apache.myfaces.trinidad.bean.FacesBean;
+import org.apache.myfaces.trinidad.bean.PropertyKey;
+import org.apache.myfaces.trinidad.util.ComponentUtils;
+import org.apache.myfaces.trinidad.util.IntegerUtils;
+import org.apache.myfaces.trinidad.util.MessageFactory;
+
+/**
+ * <p>Implementation for <code>java.lang.Integer</code> values.</p>
+ *
+ * @author Apache Trinidad Podling
+ */
+public class LengthValidator extends javax.faces.validator.LengthValidator
+{
+  
+  public static final String VALIDATOR_ID = "org.apache.myfaces.trinidad.Length";
+
+  /**
+   * <p>The message identifier of the {@link javax.faces.application.FacesMessage}
+   * to be created if the maximum value check fails.  The message format
+   * string for this message may optionally include <code>{0}</code>,
+   * <code>{1}</code> and <code>{3}</code> placeholders,
+   * which will be replaced by user input, component label and configured
+   * maximum value.</p>
+   */
+  public static final String MAXIMUM_MESSAGE_ID =
+      "org.apache.myfaces.trinidad.validator.LengthValidator.MAXIMUM";
+
+  /**
+   * <p>The message identifier of the {@link javax.faces.application.FacesMessage}
+   * to be created if the minimum value check fails.  The message format
+   * string for this message may optionally include <code>{0}</code>,
+   * <code>{1}</code> and <code>{2}</code> placeholders, which will be replaced
+   * by user input, component label and configured minimum value.</p>
+   */
+  public static final String MINIMUM_MESSAGE_ID =
+      "org.apache.myfaces.trinidad.validator.LengthValidator.MINIMUM";
+
+
+  /**
+   * <p>The message identifier of the {@link javax.faces.application.FacesMessage}
+   * to be created if the maximum or minimum value check fails, and both
+   * the maximum and minimum values for this validator have been set.
+   * The message format string for this message may optionally include
+   * <code>{0}</code>, <code>{1}</code>, <code>{2}</code> and <code>{3}</code>
+   * placeholders, which will be replaced by user input, component label,
+   * configured minimum value and configured maximum value.</p>
+   */
+  public static final String NOT_IN_RANGE_MESSAGE_ID =
+      "org.apache.myfaces.trinidad.validator.LengthValidator.NOT_IN_RANGE";
+
+  
+  /**
+   * Construct a {@link Validator} with no preconfigured limits.
+   */
+  public LengthValidator() {
+    super();
+  }
+
+  /**
+   * Construct a {@link Validator} with the specified preconfigured
+   * limit.
+   *
+   * @param maximum Maximum value to allow
+   */
+  public LengthValidator(int maximum) {
+    super(new Integer(maximum));
+  }
+
+  /**
+   * Construct a {@link Validator} with the specified preconfigured
+   * limits.
+   *
+   * @param maximum Maximum value to allow
+   * @param minimum Minimum value to allow
+   *
+   */
+  public LengthValidator(int maximum, int minimum) {
+    super(new Integer(minimum), new Integer(maximum));
+  }
+  
+  /**
+   * Return the maximum value to be enforced by this {@link
+   * Validator} or null if it has not been
+   * set.
+   */
+  public int getMaximum()
+  {
+    Object maxInt = _facesBean.getProperty(_MAXIMUM_KEY);
+    return ComponentUtils.resolveInteger(maxInt);
+  }
+
+  /**
+   * Set the maximum value to be enforced by this {@link Validator}.
+   *
+   * @param maximum The new maximum value
+   *
+   */
+  public void setMaximum(int maximum)
+  {
+    _facesBean.setProperty(_MAXIMUM_KEY, new Integer(maximum));
+  }
+
+
+  /**
+   * Return the minimum value to be enforced by this {@link
+   * Validator}, or null if it has not been
+   * set.
+   */
+  public int getMinimum()
+  {
+    Object minInt = _facesBean.getProperty(_MINIMUM_KEY);
+    return ComponentUtils.resolveInteger(minInt);
+  }
+
+  /**
+   * Set the minimum value to be enforced by this {@link Validator}.
+   *
+   * @param minimum The new minimum value
+   *
+   */
+  public void setMinimum(int minimum)
+  {
+    _facesBean.setProperty(_MINIMUM_KEY, new Integer(minimum));
+  }
+
+  /**
+   * <p>Custom error message to be used, for creating detail part of the
+   * {@link FacesMessage}, when input value exceeds the maximum value set.</p>
+   * Overrides detail message identified by message id {@link #MAXIMUM_MESSAGE_ID}
+   * @param maximumMessageDetail Custom error message.
+   */
+  public void setMessageDetailMaximum(String maximumMessageDetail)
+  {
+    _facesBean.setProperty(_MAXIMUM_MESSAGE_DETAIL_KEY, maximumMessageDetail);
+  }
+
+  /**
+   *  <p>Return custom detail error message that was set for creating {@link FacesMessage},
+   *  for cases where input value exceeds the <code>maximum</code> value set.</p>
+   * @return Custom error message.
+   * @see #setMaximumMessageDetail(String)
+   */
+  public String getMessageDetailMaximum()
+  {
+    Object maxMsgDet = _facesBean.getProperty(_MAXIMUM_MESSAGE_DETAIL_KEY);
+    return ComponentUtils.resolveString(maxMsgDet);
+  }
+
+  /**
+   * <p>Custom error message to be used, for creating detail part of the
+   * {@link FacesMessage}, when input value is less the set
+   * <code>minimum</code> value.</p>
+   * Overrides detail message identified by message id {@link #MINIMUM_MESSAGE_ID}
+   * @param minimumMessageDetail Custom error message.
+   */
+  public void setMessageDetailMinimum(String minimumMessageDetail)
+  {
+    _facesBean.setProperty(_MINIMUM_MESSAGE_DETAIL_KEY, minimumMessageDetail);
+  }
+
+  /**
+   * <p>Return custom detail error message that was set for creating {@link FacesMessage},
+   * for cases where, input value is less than the <code>minimum</code> value set.</p>
+   * @return Custom error message.
+   * @see #setMinimumMessageDetail(String)
+   */
+  public String getMessageDetailMinimum()
+  {
+    Object minMsgDet = _facesBean.getProperty(_MINIMUM_MESSAGE_DETAIL_KEY);
+    return ComponentUtils.resolveString(minMsgDet);
+  }
+
+  /**
+   * <p>Custom error message to be used, for creating detail part of the
+   * {@link FacesMessage}, when input value is not with in the range,
+   * when <code>minimum</code> and <code>maximum</code> is set.</p>
+   * Overrides detail message identified by message id {@link #NOT_IN_RANGE_MESSAGE_ID}
+   * @param notInRangeMessageDetail Custom error message.
+   */
+  public void setMessageDetailNotInRange(String notInRangeMessageDetail)
+  {
+    _facesBean.setProperty(_NOT_IN_RANGE_MESSAGE_DETAIL_KEY, notInRangeMessageDetail);
+  }
+
+  /**
+   * <p>Return custom detail error message that was set for creating {@link FacesMessage},
+   * for cases where, input value exceeds the <code>maximum</code> value and is
+   * less than the <code>minimum</code> value set.</p>
+   * @return Custom error message.
+   * @see #setNotInRangeMessageDetail(String)
+   */
+  public String getMessageDetailNotInRange()
+  {
+    Object notInRngMsg = _facesBean.getProperty(_NOT_IN_RANGE_MESSAGE_DETAIL_KEY);
+    return ComponentUtils.resolveString(notInRngMsg);
+  }
+
+  @Override
+  public void validate(
+    FacesContext context,
+    UIComponent component,
+    Object value
+    ) throws ValidatorException
+  {
+    try
+    {
+      super.validate(context, component, value);
+    }
+    catch (ValidatorException ve)
+    {
+         
+      if (value != null && value instanceof Number)
+      {
+        int intValue = ((Number)value).intValue(); 
+        
+        long min = getMinimum();
+        long max = getMaximum();
+        
+        if (intValue > max)
+        {
+          if (min == Integer.MIN_VALUE)//the default...
+          {
+             throw new ValidatorException
+                        (_getNotInRangeMessage(context, component, value, IntegerUtils.getString(min), IntegerUtils.getString(max)));
+          }
+          else
+          {
+             throw new ValidatorException
+                        (_getMaximumMessage(context, component, value, IntegerUtils.getString(max)));
+          }
+        }
+
+        if (intValue < min)
+        {
+          if (max == Integer.MAX_VALUE)//the default...
+          {
+            throw new ValidatorException
+                        (_getNotInRangeMessage(context, component, value, IntegerUtils.getString(min), IntegerUtils.getString(max)));
+          }
+          else
+          {
+            FacesMessage msg = _getMinimumMessage(context, component, value, IntegerUtils.getString(min));
+            throw new ValidatorException(msg);
+          }
+        }
+      }
+      else
+      {
+        throw ve;
+      }
+    }     
+  }
+
+  //  StateHolder Methods
+  public Object saveState(FacesContext context)
+  {
+    return _facesBean.saveState(context);
+  }
+
+
+  public void restoreState(FacesContext context, Object state)
+  {
+    _facesBean.restoreState(context, state);
+  }
+
+  /**
+   * <p>Set the {@link ValueBinding} used to calculate the value for the
+   * specified attribute if any.</p>
+   *
+   * @param name Name of the attribute for which to set a {@link ValueBinding}
+   * @param binding The {@link ValueBinding} to set, or <code>null</code>
+   *  to remove any currently set {@link ValueBinding}
+   *
+   * @exception NullPointerException if <code>name</code>
+   *  is <code>null</code>
+   * @exception IllegalArgumentException if <code>name</code> is not a valid
+   *            attribute of this validator
+   */
+  public void setValueBinding(String name, ValueBinding binding)
+  {
+    ValidatorUtils.setValueBinding(_facesBean, name, binding) ;
+  }
+
+  /**
+   * <p>Return the {@link ValueBinding} used to calculate the value for the
+   * specified attribute name, if any.</p>
+   *
+   * @param name Name of the attribute or property for which to retrieve a
+   *  {@link ValueBinding}
+   *
+   * @exception NullPointerException if <code>name</code>
+   *  is <code>null</code>
+   * @exception IllegalArgumentException if <code>name</code> is not a valid
+   * attribute of this validator
+   */
+  public ValueBinding getValueBinding(String name)
+  {
+    return ValidatorUtils.getValueBinding(_facesBean, name);
+  }
+  
+  public boolean isTransient()
+  {
+    return (_transientValue);
+  }
+
+
+  public void setTransient(boolean transientValue)
+  {
+    _transientValue = transientValue;
+  }
+
+  private FacesMessage _getNotInRangeMessage(
+      FacesContext context,
+      UIComponent component,
+      Object value,
+      Object min,
+      Object max)
+    {
+      Object msg   = _getRawNotInRangeMessageDetail();
+      Object label = ValidatorUtils.getComponentLabel(component);
+
+      Object[] params = {label, value, min, max};
+
+      return MessageFactory.getMessage(context, NOT_IN_RANGE_MESSAGE_ID,
+                                        msg, params, component);
+    }
+
+
+    
+    private Object _getRawNotInRangeMessageDetail()
+    {
+      return _facesBean.getRawProperty(_NOT_IN_RANGE_MESSAGE_DETAIL_KEY);
+    }
+
+
+    private FacesMessage _getMaximumMessage(
+      FacesContext context,
+      UIComponent component,
+      Object value,
+      Object max)
+    {
+
+      Object msg   = _getRawMaximumMessageDetail();
+      Object label = ValidatorUtils.getComponentLabel(component);
+
+      Object[] params = {label, value, max};
+
+      return MessageFactory.getMessage(context,
+                                       MAXIMUM_MESSAGE_ID,
+                                       msg,
+                                       params,
+                                       component);
+    }
+
+    private Object _getRawMaximumMessageDetail()
+    {
+      return _facesBean.getRawProperty(_MAXIMUM_MESSAGE_DETAIL_KEY);
+    }
+
+    private FacesMessage _getMinimumMessage(
+      FacesContext context,
+      UIComponent component,
+      Object value,
+      Object min)
+    {
+      Object msg      = _getRawMinimumMessageDetail();
+      Object label    = ValidatorUtils.getComponentLabel(component);
+
+      Object[] params = {label, value, min};
+
+      return MessageFactory.getMessage(context, MINIMUM_MESSAGE_ID,
+                                       msg, params, component);
+    }
+
+    private Object _getRawMinimumMessageDetail()
+    {
+      return _facesBean.getRawProperty(_MINIMUM_MESSAGE_DETAIL_KEY);
+    }
+
+  private static final FacesBean.Type _TYPE = new FacesBean.Type();
+
+  private static final PropertyKey _MINIMUM_KEY =
+    _TYPE.registerKey("minimum", Integer.class);
+
+  private static final PropertyKey _MAXIMUM_KEY =
+    _TYPE.registerKey("maximum", Integer.class);
+
+  private static final PropertyKey _MAXIMUM_MESSAGE_DETAIL_KEY =
+    _TYPE.registerKey("messageDetailMaximum", String.class);
+
+  private static final PropertyKey _MINIMUM_MESSAGE_DETAIL_KEY =
+    _TYPE.registerKey("messageDetailMinimum", String.class);
+
+  private static final PropertyKey _NOT_IN_RANGE_MESSAGE_DETAIL_KEY =
+    _TYPE.registerKey("messageDetailNotInRange", String.class);
+
+  private FacesBean _facesBean = ValidatorUtils.getFacesBean(_TYPE);
+
+  private boolean _transientValue = false;
+}
\ No newline at end of file

Added: incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/validator/LongRangeValidator.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/validator/LongRangeValidator.java?view=auto&rev=468175
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/validator/LongRangeValidator.java (added)
+++ incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/validator/LongRangeValidator.java Thu Oct 26 15:42:18 2006
@@ -0,0 +1,426 @@
+/*
+ * Copyright  2003-2006 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.myfaces.trinidad.validator;
+
+import javax.faces.application.FacesMessage;
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+import javax.faces.el.ValueBinding;
+
+import javax.faces.validator.Validator;
+import javax.faces.validator.ValidatorException;
+
+import org.apache.myfaces.trinidad.bean.FacesBean;
+import org.apache.myfaces.trinidad.bean.PropertyKey;
+import org.apache.myfaces.trinidad.util.ComponentUtils;
+import org.apache.myfaces.trinidad.util.IntegerUtils;
+import org.apache.myfaces.trinidad.util.MessageFactory;
+
+/**
+ * <p>Implementation for <code>java.lang.Long</code> values.</p>
+ *
+ * @author Apache Trinidad Podling
+ */
+public class LongRangeValidator extends javax.faces.validator.LongRangeValidator
+{
+  
+  public static final String VALIDATOR_ID = "org.apache.myfaces.trinidad.LongRange";
+
+  /**
+   * <p>The message identifier of the {@link javax.faces.application.FacesMessage}
+   * to be created if the maximum value check fails.  The message format
+   * string for this message may optionally include <code>{0}</code>,
+   * <code>{1}</code> and <code>{3}</code> placeholders,
+   * which will be replaced by user input, component label and configured
+   * maximum value.</p>
+   */
+  public static final String MAXIMUM_MESSAGE_ID =
+      "org.apache.myfaces.trinidad.validator.LongRangeValidator.MAXIMUM";
+
+  /**
+   * <p>The message identifier of the {@link javax.faces.application.FacesMessage}
+   * to be created if the minimum value check fails.  The message format
+   * string for this message may optionally include <code>{0}</code>,
+   * <code>{1}</code> and <code>{2}</code> placeholders, which will be replaced
+   * by user input, component label and configured minimum value.</p>
+   */
+  public static final String MINIMUM_MESSAGE_ID =
+      "org.apache.myfaces.trinidad.validator.LongRangeValidator.MINIMUM";
+
+
+  /**
+   * <p>The message identifier of the {@link javax.faces.application.FacesMessage}
+   * to be created if the maximum or minimum value check fails, and both
+   * the maximum and minimum values for this validator have been set.
+   * The message format string for this message may optionally include
+   * <code>{0}</code>, <code>{1}</code>, <code>{2}</code> and <code>{3}</code>
+   * placeholders, which will be replaced by user input, component label,
+   * configured minimum value and configured maximum value.</p>
+   */
+  public static final String NOT_IN_RANGE_MESSAGE_ID =
+      "org.apache.myfaces.trinidad.validator.LongRangeValidator.NOT_IN_RANGE";
+
+  
+  /**
+   * Construct a {@link Validator} with no preconfigured limits.
+   */
+  public LongRangeValidator() {
+    super();
+  }
+
+  /**
+   * Construct a {@link Validator} with the specified preconfigured
+   * limit.
+   *
+   * @param maximum Maximum value to allow
+   */
+  public LongRangeValidator(long maximum) {
+    super(new Long(maximum));
+  }
+
+  /**
+   * Construct a {@link Validator} with the specified preconfigured
+   * limits.
+   *
+   * @param maximum Maximum value to allow
+   * @param minimum Minimum value to allow
+   *
+   */
+  public LongRangeValidator(long maximum, long minimum) {
+    super(new Long(minimum), new Long(maximum));
+  }
+  
+  /**
+   * Return the maximum value to be enforced by this {@link
+   * Validator} or null if it has not been
+   * set.
+   */
+  public long getMaximum()
+  {
+    Object maxLong = _facesBean.getProperty(_MAXIMUM_KEY);
+    return ComponentUtils.resolveLong(maxLong);
+  }
+
+  /**
+   * Set the maximum value to be enforced by this {@link Validator}.
+   *
+   * @param maximum The new maximum value
+   *
+   */
+  public void setMaximum(long maximum)
+  {
+    _facesBean.setProperty(_MAXIMUM_KEY, new Long(maximum));
+  }
+
+
+  /**
+   * Return the minimum value to be enforced by this {@link
+   * Validator}, or null if it has not been
+   * set.
+   */
+  public long getMinimum()
+  {
+    Object minLong = _facesBean.getProperty(_MINIMUM_KEY);
+    return ComponentUtils.resolveLong(minLong);
+  }
+
+  /**
+   * Set the minimum value to be enforced by this {@link Validator}.
+   *
+   * @param minimum The new minimum value
+   *
+   */
+  public void setMinimum(long minimum)
+  {
+    _facesBean.setProperty(_MINIMUM_KEY, new Long(minimum));
+  }
+
+  /**
+   * <p>Custom error message to be used, for creating detail part of the
+   * {@link FacesMessage}, when input value exceeds the maximum value set.</p>
+   * Overrides detail message identified by message id {@link #MAXIMUM_MESSAGE_ID}
+   * @param maximumMessageDetail Custom error message.
+   */
+  public void setMessageDetailMaximum(String maximumMessageDetail)
+  {
+    _facesBean.setProperty(_MAXIMUM_MESSAGE_DETAIL_KEY, maximumMessageDetail);
+  }
+
+  /**
+   *  <p>Return custom detail error message that was set for creating {@link FacesMessage},
+   *  for cases where input value exceeds the <code>maximum</code> value set.</p>
+   * @return Custom error message.
+   * @see #setMaximumMessageDetail(String)
+   */
+  public String getMessageDetailMaximum()
+  {
+    Object maxMsgDet = _facesBean.getProperty(_MAXIMUM_MESSAGE_DETAIL_KEY);
+    return ComponentUtils.resolveString(maxMsgDet);
+  }
+
+  /**
+   * <p>Custom error message to be used, for creating detail part of the
+   * {@link FacesMessage}, when input value is less the set
+   * <code>minimum</code> value.</p>
+   * Overrides detail message identified by message id {@link #MINIMUM_MESSAGE_ID}
+   * @param minimumMessageDetail Custom error message.
+   */
+  public void setMessageDetailMinimum(String minimumMessageDetail)
+  {
+    _facesBean.setProperty(_MINIMUM_MESSAGE_DETAIL_KEY, minimumMessageDetail);
+  }
+
+  /**
+   * <p>Return custom detail error message that was set for creating {@link FacesMessage},
+   * for cases where, input value is less than the <code>minimum</code> value set.</p>
+   * @return Custom error message.
+   * @see #setMinimumMessageDetail(String)
+   */
+  public String getMessageDetailMinimum()
+  {
+    Object minMsgDet = _facesBean.getProperty(_MINIMUM_MESSAGE_DETAIL_KEY);
+    return ComponentUtils.resolveString(minMsgDet);
+  }
+
+  /**
+   * <p>Custom error message to be used, for creating detail part of the
+   * {@link FacesMessage}, when input value is not with in the range,
+   * when <code>minimum</code> and <code>maximum</code> is set.</p>
+   * Overrides detail message identified by message id {@link #NOT_IN_RANGE_MESSAGE_ID}
+   * @param notInRangeMessageDetail Custom error message.
+   */
+  public void setMessageDetailNotInRange(String notInRangeMessageDetail)
+  {
+    _facesBean.setProperty(_NOT_IN_RANGE_MESSAGE_DETAIL_KEY, notInRangeMessageDetail);
+  }
+
+  /**
+   * <p>Return custom detail error message that was set for creating {@link FacesMessage},
+   * for cases where, input value exceeds the <code>maximum</code> value and is
+   * less than the <code>minimum</code> value set.</p>
+   * @return Custom error message.
+   * @see #setNotInRangeMessageDetail(String)
+   */
+  public String getMessageDetailNotInRange()
+  {
+    Object notInRngMsg = _facesBean.getProperty(_NOT_IN_RANGE_MESSAGE_DETAIL_KEY);
+    return ComponentUtils.resolveString(notInRngMsg);
+  }
+
+  @Override
+  public void validate(
+    FacesContext context,
+    UIComponent component,
+    Object value
+    ) throws ValidatorException
+  {
+    try
+    {
+      super.validate(context, component, value);
+    }
+    catch (ValidatorException ve)
+    {
+         
+      if (value != null && value instanceof Number)
+      {
+        long longValue = ((Number)value).longValue(); 
+        
+        long min = getMinimum();
+        long max = getMaximum();
+        
+        if (longValue > max)
+        {
+          if (min == Long.MIN_VALUE)//the default...
+          {
+             throw new ValidatorException
+                        (_getNotInRangeMessage(context, component, value, IntegerUtils.getString(min), IntegerUtils.getString(max)));
+          }
+          else
+          {
+             throw new ValidatorException
+                        (_getMaximumMessage(context, component, value, IntegerUtils.getString(max)));
+          }
+        }
+
+        if (longValue < min)
+        {
+          if (max == Long.MAX_VALUE)//the default...
+          {
+            throw new ValidatorException
+                        (_getNotInRangeMessage(context, component, value, IntegerUtils.getString(min), IntegerUtils.getString(max)));
+          }
+          else
+          {
+            FacesMessage msg = _getMinimumMessage(context, component, value, IntegerUtils.getString(min));
+            throw new ValidatorException(msg);
+          }
+        }
+      }
+      else
+      {
+        throw ve;
+      }
+    }     
+  }
+
+  //  StateHolder Methods
+  public Object saveState(FacesContext context)
+  {
+    return _facesBean.saveState(context);
+  }
+
+
+  public void restoreState(FacesContext context, Object state)
+  {
+    _facesBean.restoreState(context, state);
+  }
+
+  /**
+   * <p>Set the {@link ValueBinding} used to calculate the value for the
+   * specified attribute if any.</p>
+   *
+   * @param name Name of the attribute for which to set a {@link ValueBinding}
+   * @param binding The {@link ValueBinding} to set, or <code>null</code>
+   *  to remove any currently set {@link ValueBinding}
+   *
+   * @exception NullPointerException if <code>name</code>
+   *  is <code>null</code>
+   * @exception IllegalArgumentException if <code>name</code> is not a valid
+   *            attribute of this validator
+   */
+  public void setValueBinding(String name, ValueBinding binding)
+  {
+    ValidatorUtils.setValueBinding(_facesBean, name, binding) ;
+  }
+
+  /**
+   * <p>Return the {@link ValueBinding} used to calculate the value for the
+   * specified attribute name, if any.</p>
+   *
+   * @param name Name of the attribute or property for which to retrieve a
+   *  {@link ValueBinding}
+   *
+   * @exception NullPointerException if <code>name</code>
+   *  is <code>null</code>
+   * @exception IllegalArgumentException if <code>name</code> is not a valid
+   * attribute of this validator
+   */
+  public ValueBinding getValueBinding(String name)
+  {
+    return ValidatorUtils.getValueBinding(_facesBean, name);
+  }
+  
+  public boolean isTransient()
+  {
+    return (_transientValue);
+  }
+
+
+  public void setTransient(boolean transientValue)
+  {
+    _transientValue = transientValue;
+  }
+
+  private FacesMessage _getNotInRangeMessage(
+      FacesContext context,
+      UIComponent component,
+      Object value,
+      Object min,
+      Object max)
+    {
+      Object msg   = _getRawNotInRangeMessageDetail();
+      Object label = ValidatorUtils.getComponentLabel(component);
+
+      Object[] params = {label, value, min, max};
+
+      return MessageFactory.getMessage(context, NOT_IN_RANGE_MESSAGE_ID,
+                                        msg, params, component);
+    }
+
+
+    
+    private Object _getRawNotInRangeMessageDetail()
+    {
+      return _facesBean.getRawProperty(_NOT_IN_RANGE_MESSAGE_DETAIL_KEY);
+    }
+
+
+    private FacesMessage _getMaximumMessage(
+      FacesContext context,
+      UIComponent component,
+      Object value,
+      Object max)
+    {
+
+      Object msg   = _getRawMaximumMessageDetail();
+      Object label = ValidatorUtils.getComponentLabel(component);
+
+      Object[] params = {label, value, max};
+
+      return MessageFactory.getMessage(context,
+                                       MAXIMUM_MESSAGE_ID,
+                                       msg,
+                                       params,
+                                       component);
+    }
+
+    private Object _getRawMaximumMessageDetail()
+    {
+      return _facesBean.getRawProperty(_MAXIMUM_MESSAGE_DETAIL_KEY);
+    }
+
+    private FacesMessage _getMinimumMessage(
+      FacesContext context,
+      UIComponent component,
+      Object value,
+      Object min)
+    {
+      Object msg      = _getRawMinimumMessageDetail();
+      Object label    = ValidatorUtils.getComponentLabel(component);
+
+      Object[] params = {label, value, min};
+
+      return MessageFactory.getMessage(context, MINIMUM_MESSAGE_ID,
+                                       msg, params, component);
+    }
+
+    private Object _getRawMinimumMessageDetail()
+    {
+      return _facesBean.getRawProperty(_MINIMUM_MESSAGE_DETAIL_KEY);
+    }
+
+  private static final FacesBean.Type _TYPE = new FacesBean.Type();
+
+  private static final PropertyKey _MINIMUM_KEY =
+    _TYPE.registerKey("minimum", Long.class, Long.MIN_VALUE);
+
+  private static final PropertyKey _MAXIMUM_KEY =
+    _TYPE.registerKey("maximum", Long.class, Long.MAX_VALUE );
+
+  private static final PropertyKey _MAXIMUM_MESSAGE_DETAIL_KEY =
+    _TYPE.registerKey("messageDetailMaximum", String.class);
+
+  private static final PropertyKey _MINIMUM_MESSAGE_DETAIL_KEY =
+    _TYPE.registerKey("messageDetailMinimum", String.class);
+
+  private static final PropertyKey _NOT_IN_RANGE_MESSAGE_DETAIL_KEY =
+    _TYPE.registerKey("messageDetailNotInRange", String.class);
+
+  private FacesBean _facesBean = ValidatorUtils.getFacesBean(_TYPE);
+
+  private boolean _transientValue = false;
+}
\ No newline at end of file



Mime
View raw message