IDEMPIERE-3767 WReportCustomization / Tabs 1 and 5 are not scrollable

This commit is contained in:
Nicolas Micoud 2018-11-11 18:34:41 -02:00
parent 5e0a824d04
commit 1b88546a84
2 changed files with 23 additions and 5 deletions

View File

@ -14,6 +14,7 @@
package org.adempiere.webui.panel; package org.adempiere.webui.panel;
import org.adempiere.webui.component.Borderlayout;
import org.adempiere.webui.component.Checkbox; import org.adempiere.webui.component.Checkbox;
import org.adempiere.webui.component.Column; import org.adempiere.webui.component.Column;
import org.adempiere.webui.component.Columns; import org.adempiere.webui.component.Columns;
@ -30,6 +31,7 @@ import org.compiere.util.Util;
import org.zkoss.zk.ui.event.Event; import org.zkoss.zk.ui.event.Event;
import org.zkoss.zk.ui.event.EventListener; import org.zkoss.zk.ui.event.EventListener;
import org.zkoss.zk.ui.event.Events; import org.zkoss.zk.ui.event.Events;
import org.zkoss.zul.Center;
import org.zkoss.zul.Div; import org.zkoss.zul.Div;
@ -38,7 +40,7 @@ public class WRC1DisplayFieldsPanel extends WRCTabPanel implements EventListener
/** /**
* *
*/ */
private static final long serialVersionUID = -2097631726230470398L; private static final long serialVersionUID = -4595966853507636969L;
private static final int RENDER_IN_COLUMNS=4; private static final int RENDER_IN_COLUMNS=4;
private MPrintFormat m_printFormat; private MPrintFormat m_printFormat;
@ -70,6 +72,13 @@ public class WRC1DisplayFieldsPanel extends WRCTabPanel implements EventListener
ZKUpdateUtil.setHeight(wind, "100%"); ZKUpdateUtil.setHeight(wind, "100%");
ZKUpdateUtil.setHflex(wind, "1"); ZKUpdateUtil.setHflex(wind, "1");
Borderlayout borderlayout = new Borderlayout();
wind.appendChild(borderlayout);
ZKUpdateUtil.setHflex(borderlayout, "1");
Center center = new Center();
center.setAutoscroll(true);
borderlayout.appendChild(center);
Grid grid = new Grid(); Grid grid = new Grid();
//have problem moving the following out as css class //have problem moving the following out as css class
ZKUpdateUtil.setHflex(grid, "1"); ZKUpdateUtil.setHflex(grid, "1");
@ -81,7 +90,7 @@ public class WRC1DisplayFieldsPanel extends WRCTabPanel implements EventListener
Div div = new Div(); Div div = new Div();
div.setStyle("width:90%;height:100%;border:none;margin:none;padding:none"); div.setStyle("width:90%;height:100%;border:none;margin:none;padding:none");
div.appendChild(grid); div.appendChild(grid);
wind.appendChild(div); center.appendChild(div);
this.appendChild(wind); this.appendChild(wind);
Columns columns = new Columns(); Columns columns = new Columns();

View File

@ -15,6 +15,7 @@ package org.adempiere.webui.panel;
import java.util.ArrayList; import java.util.ArrayList;
import org.adempiere.webui.component.Borderlayout;
import org.adempiere.webui.component.Checkbox; import org.adempiere.webui.component.Checkbox;
import org.adempiere.webui.component.Column; import org.adempiere.webui.component.Column;
import org.adempiere.webui.component.Columns; import org.adempiere.webui.component.Columns;
@ -29,6 +30,7 @@ import org.compiere.util.Msg;
import org.zkoss.zk.ui.event.Event; import org.zkoss.zk.ui.event.Event;
import org.zkoss.zk.ui.event.EventListener; import org.zkoss.zk.ui.event.EventListener;
import org.zkoss.zk.ui.event.Events; import org.zkoss.zk.ui.event.Events;
import org.zkoss.zul.Center;
import org.zkoss.zul.Div; import org.zkoss.zul.Div;
import org.zkoss.zul.Row; import org.zkoss.zul.Row;
@ -36,7 +38,7 @@ public class WRC5SummaryFieldsPanel extends WRCTabPanel implements EventListener
/** /**
* *
*/ */
private static final long serialVersionUID = -2231369601903381581L; private static final long serialVersionUID = 4660623126634851224L;
private static final int RENDER_IN_COLUMNS=10; private static final int RENDER_IN_COLUMNS=10;
Checkbox m_chkSum[]=null; Checkbox m_chkSum[]=null;
@ -65,10 +67,17 @@ public class WRC5SummaryFieldsPanel extends WRCTabPanel implements EventListener
grid.setStyle("margin:0; padding:0; position: absolute"); grid.setStyle("margin:0; padding:0; position: absolute");
grid.makeNoStrip(); grid.makeNoStrip();
Borderlayout borderlayout = new Borderlayout();
wind.appendChild(borderlayout);
ZKUpdateUtil.setHflex(borderlayout, "1");
Center center = new Center();
center.setAutoscroll(true);
borderlayout.appendChild(center);
Div div = new Div(); Div div = new Div();
div.setStyle("width:90%;height:100%;border:none;margin:none;padding:none"); div.setStyle("width:90%;height:100%;border:none;margin:none;padding:none");
div.appendChild(grid); div.appendChild(grid);
wind.appendChild(div); center.appendChild(div);
this.appendChild(wind); this.appendChild(wind);
Columns columns = new Columns(); Columns columns = new Columns();