Search in sources :

Example 1 with WZoomAcross

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);
    }
}
Also used : GridTab(org.compiere.model.GridTab) MQuery(org.compiere.model.MQuery) WZoomAcross(org.adempiere.webui.WZoomAcross)

Aggregations

WZoomAcross (org.adempiere.webui.WZoomAcross)1 GridTab (org.compiere.model.GridTab)1 MQuery (org.compiere.model.MQuery)1