IDEMPIERE-2751:potential wrong status of info window

refactory, fix pass wrong parameter
This commit is contained in:
hieplq 2015-08-04 02:49:44 +08:00
parent bdbed7806e
commit 41efd70ce9
2 changed files with 8 additions and 12 deletions

View File

@ -469,10 +469,9 @@ public class InfoWindow extends InfoPanel implements ValueChangeListener, EventL
}
@Override
protected MInfoWindow loadInfoWindowData (int ADInfoWindowID){
MInfoWindow infoWindow = null;
if (AD_InfoWindow_ID > 0) {
infoWindow = new MInfoWindow(Env.getCtx(), AD_InfoWindow_ID, null);
protected void loadInfoWindowData (){
if (m_infoWindowID > 0) {
infoWindow = new MInfoWindow(Env.getCtx(), m_infoWindowID, null);
}else {
infoWindow = MInfoWindow.get(p_tableName, (String)null);
}
@ -485,8 +484,6 @@ public class InfoWindow extends InfoPanel implements ValueChangeListener, EventL
throw new IllegalArgumentException("AD_InfoWindow.TableName <> TableName argument. ("+tableName + " <> " + p_tableName+")");
}
}
return infoWindow;
}
protected boolean loadInfoDefinition() {
@ -1868,7 +1865,7 @@ public class InfoWindow extends InfoPanel implements ValueChangeListener, EventL
*/
protected GridField getGridField(MInfoColumn infoColumn){
String columnName = infoColumn.getColumnName();
GridFieldVO vo = GridFieldVO.createParameter(infoContext, p_WindowNo, AEnv.getADWindowID(p_WindowNo), AD_InfoWindow_ID, 0,
GridFieldVO vo = GridFieldVO.createParameter(infoContext, p_WindowNo, AEnv.getADWindowID(p_WindowNo), m_infoWindowID, 0,
columnName, infoColumn.get_Translation("Name"), infoColumn.getAD_Reference_ID(),
infoColumn.getAD_Reference_Value_ID(), false, false);
if (infoColumn.getAD_Val_Rule_ID() > 0) {

View File

@ -148,7 +148,7 @@ public abstract class InfoPanel extends Window implements EventListener<Event>,
/** Window Width */
static final int INFO_WIDTH = 800;
protected boolean m_lookup;
protected int AD_InfoWindow_ID;
protected int m_infoWindowID;
/**************************************************
* Detail Constructor
@ -190,12 +190,12 @@ public abstract class InfoPanel extends Window implements EventListener<Event>,
if (log.isLoggable(Level.INFO))
log.info("WinNo=" + WindowNo + " " + whereClause);
p_tableName = tableName;
this.AD_InfoWindow_ID = ADInfoWindowID;
this.m_infoWindowID = ADInfoWindowID;
p_keyColumn = keyColumn;
p_multipleSelection = multipleSelection;
m_lookup = lookup;
infoWindow = loadInfoWindowData(this.AD_InfoWindow_ID);
loadInfoWindowData();
if (whereClause == null || whereClause.indexOf('@') == -1)
p_whereClause = whereClause == null ? "" : whereClause;
else
@ -1136,9 +1136,8 @@ public abstract class InfoPanel extends Window implements EventListener<Event>,
/**
* query ADInfoWindow from ADInfoWindowID
* @param ADInfoWindowID
*/
protected MInfoWindow loadInfoWindowData (int ADInfoWindowID){return null;}
protected void loadInfoWindowData (){}
/**
* Get Table name Synonym