IDEMPIERE-2233:Add gridfield in InfoWindow

This commit is contained in:
hieplq 2015-05-20 12:23:24 -05:00
parent a3e64f73cf
commit b104af75b5
2 changed files with 34 additions and 5 deletions

View File

@ -100,7 +100,7 @@ public class InfoWindow extends InfoPanel implements ValueChangeListener, EventL
/** /**
* *
*/ */
private static final long serialVersionUID = -19192097402087013L; private static final long serialVersionUID = -3538308098379400144L;
protected Grid parameterGrid; protected Grid parameterGrid;
private Borderlayout layout; private Borderlayout layout;
@ -152,8 +152,23 @@ public class InfoWindow extends InfoPanel implements ValueChangeListener, EventL
*/ */
public InfoWindow(int WindowNo, String tableName, String keyColumn, String queryValue, public InfoWindow(int WindowNo, String tableName, String keyColumn, String queryValue,
boolean multipleSelection, String whereClause, int AD_InfoWindow_ID, boolean lookup) { boolean multipleSelection, String whereClause, int AD_InfoWindow_ID, boolean lookup) {
this(WindowNo, tableName, keyColumn, queryValue, multipleSelection, whereClause, AD_InfoWindow_ID, lookup, null);
}
/**
* @param WindowNo
* @param tableName
* @param keyColumn
* @param multipleSelection
* @param whereClause
* @param lookup
* @param gridfield
*/
public InfoWindow(int WindowNo, String tableName, String keyColumn, String queryValue,
boolean multipleSelection, String whereClause, int AD_InfoWindow_ID, boolean lookup, GridField field) {
super(WindowNo, tableName, keyColumn, multipleSelection, whereClause, super(WindowNo, tableName, keyColumn, multipleSelection, whereClause,
lookup); lookup);
this.m_gridfield = field;
this.queryValue = queryValue; this.queryValue = queryValue;
this.AD_InfoWindow_ID = AD_InfoWindow_ID; this.AD_InfoWindow_ID = AD_InfoWindow_ID;

View File

@ -62,6 +62,7 @@ import org.adempiere.webui.part.WindowContainer;
import org.adempiere.webui.session.SessionManager; import org.adempiere.webui.session.SessionManager;
import org.compiere.minigrid.ColumnInfo; import org.compiere.minigrid.ColumnInfo;
import org.compiere.minigrid.IDColumn; import org.compiere.minigrid.IDColumn;
import org.compiere.model.GridField;
import org.compiere.model.MInfoColumn; import org.compiere.model.MInfoColumn;
import org.compiere.model.MInfoWindow; import org.compiere.model.MInfoWindow;
import org.compiere.model.MPInstance; import org.compiere.model.MPInstance;
@ -110,11 +111,10 @@ import org.zkoss.zul.ext.Sortable;
*/ */
public abstract class InfoPanel extends Window implements EventListener<Event>, WTableModelListener, Sortable<Object>, IHelpContext public abstract class InfoPanel extends Window implements EventListener<Event>, WTableModelListener, Sortable<Object>, IHelpContext
{ {
/** /**
* *
*/ */
private static final long serialVersionUID = 6617464791677971237L; private static final long serialVersionUID = 965821837109028155L;
private final static int DEFAULT_PAGE_SIZE = 100; private final static int DEFAULT_PAGE_SIZE = 100;
protected List<Button> btProcessList = new ArrayList<Button>(); protected List<Button> btProcessList = new ArrayList<Button>();
@ -317,6 +317,8 @@ public abstract class InfoPanel extends Window implements EventListener<Event>,
private boolean m_useDatabasePaging = false; private boolean m_useDatabasePaging = false;
private BusyDialog progressWindow; private BusyDialog progressWindow;
private Listitem m_lastOnSelectItem; private Listitem m_lastOnSelectItem;
protected GridField m_gridfield;
/** /**
* false, use saved where clause * false, use saved where clause
* IDEMPIERE-1979 * IDEMPIERE-1979
@ -1858,5 +1860,17 @@ public abstract class InfoPanel extends Window implements EventListener<Event>,
} catch (Exception e){} } catch (Exception e){}
} }
/**
* field call this info panel as search editor
* null in case info window open in stand-alone window (from menu, fav,...)
* @return
*/
public GridField getGridfield() {
return m_gridfield;
}
public void setGridfield(GridField m_gridfield) {
this.m_gridfield = m_gridfield;
}
} // Info } // Info