Search in sources :

Example 1 with GridTabDataBinder

use of org.adempiere.webui.util.GridTabDataBinder in project adempiere by adempiere.

the class ADTabPanel method init.

/**
     *
     * @param winPanel
     * @param windowNo
     * @param gridTab
     * @param gridWindow
     */
public void init(AbstractADWindowPanel winPanel, int windowNo, GridTab gridTab, GridWindow gridWindow) {
    this.windowNo = windowNo;
    this.gridWindow = gridWindow;
    this.gridTab = gridTab;
    this.windowPanel = winPanel;
    gridTab.addDataStatusListener(this);
    this.dataBinder = new GridTabDataBinder(gridTab);
    this.getChildren().clear();
    int AD_Tree_ID = 0;
    if (gridTab.isTreeTab())
        AD_Tree_ID = MTree.getDefaultAD_Tree_ID(Env.getAD_Client_ID(Env.getCtx()), gridTab.getKeyColumnName());
    if (gridTab.isTreeTab() && AD_Tree_ID != 0) {
        Borderlayout layout = new Borderlayout();
        layout.setParent(this);
        layout.setStyle("width: 100%; height: 100%; position: absolute;");
        treePanel = new ADTreePanel();
        West west = new West();
        west.appendChild(treePanel);
        west.setWidth("300px");
        west.setCollapsible(true);
        west.setSplittable(true);
        west.setAutoscroll(true);
        layout.appendChild(west);
        Center center = new Center();
        center.setFlex(true);
        center.appendChild(grid);
        layout.appendChild(center);
        formComponent = layout;
        treePanel.getTree().addEventListener(Events.ON_SELECT, this);
    } else {
        this.appendChild(grid);
        formComponent = grid;
    }
    this.appendChild(listPanel);
    listPanel.setVisible(false);
    listPanel.setWindowNo(windowNo);
    listPanel.setADWindowPanel(winPanel);
    gridTab.getTableModel().addVetoableChangeListener(this);
}
Also used : Center(org.zkoss.zkex.zul.Center) West(org.zkoss.zkex.zul.West) Borderlayout(org.zkoss.zkex.zul.Borderlayout) GridTabDataBinder(org.adempiere.webui.util.GridTabDataBinder)

Aggregations

GridTabDataBinder (org.adempiere.webui.util.GridTabDataBinder)1 Borderlayout (org.zkoss.zkex.zul.Borderlayout)1 Center (org.zkoss.zkex.zul.Center)1 West (org.zkoss.zkex.zul.West)1