incubator-adffaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mat...@apache.org
Subject svn commit: r488570 - /incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/javascript/META-INF/adf/jsLibs/CoreFormat.js
Date Tue, 19 Dec 2006 07:45:09 GMT
Author: matzew
Date: Mon Dec 18 23:45:07 2006
New Revision: 488570

URL: http://svn.apache.org/viewvc?view=rev&rev=488570
Log:
minor performance for TrRegExpValidator. No need to send down the summary

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

Modified: incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/javascript/META-INF/adf/jsLibs/CoreFormat.js
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/javascript/META-INF/adf/jsLibs/CoreFormat.js?view=diff&rev=488570&r1=488569&r2=488570
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/javascript/META-INF/adf/jsLibs/CoreFormat.js
(original)
+++ incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/javascript/META-INF/adf/jsLibs/CoreFormat.js
Mon Dec 18 23:45:07 2006
@@ -697,12 +697,10 @@
 
 function TrRegExpValidator(
   pattern,
-  summary,
   detail
   )
 {  
   this._pattern  = pattern;
-  this._summary = summary;
   this._detail = detail;
   this._class = "TrRegExpValidator";
 }
@@ -737,21 +735,23 @@
   }
   else
   {
+  	var key = "org.apache.myfaces.trinidad.validator.RegExpValidator.NO_MATCH";
     var facesMessage;
-    if(this._summary == undefined)
+    if(this._detail)
     {
-      facesMessage = _createFacesMessage( "org.apache.myfaces.trinidad.validator.RegExpValidator.NO_MATCH",
-                                              label,
-                                              parseString,
-                                              this._pattern);                           
              
+      facesMessage = _createCustomFacesMessage(
+                                         TrMessageFactory.getSummaryString(key),
+                                         this._detail,
+                                         label,
+                                         parseString,
+                                         this._pattern);                                
         
     }
     else
     {
-      facesMessage = _createCustomFacesMessage(this._summary,
-                                          this._detail,
-                                          label,
-                                          parseString,
-                                          this._pattern);                               
          
+      facesMessage = _createFacesMessage(key,
+                                         label,
+                                         parseString,
+                                         this._pattern);                                
         
     }
     throw new TrValidatorException(facesMessage); 
   }



Mime
View raw message