Skip to content

Commit

Permalink
#633-webui bug-repair
Browse files Browse the repository at this point in the history
  • Loading branch information
metas-rc committed Oct 24, 2017
1 parent e09be98 commit 1747d05
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import org.adempiere.ad.expression.api.ConstantLogicExpression;
import org.adempiere.ad.expression.api.IExpression;
import org.adempiere.ad.expression.api.ILogicExpression;
import org.adempiere.ad.table.api.IADTableDAO;
import org.adempiere.model.InterfaceWrapperHelper;
import org.adempiere.util.Check;
import org.adempiere.util.Services;
Expand Down Expand Up @@ -274,10 +275,13 @@ private final void createAndAddDocumentField(final DocumentEntityDescriptor.Buil
widgetType = DescriptorsFactoryHelper.extractWidgetType(sqlColumnName, displayType);

alwaysUpdateable = extractAlwaysUpdateable(gridFieldVO);

final String ctxTableName = Services.get(IADTableDAO.class).retrieveTableName(gridFieldVO.getAD_Table_ID());

lookupDescriptorProvider = SqlLookupDescriptor.builder()
.setCtxTableName(null)
.setCtxTableName(ctxTableName)
.setCtxColumnName(sqlColumnName)

.setWidgetType(widgetType)
.setDisplayType(displayType)
.setAD_Reference_Value_ID(gridFieldVO.getAD_Reference_Value_ID())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ private static LookupDescriptorProvider buildProvider(
|| DisplayType.Button == displayType && AD_Reference_Value_ID > 0)
{
return LookupDescriptorProvider.fromMemoizingFunction(scope -> SqlLookupDescriptor.builder()
.setCtxTableName(null)
.setCtxTableName(sqlTableName)
.setCtxColumnName(sqlColumnName)
.setDisplayType(displayType)
.setAD_Reference_Value_ID(AD_Reference_Value_ID)
Expand Down

0 comments on commit 1747d05

Please sign in to comment.