Fix [ adempiere-ZK Web Client-2561593 ] Multi-tenant problem with webui

https://sourceforge.net/tracker2/?func=detail&atid=955896&aid=2561593&group_id=176962
This commit is contained in:
Carlos Ruiz 2009-02-04 19:03:17 +00:00
parent 73645ec8e5
commit 8ec88430c7
1 changed files with 6 additions and 4 deletions

View File

@ -1,5 +1,5 @@
/****************************************************************************** /******************************************************************************
* Product: Adempiere ERP & CRM Smart Business Solution * * Product: Adempiere ERP & CRM Smart Business Solution *
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. * * Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
* This program is free software; you can redistribute it and/or modify it * * This program is free software; you can redistribute it and/or modify it *
* under the terms version 2 of the GNU General Public License as published * * under the terms version 2 of the GNU General Public License as published *
@ -42,8 +42,10 @@ import org.compiere.util.Language;
* <li>BF [ 1714261 ] MLookupFactory: TableDirEmbed -> TableEmbed not supported * <li>BF [ 1714261 ] MLookupFactory: TableDirEmbed -> TableEmbed not supported
* <li>BF [ 1672820 ] Sorting should be language-sensitive * <li>BF [ 1672820 ] Sorting should be language-sensitive
* <li>BF [ 1739530 ] getLookup_TableDirEmbed error when BaseColumn is sql query * <li>BF [ 1739530 ] getLookup_TableDirEmbed error when BaseColumn is sql query
* <li>BF [ 1739544 ] getLookup_TableEmbed error for self referecing references * <li>BF [ 1739544 ] getLookup_TableEmbed error for self referencing references
* <li>BF [ 1817768 ] Isolate hardcoded table direct columns * <li>BF [ 1817768 ] Isolate hardcoded table direct columns
* @author Carlos Ruiz, GlobalQSS
* <li>BF [ 2561593 ] Multi-tenant problem with webui
*/ */
public class MLookupFactory public class MLookupFactory
{ {
@ -341,7 +343,7 @@ public class MLookupFactory
int WindowNo, int AD_Reference_Value_ID) int WindowNo, int AD_Reference_Value_ID)
{ {
// Try cache - assume no language change // Try cache - assume no language change
String key = String.valueOf(AD_Reference_Value_ID); String key = Env.getAD_Client_ID(ctx) + "|" + String.valueOf(AD_Reference_Value_ID);
MLookupInfo retValue = (MLookupInfo)s_cacheRefTable.get(key); MLookupInfo retValue = (MLookupInfo)s_cacheRefTable.get(key);
if (retValue != null) if (retValue != null)
{ {
@ -611,7 +613,7 @@ public class MLookupFactory
int ZoomWindowPO = 0; int ZoomWindowPO = 0;
//try cache //try cache
String cacheKey = TableName + "." + KeyColumn; String cacheKey = Env.getAD_Client_ID(ctx) + "|" + TableName + "." + KeyColumn;
if (s_cacheRefTable.containsKey(cacheKey)) if (s_cacheRefTable.containsKey(cacheKey))
return s_cacheRefTable.get(cacheKey).cloneIt(); return s_cacheRefTable.get(cacheKey).cloneIt();