Skip to content

Commit

Permalink
#633-webui do not propagate a context table name unless sure it's the…
Browse files Browse the repository at this point in the history
… one that is needed.

* I put null instead of the tablename
metasfresh/metasfresh-webui-api-legacy#633
  • Loading branch information
metas-rc committed Oct 24, 2017
1 parent 1469589 commit 615b548
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 38 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ else if (DisplayType.isLookup(column.getAD_Reference_ID ()))
{
MLookup lookup = MLookupFactory.get (Env.getCtx(), 0,
AD_Column_ID, column.getAD_Reference_ID(),
column.get_TableName(),
null, //tablename
column.getColumnName(),
column.getAD_Reference_Value_ID(),
column.isParent(), IValidationRule.AD_Val_Rule_ID_Null);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,9 @@
import org.compiere.util.Env;
import org.compiere.util.NamePair;
import org.slf4j.Logger;
import org.slf4j.Logger;

import de.metas.i18n.IMsgBL;
import de.metas.logging.LogManager;
import de.metas.logging.LogManager;

/**
* Record Info (Who) With Change History
Expand Down Expand Up @@ -381,7 +379,7 @@ else if (DisplayType.isLookup(column.getAD_Reference_ID()))
final int windowNo = Env.getWindowNo(getParent()); // metas: 03090: use WindowNo when creating the lookup
MLookup lookup = MLookupFactory.get (Env.getCtx(), windowNo,
AD_Column_ID, column.getAD_Reference_ID(),
column.get_TableName(),
null, //ctx tablename
column.getColumnName(),
column.getAD_Reference_Value_ID(),
column.isParent(), IValidationRule.AD_Val_Rule_ID_Null);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ private void jbInit() throws Exception
getWindowNo(),
0, // Column_ID
DisplayType.TableDir,
I_C_BPartner.Table_Name,
null, // tablename
I_C_BPartner.COLUMNNAME_C_BPartner_ID,
0, // AD_Reference_Value_ID,
false, // IsParent,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ private void fillPicks() throws Exception
, m_WindowNo
, MColumn.getColumn_ID(MDDOrder.Table_Name,MDDOrder.COLUMNNAME_DD_Order_ID)
, DisplayType.Search
, MDDOrder.Table_Name
, null // tablename
, MDDOrder.COLUMNNAME_DD_Order_ID
, 0
, false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ public ReadPaymentDocumentPanel(final Window window, final int AD_Org_ID)
WindowNo,
bpartnerColumn.getAD_Column_ID(),
DisplayType.Search,
I_C_BPartner.Table_Name,
null, //tablename
I_C_BPartner.COLUMNNAME_C_BPartner_ID,
138, // C_BPartner (trx)
false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ public SelectPaySelectionDialog(final Frame owner,
windowNo,
paySelectionColumn.getAD_Column_ID(),
DisplayType.Search,
I_C_PaySelection.Table_Name,
null, //tablename
paySelectionColumnName,
paySelectionColumn.getAD_Reference_Value_ID(),
false, // IsParent,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,7 @@ public static Lookup getAllLookup(final int windowNo)
windowNo,
0, // Column_ID
DisplayType.TableDir,
I_AD_BoilerPlate.Table_Name,
null, // tablename
I_AD_BoilerPlate.COLUMNNAME_AD_BoilerPlate_ID,
0, // AD_Reference_Value_ID,
false, // IsParent,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,36 +1,9 @@
package de.metas.adempiere.service.impl;

/*
* #%L
* de.metas.swat.base
* %%
* Copyright (C) 2015 metas GmbH
* %%
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as
* published by the Free Software Foundation, either version 2 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public
* License along with this program. If not, see
* <http://www.gnu.org/licenses/gpl-2.0.html>.
* #L%
*/

import static org.adempiere.model.I_M_PackagingContainer.COLUMNNAME_M_PackagingContainer_ID;
import static org.adempiere.model.I_M_PackagingContainer.Table_ID;

import java.util.Properties;

import org.adempiere.ad.table.api.IADTableDAO;
import org.adempiere.ad.validationRule.IValidationRule;
import org.adempiere.exceptions.AdempiereException;
import org.adempiere.model.InterfaceWrapperHelper;
import org.adempiere.service.ISysConfigBL;
import org.adempiere.util.Services;
import org.compiere.model.I_AD_Column;
Expand Down Expand Up @@ -81,7 +54,7 @@ private static Lookup createLookup(final I_AD_Column c)
-1, // WindowNo
0, // Column_ID,
DisplayType.Table, // AD_Reference_ID,
Services.get(IADTableDAO.class).retrieveTableName(c.getAD_Table_ID()),
null, //ctx tablename
c.getColumnName(), // ColumnName
c.getAD_Reference_Value_ID(), // AD_Reference_Value_ID,
false, // IsParent,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ private void dynInit() throws Exception {
I_C_OrderLine.COLUMNNAME_M_Product_ID);
fProductLookup = MLookupFactory.get(Env.getCtx(), windowNo, c
.getAD_Column_ID(), DisplayType.Search,
c.get_TableName(),
null, //ctx tablename
c.getColumnName(),
c.getAD_Reference_Value_ID(), c.isParent(),
c.getAD_Val_Rule_ID());
Expand Down

0 comments on commit 615b548

Please sign in to comment.