use of org.adempiere.webui.WZoomAcross in project adempiere by adempiere.
the class AbstractADWindowPanel method onZoomAcross.
/**
* @see ToolbarListener#onZoomAcross()
*/
public void onZoomAcross() {
if (toolbar.getEvent() != null) {
GridTab currentTab = toolbar.getCurrentPanel().getGridTab();
int record_ID = currentTab.getRecord_ID();
if (record_ID <= 0)
return;
// Query
MQuery query = new MQuery();
// Current row
String link = currentTab.getKeyColumnName();
// Link for detail records
if (link.length() == 0)
link = currentTab.getLinkColumnName();
if (link.length() != 0) {
if (link.endsWith("_ID"))
query.addRestriction(link, MQuery.EQUAL, new Integer(Env.getContextAsInt(ctx, curWindowNo, link)));
else
query.addRestriction(link, MQuery.EQUAL, Env.getContext(ctx, curWindowNo, link));
}
new WZoomAcross(toolbar.getEvent().getTarget(), currentTab.getTableName(), currentTab.getAD_Window_ID(), query);
}
}
Aggregations