incubator-adffaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mat...@apache.org
Subject svn commit: r488614 - /incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/javascript/META-INF/adf/jsLibs/CharSets.js
Date Tue, 19 Dec 2006 10:34:47 GMT
Author: matzew
Date: Tue Dec 19 02:34:47 2006
New Revision: 488614

URL: http://svn.apache.org/viewvc?view=rev&rev=488614
Log:
some js tuning for bytelength validator

Modified:
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/javascript/META-INF/adf/jsLibs/CharSets.js

Modified: incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/javascript/META-INF/adf/jsLibs/CharSets.js
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/javascript/META-INF/adf/jsLibs/CharSets.js?view=diff&rev=488614&r1=488613&r2=488614
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/javascript/META-INF/adf/jsLibs/CharSets.js
(original)
+++ incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/javascript/META-INF/adf/jsLibs/CharSets.js
Tue Dec 19 02:34:47 2006
@@ -14,14 +14,14 @@
  * limitations under the License.
  */
 
+var _byteLenKey = "org.apache.myfaces.trinidad.validator.ByteLengthValidator.MAXIMUM";
+
 function TrByteLengthValidator(
   length,
-  summary,
   detail
   )
 {
   this._length   = length;
-  this._summary = summary;
   this._detail = detail;
   this._class    = "TrByteLengthValidator";
 }
@@ -30,12 +30,11 @@
 
 function CjkFormat(
   length,
-  summary,
   detail
   )
 {
   this._base = TrByteLengthValidator;
-  this._base(length, summary,detail);
+  this._base(length, detail);
   this._class = "CjkFormat";
   
 }
@@ -70,18 +69,19 @@
     if (length < 0)
     {
       var facesMessage;
-      if(this._summary == undefined)
+      if(this._detail == undefined)
       {
-        facesMessage = _createFacesMessage( "org.apache.myfaces.trinidad.validator.ByteLengthValidator.MAXIMUM",
-                                                label,
-                                                parseString);
+        facesMessage = _createFacesMessage(_byteLenKey,
+                                           label,
+                                           parseString);
       }
       else
       {
-        facesMessage = _createCustomFacesMessage(this._summary,
-                                            this._detail,
-                                            label,
-                                            parseString);
+        facesMessage = _createCustomFacesMessage(
+                                           TrMessageFactory.getSummaryString(_byteLenKey),
+                                           this._detail,
+                                           label,
+                                           parseString);
       }
       throw new TrValidatorException(facesMessage);     
     }
@@ -97,12 +97,11 @@
 
 function Utf8Format(
   length,
-  summary,
   detail
   )
 {
   this._base = TrByteLengthValidator;
-  this._base(length, summary,detail);
+  this._base(length, detail);
   this._class = "Utf8Format";
 }
 
@@ -145,15 +144,16 @@
     if (length < 0)
     {
       var facesMessage;
-      if(this._summary == undefined)
+      if(this._detail == undefined)
       {
-        facesMessage = _createFacesMessage( "org.apache.myfaces.trinidad.validator.ByteLengthValidator.MAXIMUM",
-                                                label,
-                                                parseString);
+        facesMessage = _createFacesMessage(_byteLenKey,
+                                           label,
+                                           parseString);
       }
       else
       {
-        facesMessage = _createCustomFacesMessage(this._summary,
+        facesMessage = _createCustomFacesMessage(
+                                            TrMessageFactory.getSummaryString(_byteLenKey),
                                             this._detail,
                                             label,
                                             parseString);
@@ -169,12 +169,11 @@
 
 function SBFormat(
   length,
-  summary,
   detail
   )
 {
   this._base = TrByteLengthValidator;
-  this._base(length, summary,detail);
+  this._base(length, detail);
   this._class = "SBFormat";
   
 }
@@ -201,15 +200,16 @@
   if (this._length < parseString.length)
   {
       var facesMessage;
-      if(this._summary == undefined)
+      if(this._detail == undefined)
       {
-        facesMessage = _createFacesMessage( "org.apache.myfaces.trinidad.validator.ByteLengthValidator.MAXIMUM",
-                                                label,
-                                                parseString);
+        facesMessage = _createFacesMessage(_byteLenKey,
+                                           label,
+                                           parseString);
       }
       else
       {
-        facesMessage = _createCustomFacesMessage(this._summary,
+        facesMessage = _createCustomFacesMessage(
+                                            TrMessageFactory.getSummaryString(_byteLenKey),
                                             this._detail,
                                             label,
                                             parseString);



Mime
View raw message