Skip to content

Commit

Permalink
#633-webui in webui column lookups the tablename shall be null
Browse files Browse the repository at this point in the history
* Repaired after Teo's review
#633
  • Loading branch information
metas-rc committed Oct 24, 2017
1 parent d626539 commit fa9e8ea
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public LookupValuesList getShipmentScheduleValues(final LookupDataSourceContext
private static final LookupDataSource createShipmentScheduleDataSource(final int huId)
{
final LookupDescriptor lookupDescriptor = SqlLookupDescriptor.builder()
.setCtxTableName(I_M_ShipmentSchedule.Table_Name)
.setCtxTableName(null)
.setCtxColumnName(I_M_ShipmentSchedule.COLUMNNAME_M_ShipmentSchedule_ID)
.setDisplayType(DisplayType.Search)
.addValidationRule(createShipmentSchedulesValidationRule(huId))
Expand Down Expand Up @@ -132,7 +132,7 @@ public LookupValuesList getPickingSlotValues(final LookupDataSourceContext conte
private static final LookupDataSource createPickingSlotDataSource()
{
final LookupDescriptor lookupDescriptor = SqlLookupDescriptor.builder()
.setCtxTableName(I_M_PickingSlot.Table_Name)
.setCtxTableName(null)
.setCtxColumnName(I_M_PickingSlot.COLUMNNAME_M_PickingSlot_ID)
.setDisplayType(DisplayType.Search)
.buildForDefaultScope();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public class WebuiMailRepository
public WebuiMailRepository()
{
final LookupDescriptor emailToLookupDescriptor = SqlLookupDescriptor.builder()
.setCtxTableName(I_AD_User.Table_Name)
.setCtxTableName(null)
.setCtxColumnName(org.compiere.model.I_AD_User.COLUMNNAME_AD_User_ID)
.setDisplayType(DisplayType.Search)
.setWidgetType(DocumentFieldWidgetType.Lookup)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,15 +66,15 @@ public PackageableViewRepository()
// and also to allow it to be unit-tested (when the lookups are not part of the test), I use those suppliers.

orderLookup = Suppliers.memoize(() -> LookupDataSourceFactory.instance.getLookupDataSource(SqlLookupDescriptor.builder()
.setCtxTableName(I_M_Packageable_V.Table_Name)
.setCtxTableName(null)
.setCtxColumnName(I_M_Packageable_V.COLUMNNAME_C_Order_ID)
.setDisplayType(DisplayType.Search)
.setWidgetType(DocumentFieldWidgetType.Lookup)
.buildProvider()
.provideForScope(LookupScope.DocumentField)));

productLookup = Suppliers.memoize(() -> LookupDataSourceFactory.instance.getLookupDataSource(SqlLookupDescriptor.builder()
.setCtxTableName(I_M_Packageable_V.Table_Name)
.setCtxTableName(null)
.setCtxColumnName(I_M_Packageable_V.COLUMNNAME_M_Product_ID)
.setDisplayType(DisplayType.Search)
.setWidgetType(DocumentFieldWidgetType.Lookup)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ private static Supplier<LookupDataSource> createWarehouseLookup()
{
return Suppliers.memoize(() -> LookupDataSourceFactory.instance
.getLookupDataSource(SqlLookupDescriptor.builder()
.setCtxTableName(I_M_PickingSlot.Table_Name)
.setCtxTableName(null)
.setCtxColumnName(I_M_PickingSlot.COLUMNNAME_M_Warehouse_ID)
.setDisplayType(DisplayType.Search)
.setWidgetType(DocumentFieldWidgetType.Lookup)
Expand All @@ -100,7 +100,7 @@ private static Supplier<LookupDataSource> createBPartnerLookup()
{
return Suppliers.memoize(() -> LookupDataSourceFactory.instance
.getLookupDataSource(SqlLookupDescriptor.builder()
.setCtxTableName(I_M_PickingSlot.Table_Name)
.setCtxTableName(null)
.setCtxColumnName(I_M_PickingSlot.COLUMNNAME_C_BPartner_ID)
.setDisplayType(DisplayType.Search)
.setWidgetType(DocumentFieldWidgetType.Lookup)
Expand All @@ -112,7 +112,7 @@ private static Supplier<LookupDataSource> createBPartnerLocationLookup()
{
return Suppliers.memoize(() -> LookupDataSourceFactory.instance
.getLookupDataSource(SqlLookupDescriptor.builder()
.setCtxTableName(I_M_PickingSlot.Table_Name)
.setCtxTableName(null)
.setCtxColumnName(I_M_PickingSlot.COLUMNNAME_C_BPartner_Location_ID)
.setDisplayType(DisplayType.Search)
.setWidgetType(DocumentFieldWidgetType.Lookup)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ private final void createAndAddDocumentField(final DocumentEntityDescriptor.Buil
final String ctxTableName = Services.get(IADTableDAO.class).retrieveTableName(gridFieldVO.getAD_Table_ID());

lookupDescriptorProvider = SqlLookupDescriptor.builder()
.setCtxTableName(ctxTableName)
.setCtxTableName(null)
.setCtxColumnName(sqlColumnName)
.setWidgetType(widgetType)
.setDisplayType(displayType)
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(sqlTableName)
.setCtxTableName(null)
.setCtxColumnName(sqlColumnName)
.setDisplayType(displayType)
.setAD_Reference_Value_ID(AD_Reference_Value_ID)
Expand Down

0 comments on commit fa9e8ea

Please sign in to comment.