Author: jleroux
Date: Sat Jul 12 13:11:46 2008 New Revision: 676230 URL: http://svn.apache.org/viewvc?rev=676230&view=rev Log: Applied fix from trunk for revision: 676227 Modified: ofbiz/branches/release4.0/ (props changed) ofbiz/branches/release4.0/applications/product/script/org/ofbiz/product/feature/ProductFeatureServices.xml ofbiz/branches/release4.0/framework/base/src/base/org/ofbiz/base/util/UtilValidate.java Propchange: ofbiz/branches/release4.0/ ------------------------------------------------------------------------------ --- svn:mergeinfo (original) +++ svn:mergeinfo Sat Jul 12 13:11:46 2008 @@ -1 +1 @@ -/ofbiz/trunk:674173,676162 +/ofbiz/trunk:674173,676162,676227 Modified: ofbiz/branches/release4.0/applications/product/script/org/ofbiz/product/feature/ProductFeatureServices.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/release4.0/applications/product/script/org/ofbiz/product/feature/ProductFeatureServices.xml?rev=676230&r1=676229&r2=676230&view=diff ============================================================================== --- ofbiz/branches/release4.0/applications/product/script/org/ofbiz/product/feature/ProductFeatureServices.xml (original) +++ ofbiz/branches/release4.0/applications/product/script/org/ofbiz/product/feature/ProductFeatureServices.xml Sat Jul 12 13:11:46 2008 @@ -271,19 +271,7 @@ </then> </if> <check-errors/> - - <if> - <condition> - <if-validate-method field-name="parameters.productFeatureTypeId" method="isJavaScriptReservedWord"></if-validate-method> - </condition> - <then> - <add-error> - <fail-property resource="ProductErrorUiLabels" property="ProductFeatureTypeIdMustNotBeResevedWord"/> - </add-error> - </then> - </if> - <check-errors/> - + <make-value value-name="newEntity" entity-name="ProductFeatureType"/> <set-nonpk-fields map-name="parameters" value-name="newEntity"/> <set-pk-fields map-name="parameters" value-name="newEntity"/> Modified: ofbiz/branches/release4.0/framework/base/src/base/org/ofbiz/base/util/UtilValidate.java URL: http://svn.apache.org/viewvc/ofbiz/branches/release4.0/framework/base/src/base/org/ofbiz/base/util/UtilValidate.java?rev=676230&r1=676229&r2=676230&view=diff ============================================================================== --- ofbiz/branches/release4.0/framework/base/src/base/org/ofbiz/base/util/UtilValidate.java (original) +++ ofbiz/branches/release4.0/framework/base/src/base/org/ofbiz/base/util/UtilValidate.java Sat Jul 12 13:11:46 2008 @@ -602,30 +602,7 @@ // All characters are numbers or letters. return true; } - - public static boolean isJavaScriptReservedWord(String s) { - String[] javaScriptReservedWord = {"abstract", "alert", "arguments", "Array", "blur", "boolean", "Boolean", "break", "byte", - "callee", "caller", "captureEventscase", "catch", "char", "class", "clearInterval", "clearTimeout", "close", "closed", - "confirm", "const", "constructor", "continue", "Date", "debugger", "default", "defaultStatusdelete", "do", "document", - "double", "else", "enum", "escape", "eval", "export", "extends", "false", "final", "finally", "find", "float", "for", - "focus", "frames", "function", "Function", "goto", "history", "home", "if", "implements", "import", "in", "Infinity", - "innerHeight", "innerWidth", "instanceof", "int", "interface", "isFinite", "isNaN", "java", "length", "location", - "locationbar", "long", "Math", "menubar", "moveBy", "moveTo", "name", "NaN", "native", "netscape", "new", "null", - "Number", "Object", "open", "opener", "outerHeight", "outerWidth", "package", "Packages", "pageXOffset", "pageYOffset", - "parent", "parseFloat", "parseInt", "personalbar", "print", "private", "prompt", "protected", "prototype", "public", - "RegExp", "releaseEventsresizeBy", "resizeTo", "return", "routeEvent", "scroll", "scrollbars", "scrollBy", "scrollTo", - "self", "setInterval", "setTimeout", "short", "static", "status", "statusbar", "stop", "String", "super", "switch", - "synchronized", "this", "throw", "throws", "toolbar", "top", "toString", "transient", "true", "try", "typeof", "unescape", - "unwatch", "valueOf", "var", "void", "watch", "while", "with", "window"}; - for (String reservedWord : javaScriptReservedWord) { - if (reservedWord.equals(s)) { - return true; - } - } - return false; - } - - + /* ================== METHODS TO CHECK VARIOUS FIELDS. ==================== */ /** isSSN returns true if string s is a valid U.S. Social Security Number. Must be 9 digits. */ |
Free forum by Nabble | Edit this page |