IDEMPIERE-5588 - Multiselect Chosenbox Editor Doesn't Initialise its List when Tab First Opened (#1744)

* IDEMPIERE-5588 - Multiselect Chosenbox Editor Doesn't Initialise its List when Tab First Opened

* IDEMPIERE-5588 - pr1744 patch
This commit is contained in:
Peter Takács 2023-03-22 09:52:28 +01:00 committed by GitHub
parent 51ceaacb43
commit bf7c9792af
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 29 additions and 21 deletions

View File

@ -597,15 +597,21 @@ public class MLookupFactory
retValue.DisplayColumn = lookupDisplayColumn;
retValue.InfoWindowId = infoWindowId;
retValue.QueryDirect = MRole.getDefault().addAccessSQL(directQuery, TableName, true, false);
List<String> lookupDisplayColumns = new ArrayList<String>();
if (isValueDisplayed)
lookupDisplayColumns.add("Value");
lookupDisplayColumns.add(lookupDisplayColumn != null ? lookupDisplayColumn : DisplayColumn);
s_cacheRefTable.put(key.toString(), retValue.cloneIt());
retValue.lookupDisplayColumns = lookupDisplayColumns;
return retValue;
} // getLookup_Table
List<String> lookupDisplayColumns = new ArrayList<String>();
if (isValueDisplayed)
lookupDisplayColumns.add("Value");
lookupDisplayColumns.add(lookupDisplayColumn != null ? lookupDisplayColumn : DisplayColumn);
retValue.lookupDisplayColumns = lookupDisplayColumns;
if(list != null) {
retValue.lookupDisplayColumnNames = new ArrayList<>();
for (LookupDisplayColumn ldc : list) {
retValue.lookupDisplayColumnNames.add(ldc.ColumnName);
}
}
s_cacheRefTable.put(key.toString(), retValue.cloneIt());
return retValue;
} // getLookup_Table
/**
* Get Embedded Lookup SQL for Table Lookup
* @param language report language

View File

@ -17,12 +17,12 @@
package org.compiere.model;
import java.io.Serializable;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.List;
import java.util.Properties;
import java.util.logging.Level;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.List;
import java.util.Properties;
import java.util.logging.Level;
import org.compiere.util.CLogger;
import org.compiere.util.DB;
@ -209,11 +209,13 @@ public class MLookupInfo implements Serializable, Cloneable
public String DisplayColumn;
public int InfoWindowId;
public List<String> lookupDisplayColumns = null;
/**
* String representation
public List<String> lookupDisplayColumns = null;
public List<String> lookupDisplayColumnNames = null;
/**
* String representation
* @return info
*/
public String toString()

View File

@ -98,7 +98,7 @@ public class InfoListSubModel implements ListSubModel<ValueNamePair> {
.append(nRows);
if (lookup instanceof MLookup) {
MLookup mlookup = (MLookup) lookup;
List<String> displayColumns = mlookup.getLookupInfo().lookupDisplayColumns;
List<String> displayColumns = mlookup.getLookupInfo().lookupDisplayColumnNames;
if (displayColumns != null && displayColumns.size() > 0) {
queryBuilder.append(",")
.append("searchcolumn:")