From 26b43460539a1c5e27c9ddd1a9baa8c23de02a7e Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Wed, 25 Apr 2007 23:23:48 +0000 Subject: [PATCH] [ 1707009 ] Produc Category Tree --- base/src/org/compiere/model/CalloutProductCategory.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/base/src/org/compiere/model/CalloutProductCategory.java b/base/src/org/compiere/model/CalloutProductCategory.java index f72cbfcf23..20b90d3a0e 100644 --- a/base/src/org/compiere/model/CalloutProductCategory.java +++ b/base/src/org/compiere/model/CalloutProductCategory.java @@ -25,6 +25,7 @@ import java.util.Vector; import java.util.logging.Level; import org.compiere.util.DB; +import org.compiere.util.Env; /** @@ -45,7 +46,7 @@ public class CalloutProductCategory extends CalloutEngine * @param value New Value * @return "" or error message */ - public String testForLoop (Properties ctx, int WindowNo, GridTab mTab, GridField mField, Object value) + public String testForLoop (Properties ctx, int WindowNo, GridTab mTab, GridField mField, Object value, Object oldValue) { if (isCalloutActive() || value == null) return ""; @@ -69,8 +70,8 @@ public class CalloutProductCategory extends CalloutEngine rs.close(); stmt.close(); if(hasLoop(newParentCategoryId, categories, productCategoryId)) { - mField.setValue(0, false); - + mTab.setValue("M_Product_Category_Parent_ID", oldValue); + setCalloutActive(false); return "ProductCategoryLoopDetected"; }