Author: jleroux
Date: Mon Mar 31 13:33:40 2008
New Revision: 643136
URL:
http://svn.apache.org/viewvc?rev=643136&view=revLog:
Applied fix from trunk for revision: 643134
Modified:
ofbiz/branches/release4.0/framework/webtools/webapp/webtools/WEB-INF/actions/entity/FindGeneric.bsh
Modified: ofbiz/branches/release4.0/framework/webtools/webapp/webtools/WEB-INF/actions/entity/FindGeneric.bsh
URL:
http://svn.apache.org/viewvc/ofbiz/branches/release4.0/framework/webtools/webapp/webtools/WEB-INF/actions/entity/FindGeneric.bsh?rev=643136&r1=643135&r2=643136&view=diff==============================================================================
--- ofbiz/branches/release4.0/framework/webtools/webapp/webtools/WEB-INF/actions/entity/FindGeneric.bsh (original)
+++ ofbiz/branches/release4.0/framework/webtools/webapp/webtools/WEB-INF/actions/entity/FindGeneric.bsh Mon Mar 31 13:33:40 2008
@@ -72,8 +72,13 @@
if (fval != null) {
if (fval.length() > 0) {
curFindString = curFindString + "&" + field.getName() + "=" + fval;
- findByEntity.setString(field.getName(), fval);
- }
+ try {
+ findByEntity.setString(field.getName(), fval);
+ } catch (NumberFormatException nfe) {
+ Debug.logError(nfe, "Caught an exception : "+nfe.toString(), "FindGeneric.bsh");
+ request.setAttribute("_ERROR_MESSAGE_", "Entered value is non-numeric for numeric field: "+field.getName());
+ }
+ }
}
}
curFindString = UtilFormatOut.encodeQuery(curFindString);