From 638d303322fde5a9f100f62977f0ae5350f873c7 Mon Sep 17 00:00:00 2001 From: Heng Sin Low Date: Tue, 9 Oct 2012 18:36:09 +0800 Subject: [PATCH] IDEMPIERE-352 Zk: Upgrade to release 6.5 --- org.adempiere.ui.zk/META-INF/MANIFEST.MF | 3 +- .../src}/metainfo/zk/lang-addon.xml | 0 .../adempiere/webui/AdempiereIdGenerator.java | 3 +- .../src/org/adempiere/webui/WLogin.java | 3 +- .../org/adempiere/webui/acct/WAcctViewer.java | 8 +-- .../adempiere/webui/apps/ProcessDialog.java | 5 +- .../webui/apps/form/WAllocation.java | 6 ++- .../adempiere/webui/apps/form/WCharge.java | 3 +- .../webui/apps/form/WFileImport.java | 3 +- .../adempiere/webui/apps/form/WGenForm.java | 6 ++- .../org/adempiere/webui/apps/form/WMatch.java | 6 ++- .../webui/apps/form/WSetupWizard.java | 3 +- .../adempiere/webui/apps/form/WTreeBOM.java | 3 +- .../webui/apps/form/WTreeMaintenance.java | 3 +- .../webui/apps/form/WTrxMaterial.java | 5 +- .../org/adempiere/webui/apps/wf/WFPanel.java | 4 +- .../adempiere/webui/apps/wf/WWFActivity.java | 6 ++- .../adempiere/webui/component/Accordion.java | 3 +- .../webui/component/FolderBrowser.java | 3 +- .../webui/dashboard/DPFavourites.java | 4 +- .../webui/dashboard/EventWindow.java | 3 +- .../webui/dashboard/RequestWindow.java | 3 +- .../webui/desktop/DefaultDesktop.java | 6 +-- .../org/adempiere/webui/desktop/IDesktop.java | 2 +- .../webui/desktop/NavBar2Desktop.java | 7 ++- .../webui/desktop/NavBarDesktop.java | 4 +- .../webui/desktop/TabbedDesktop.java | 2 +- .../webui/panel/AbstractMenuPanel.java | 4 +- .../webui/panel/CustomizeGridViewPanel.java | 3 +- .../adempiere/webui/panel/HeaderPanel.java | 3 +- .../adempiere/webui/panel/InfoAssetPanel.java | 3 +- .../webui/panel/InfoAssignmentPanel.java | 3 +- .../webui/panel/InfoBPartnerPanel.java | 3 +- .../webui/panel/InfoCashLinePanel.java | 3 +- .../webui/panel/InfoGeneralPanel.java | 3 +- .../adempiere/webui/panel/InfoInOutPanel.java | 3 +- .../webui/panel/InfoInvoicePanel.java | 3 +- .../adempiere/webui/panel/InfoOrderPanel.java | 3 +- .../panel/InfoPAttributeInstancePanel.java | 5 +- .../webui/panel/InfoPaymentPanel.java | 3 +- .../webui/panel/InfoProductPanel.java | 8 +-- .../adempiere/webui/panel/InvoiceHistory.java | 5 +- .../adempiere/webui/panel/WAttachment.java | 3 +- .../webui/panel/action/ExportAction.java | 12 ++--- .../webui/panel/action/ReportAction.java | 6 +-- .../adempiere/webui/part/WindowContainer.java | 8 ++- .../adempiere/webui/session/WebUIServlet.java | 4 -- .../webui/util/LogEventInterceptor.java | 49 +++++++++++++++++++ .../webui/util/ZkResourceLocator.java | 45 ----------------- .../adempiere/webui/window/FindWindow.java | 3 +- .../webui/window/WAccountDialog.java | 2 +- org.adempiere.ui.zk/WEB-INF/zk.xml | 5 ++ org.zkoss.zk.library/META-INF/MANIFEST.MF | 2 +- .../org/zkoss/util/resource/ClassLocator.java | 24 --------- .../zkoss/util/resource/IResourceLocator.java | 31 ------------ 55 files changed, 174 insertions(+), 182 deletions(-) rename org.adempiere.ui.zk/{ => WEB-INF/src}/metainfo/zk/lang-addon.xml (100%) create mode 100644 org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/util/LogEventInterceptor.java delete mode 100644 org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/util/ZkResourceLocator.java delete mode 100644 org.zkoss.zk.library/src/org/zkoss/util/resource/IResourceLocator.java diff --git a/org.adempiere.ui.zk/META-INF/MANIFEST.MF b/org.adempiere.ui.zk/META-INF/MANIFEST.MF index 4da72e9bd6..6f00ad4d6b 100644 --- a/org.adempiere.ui.zk/META-INF/MANIFEST.MF +++ b/org.adempiere.ui.zk/META-INF/MANIFEST.MF @@ -44,7 +44,8 @@ Export-Package: metainfo.zk, org.adempiere.webui.session, org.adempiere.webui.theme, org.adempiere.webui.util, - org.adempiere.webui.window + org.adempiere.webui.window, + metainfo.zk Require-Bundle: org.adempiere.report.jasper;bundle-version="1.0.0", org.adempiere.base;bundle-version="1.0.0", org.adempiere.report.jasper.library;bundle-version="1.0.0", diff --git a/org.adempiere.ui.zk/metainfo/zk/lang-addon.xml b/org.adempiere.ui.zk/WEB-INF/src/metainfo/zk/lang-addon.xml similarity index 100% rename from org.adempiere.ui.zk/metainfo/zk/lang-addon.xml rename to org.adempiere.ui.zk/WEB-INF/src/metainfo/zk/lang-addon.xml diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/AdempiereIdGenerator.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/AdempiereIdGenerator.java index 2af4bc4987..e5aa5792ea 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/AdempiereIdGenerator.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/AdempiereIdGenerator.java @@ -20,6 +20,7 @@ import java.util.regex.Pattern; import org.zkoss.zk.ui.Component; import org.zkoss.zk.ui.Desktop; import org.zkoss.zk.ui.Page; +import org.zkoss.zk.ui.metainfo.ComponentInfo; import org.zkoss.zk.ui.sys.IdGenerator; public class AdempiereIdGenerator implements IdGenerator { @@ -33,7 +34,7 @@ public class AdempiereIdGenerator implements IdGenerator { public static final String ZK_COMPONENT_PREFIX_ATTRIBUTE = "zk_component_prefix"; @Override - public String nextComponentUuid(Desktop desktop, Component comp) { + public String nextComponentUuid(Desktop desktop, Component comp, ComponentInfo compInfo) { String prefix = (String) comp.getAttribute(ZK_COMPONENT_PREFIX_ATTRIBUTE); if (prefix == null || prefix.length() == 0) prefix = DEFAULT_ZK_COMP_PREFIX; diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/WLogin.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/WLogin.java index adad7a1c8a..26fa854291 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/WLogin.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/WLogin.java @@ -69,7 +69,6 @@ public class WLogin extends AbstractUIPart Center center = new Center(); center.setParent(layout); center.setBorder("none"); - center.setFlex(true); center.setAutoscroll(true); center.setStyle("border: none; background-color: transparent;"); @@ -80,6 +79,8 @@ public class WLogin extends AbstractUIPart vb.setPack("center"); vb.setAlign("center"); vb.setStyle("background-color: transparent;"); + vb.setHflex("1"); + vb.setVflex("1"); loginWindow = new LoginWindow(app); loginWindow.setParent(vb); diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/acct/WAcctViewer.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/acct/WAcctViewer.java index 311b39bac8..752aeb8633 100755 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/acct/WAcctViewer.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/acct/WAcctViewer.java @@ -510,13 +510,14 @@ public class WAcctViewer extends Window implements EventListener result.appendChild(resultPanel); Center resultCenter = new Center(); - resultCenter.setFlex(true); resultPanel.appendChild(resultCenter); table.setHflex("1"); table.setVflex(true); table.setHeight("99%"); table.setStyle("position: absolute;"); resultCenter.appendChild(table); + table.setHflex("1"); + table.setVflex("1"); pagingPanel = new South(); resultPanel.appendChild(pagingPanel); @@ -563,17 +564,18 @@ public class WAcctViewer extends Window implements EventListener Center center = new Center(); center.setParent(layout); - center.setFlex(true); center.setStyle("background-color: transparent; padding: 2px;"); tabbedPane.setParent(center); + tabbedPane.setHflex("1"); + tabbedPane.setVflex("1"); South south = new South(); south.setParent(layout); - south.setFlex(true); south.setStyle("background-color: transparent"); south.setHeight("36px"); southPanel.setParent(south); southPanel.setVflex("1"); + southPanel.setHflex("1"); this.setTitle(TITLE); this.setClosable(true); diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/ProcessDialog.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/ProcessDialog.java index ebcf6cedd4..96cf91f251 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/ProcessDialog.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/ProcessDialog.java @@ -159,7 +159,8 @@ public class ProcessDialog extends Window implements EventListener, IProc center = new Center(); layout.appendChild(center); center.appendChild(centerPanel); - center.setFlex(true); + centerPanel.setHflex("1"); + centerPanel.setVflex("1"); center.setAutoscroll(true); center.setStyle("border: none"); @@ -459,6 +460,8 @@ public class ProcessDialog extends Window implements EventListener, IProc messageDiv.setStyle(""); north.setVisible(false); center.appendChild(messageDiv); + messageDiv.setVflex("1"); + messageDiv.setHflex("1"); invalidate(); Clients.response(new AuEcho(this, "onAfterProcess", null)); diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WAllocation.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WAllocation.java index 823c1b65a1..ce24f42fc3 100755 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WAllocation.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WAllocation.java @@ -268,9 +268,10 @@ public class WAllocation extends Allocation center.setStyle("border: none"); // center = new Center(); - center.setFlex(true); mainLayout.appendChild(center); center.appendChild(infoPanel); + infoPanel.setHflex("1"); + infoPanel.setVflex("1"); infoPanel.setStyle("border: none"); infoPanel.setWidth("100%"); @@ -284,9 +285,10 @@ public class WAllocation extends Allocation north.setSplittable(true); center = new Center(); center.setStyle("border: none"); - center.setFlex(true); infoPanel.appendChild(center); center.appendChild(invoicePanel); + invoicePanel.setHflex("1"); + invoicePanel.setVflex("1"); } // jbInit /** diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WCharge.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WCharge.java index 1b1c7b46c5..99be87a404 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WCharge.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WCharge.java @@ -261,10 +261,11 @@ public class WCharge extends Charge implements IFormController, EventListener Center center = new Center(); center.setBorder("none"); - center.setFlex(true); center.setAutoscroll(true); borderlayout.appendChild(center); center.appendChild(m_tblData); + m_tblData.setVflex("1"); + m_tblData.setHflex("1"); South south = new South(); south.setBorder("none"); diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WFileImport.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WFileImport.java index 1342abcd3e..41c5c44fae 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WFileImport.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WFileImport.java @@ -145,9 +145,10 @@ public class WFileImport extends ADForm implements EventListener layout.appendChild(north); north.appendChild(northPanel); Center center = new Center(); - center.setFlex(true); layout.appendChild(center); center.appendChild(centerPanel); + centerPanel.setVflex("1"); + centerPanel.setHflex("1"); South south = new South(); layout.appendChild(south); south.appendChild(confirmPanel); diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WGenForm.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WGenForm.java index 979c9d12fe..28507b835e 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WGenForm.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WGenForm.java @@ -115,7 +115,8 @@ public class WGenForm extends ADForm implements EventListener, WTableModelListen center.setStyle("border: none"); contentPane.appendChild(center); center.appendChild(tabbedPane); - center.setFlex(true); + tabbedPane.setVflex("1"); + tabbedPane.setHflex("1"); South south = new South(); south.setStyle("border: none"); contentPane.appendChild(south); @@ -167,7 +168,8 @@ public class WGenForm extends ADForm implements EventListener, WTableModelListen Center center = new Center(); selPanel.appendChild(center); center.appendChild(miniTable); - center.setFlex(true); + miniTable.setVflex("1"); + miniTable.setHflex("1"); miniTable.setHeight("99%"); confirmPanelSel.addActionListener(this); // diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WMatch.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WMatch.java index b09134e29a..37cba7e55e 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WMatch.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WMatch.java @@ -272,7 +272,8 @@ public class WMatch extends Match Center center = new Center(); mainLayout.appendChild(center); center.appendChild(centerPanel); - center.setFlex(true); + centerPanel.setHflex("1"); + centerPanel.setVflex("1"); centerLayout.setWidth("100%"); centerLayout.setHeight("100%"); north = new North(); @@ -298,9 +299,10 @@ public class WMatch extends Match center = new Center(); centerLayout.appendChild(center); center.setStyle("border: none"); - center.setFlex(false); // center.setHeight("6%"); center.appendChild(xPanel); + xPanel.setVflex("1"); + xPanel.setHflex("1"); xPanel.appendChild(sameBPartner); xPanel.appendChild(new Space()); xPanel.appendChild(sameProduct); diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WSetupWizard.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WSetupWizard.java index 83f6f79512..d90ab54e47 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WSetupWizard.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WSetupWizard.java @@ -251,7 +251,8 @@ public class WSetupWizard extends SetupWizard implements IFormController, EventL West west = new West(); mainLayout.appendChild(west); west.appendChild(wfnodeTree); - west.setFlex(true); + wfnodeTree.setVflex("1"); + wfnodeTree.setHflex("1"); west.setAutoscroll(true); west.setWidth("30%"); diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WTreeBOM.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WTreeBOM.java index dcc7598c3e..50e6fb26c0 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WTreeBOM.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WTreeBOM.java @@ -228,7 +228,8 @@ public class WTreeBOM extends TreeBOM implements IFormController, EventListener mainLayout.appendChild(center); center.appendChild(dataPane); dataPane.appendChild(tableBOM); - center.setFlex(true); + dataPane.setHflex("1"); + dataPane.setVflex("1"); center.setAutoscroll(true); } diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WTreeMaintenance.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WTreeMaintenance.java index 685145abc1..aa0909b2e3 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WTreeMaintenance.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WTreeMaintenance.java @@ -169,7 +169,8 @@ public class WTreeMaintenance extends TreeMaintenance implements IFormController Center center = new Center(); mainLayout.appendChild(center); center.appendChild(centerTree); - center.setFlex(true); + centerTree.setVflex("1"); + centerTree.setHflex("1"); center.setAutoscroll(true); East east = new East(); diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WTrxMaterial.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WTrxMaterial.java index f11ddb2e30..a59ba329d1 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WTrxMaterial.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WTrxMaterial.java @@ -21,6 +21,7 @@ import java.util.Properties; import java.util.logging.Level; import org.adempiere.webui.LayoutUtils; +import org.adempiere.webui.adwindow.ADTabpanel; import org.adempiere.webui.apps.AEnv; import org.adempiere.webui.component.ConfirmPanel; import org.adempiere.webui.component.Grid; @@ -36,7 +37,6 @@ import org.adempiere.webui.editor.WTableDirEditor; import org.adempiere.webui.event.ValueChangeEvent; import org.adempiere.webui.event.ValueChangeListener; import org.adempiere.webui.panel.ADForm; -import org.adempiere.webui.panel.ADTabpanel; import org.adempiere.webui.panel.CustomForm; import org.adempiere.webui.panel.IFormController; import org.adempiere.webui.panel.StatusBarPanel; @@ -212,8 +212,9 @@ public class WTrxMaterial extends TrxMaterial m_gridController.switchRowPresentation(); Center center = new Center(); mainLayout.appendChild(center); - center.setFlex(true); center.appendChild(m_gridController); + m_gridController.setVflex("1"); + m_gridController.setHflex("1"); } // dynInit diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/wf/WFPanel.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/wf/WFPanel.java index c37c79e093..c5ac1ec68c 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/wf/WFPanel.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/wf/WFPanel.java @@ -108,7 +108,6 @@ public class WFPanel extends Borderlayout implements EventListener center.appendChild(table); contentPanel.setStyle("width: 100%; heigh: 100%;"); center.setAutoscroll(true); - center.setFlex(false); South south = new South(); this.appendChild(south); @@ -120,7 +119,8 @@ public class WFPanel extends Borderlayout implements EventListener south.setSplittable(true); south.setCollapsible(true); south.setAutoscroll(true); - south.setFlex(true); + div.setVflex("1"); + div.setHflex("1"); } // jbInit private void createTable() { diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/wf/WWFActivity.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/wf/WWFActivity.java index 2b72f6b7b1..cba1db924b 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/wf/WWFActivity.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/wf/WWFActivity.java @@ -243,7 +243,8 @@ public class WWFActivity extends ADForm implements EventListener North north = new North(); north.appendChild(listbox); north.setSplittable(true); - north.setFlex(true); + listbox.setVflex("1"); + listbox.setHflex("1"); north.setHeight("50%"); layout.appendChild(north); north.setStyle("background-color: transparent"); @@ -253,7 +254,8 @@ public class WWFActivity extends ADForm implements EventListener center.appendChild(grid); layout.appendChild(center); center.setStyle("background-color: transparent"); - center.setFlex(true); + grid.setVflex("1"); + grid.setHflex("1"); South south = new South(); south.appendChild(statusBar); diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/Accordion.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/Accordion.java index 8ffcdefac2..42d03702de 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/Accordion.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/Accordion.java @@ -54,8 +54,7 @@ public class Accordion extends Borderlayout implements EventListener { north.setCollapsible(false); Center center = new Center(); - center.setFlex(true); - appendChild(new Center()); + appendChild(center); South south = new South(); appendChild(south); diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/FolderBrowser.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/FolderBrowser.java index faee0f4991..f0398c37aa 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/FolderBrowser.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/FolderBrowser.java @@ -90,9 +90,10 @@ public class FolderBrowser extends Window implements EventListener north.appendChild(txtPath); Center center = new Center(); - center.setFlex(true); contentLayout.appendChild(center); center.appendChild(listDir); + listDir.setVflex("1"); + listDir.setHflex("1"); South south = new South(); south.setStyle("border: none"); diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/dashboard/DPFavourites.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/dashboard/DPFavourites.java index bcf254556d..14429fb6bc 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/dashboard/DPFavourites.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/dashboard/DPFavourites.java @@ -15,11 +15,11 @@ package org.adempiere.webui.dashboard; import java.util.Enumeration; +import org.adempiere.webui.adwindow.ADWindow; import org.adempiere.webui.apps.AEnv; import org.adempiere.webui.event.TouchEventHelper; import org.adempiere.webui.exception.ApplicationException; import org.adempiere.webui.session.SessionManager; -import org.adempiere.webui.window.ADWindow; import org.adempiere.webui.window.FDialog; import org.compiere.model.GridTab; import org.compiere.model.MMenu; @@ -293,7 +293,7 @@ public class DPFavourites extends DashboardPanel implements EventListener if(frame == null) return; - GridTab tab = frame.getADWindowPanel().getActiveGridTab(); + GridTab tab = frame.getADWindowContent().getActiveGridTab(); tab.dataNew(false); } catch (Exception e) diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/dashboard/EventWindow.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/dashboard/EventWindow.java index 08293b1097..1076ec953c 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/dashboard/EventWindow.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/dashboard/EventWindow.java @@ -131,7 +131,8 @@ public class EventWindow extends Window implements EventListener { Center center = new Center(); borderlayout.appendChild(center); center.appendChild(grid); - center.setFlex(true); + grid.setVflex("1"); + grid.setHflex("1"); South south = new South(); borderlayout.appendChild(south); diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/dashboard/RequestWindow.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/dashboard/RequestWindow.java index 96eca44b5e..801639bef0 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/dashboard/RequestWindow.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/dashboard/RequestWindow.java @@ -237,7 +237,8 @@ public class RequestWindow extends Window implements EventListener { Center center = new Center(); borderlayout.appendChild(center); center.appendChild(grid); - center.setFlex(true); + grid.setVflex("1"); + grid.setHflex("1"); South south = new South(); borderlayout.appendChild(south); diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/desktop/DefaultDesktop.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/desktop/DefaultDesktop.java index c5ae43cd3d..6f85b60849 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/desktop/DefaultDesktop.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/desktop/DefaultDesktop.java @@ -34,6 +34,7 @@ import org.adempiere.webui.session.SessionManager; import org.adempiere.webui.util.IServerPushCallback; import org.adempiere.webui.util.ServerPushTemplate; import org.adempiere.webui.util.UserPreference; +import org.compiere.Adempiere; import org.compiere.util.CLogger; import org.compiere.util.Env; import org.compiere.util.Msg; @@ -120,7 +121,6 @@ public class DefaultDesktop extends TabbedDesktop implements MenuListener, Seria w.setSclass("desktop-left-column"); w.setCollapsible(true); w.setSplittable(true); - w.setFlex(false); w.setHflex("1"); w.addEventListener(Events.ON_OPEN, new EventListener() { @Override @@ -139,7 +139,6 @@ public class DefaultDesktop extends TabbedDesktop implements MenuListener, Seria windowArea = new Center(); windowArea.setParent(layout); - windowArea.setFlex(true); windowArea.setSclass("desktop-center"); windowContainer.createPart(windowArea); @@ -178,8 +177,7 @@ public class DefaultDesktop extends TabbedDesktop implements MenuListener, Seria } }; - Thread thread = new Thread(runnable); - thread.start(); + Adempiere.getThreadPoolExecutor().submit(runnable); return layout; } diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/desktop/IDesktop.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/desktop/IDesktop.java index 373a5f33d9..47dc9f56f6 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/desktop/IDesktop.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/desktop/IDesktop.java @@ -14,12 +14,12 @@ package org.adempiere.webui.desktop; import org.adempiere.webui.ClientInfo; +import org.adempiere.webui.adwindow.ADWindow; import org.adempiere.webui.apps.ProcessDialog; import org.adempiere.webui.component.Window; import org.adempiere.webui.panel.ADForm; import org.adempiere.webui.part.UIPart; import org.adempiere.webui.util.ServerPushTemplate; -import org.adempiere.webui.window.ADWindow; import org.compiere.model.MQuery; import org.compiere.util.WebDoc; import org.zkoss.zk.ui.Component; diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/desktop/NavBar2Desktop.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/desktop/NavBar2Desktop.java index 22beaeee73..6db684281a 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/desktop/NavBar2Desktop.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/desktop/NavBar2Desktop.java @@ -17,6 +17,7 @@ import java.io.Serializable; import java.util.Properties; import org.adempiere.util.ServerContext; +import org.adempiere.webui.adwindow.ADWindow; import org.adempiere.webui.apps.BusyDialog; import org.adempiere.webui.apps.ProcessDialog; import org.adempiere.webui.component.Accordion; @@ -32,7 +33,6 @@ import org.adempiere.webui.session.SessionManager; import org.adempiere.webui.util.IServerPushCallback; import org.adempiere.webui.util.ServerPushTemplate; import org.adempiere.webui.util.UserPreference; -import org.adempiere.webui.window.ADWindow; import org.compiere.util.CLogger; import org.compiere.util.Env; import org.compiere.util.Msg; @@ -118,7 +118,6 @@ public class NavBar2Desktop extends TabbedDesktop implements MenuListener, Seria w.setWidth("300px"); w.setCollapsible(true); w.setSplittable(true); - w.setFlex(true); w.addEventListener(Events.ON_OPEN, new EventListener() { @Override public void onEvent(Event event) throws Exception { @@ -136,12 +135,13 @@ public class NavBar2Desktop extends TabbedDesktop implements MenuListener, Seria Center center = new Center(); center.setParent(layout); - center.setFlex(true); Borderlayout innerLayout = new Borderlayout(); innerLayout.setHeight("100%"); innerLayout.setWidth("100%"); innerLayout.setParent(center); + innerLayout.setVflex("1"); + innerLayout.setHflex("1"); West innerW = new West(); innerW.setWidth("200px"); @@ -173,7 +173,6 @@ public class NavBar2Desktop extends TabbedDesktop implements MenuListener, Seria windowArea = new Center(); windowArea.setParent(innerLayout); - windowArea.setFlex(true); windowContainer.createPart(windowArea); diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/desktop/NavBarDesktop.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/desktop/NavBarDesktop.java index 375b508101..084160ae39 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/desktop/NavBarDesktop.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/desktop/NavBarDesktop.java @@ -17,6 +17,7 @@ import java.io.Serializable; import java.util.Properties; import org.adempiere.util.ServerContext; +import org.adempiere.webui.adwindow.ADWindow; import org.adempiere.webui.apps.BusyDialog; import org.adempiere.webui.apps.ProcessDialog; import org.adempiere.webui.component.Accordion; @@ -34,7 +35,6 @@ import org.adempiere.webui.session.SessionManager; import org.adempiere.webui.util.IServerPushCallback; import org.adempiere.webui.util.ServerPushTemplate; import org.adempiere.webui.util.UserPreference; -import org.adempiere.webui.window.ADWindow; import org.compiere.util.CLogger; import org.compiere.util.Env; import org.compiere.util.Msg; @@ -127,7 +127,6 @@ public class NavBarDesktop extends TabbedDesktop implements MenuListener, Serial leftRegion.setCollapsible(true); leftRegion.setSplittable(true); leftRegion.setTitle("Navigation"); - leftRegion.setFlex(true); leftRegion.addEventListener(Events.ON_OPEN, new EventListener() { @Override public void onEvent(Event event) throws Exception { @@ -174,7 +173,6 @@ public class NavBarDesktop extends TabbedDesktop implements MenuListener, Serial windowArea = new Center(); windowArea.setParent(layout); - windowArea.setFlex(true); windowContainer.createPart(windowArea); diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/desktop/TabbedDesktop.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/desktop/TabbedDesktop.java index fffd04a665..73afe6ea71 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/desktop/TabbedDesktop.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/desktop/TabbedDesktop.java @@ -15,6 +15,7 @@ package org.adempiere.webui.desktop; import java.util.List; +import org.adempiere.webui.adwindow.ADWindow; import org.adempiere.webui.apps.ProcessDialog; import org.adempiere.webui.apps.wf.WFPanel; import org.adempiere.webui.component.DesktopTabpanel; @@ -24,7 +25,6 @@ import org.adempiere.webui.component.Window; import org.adempiere.webui.panel.ADForm; import org.adempiere.webui.part.WindowContainer; import org.adempiere.webui.session.SessionManager; -import org.adempiere.webui.window.ADWindow; import org.adempiere.webui.window.WTask; import org.compiere.model.MQuery; import org.compiere.model.MTask; diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/AbstractMenuPanel.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/AbstractMenuPanel.java index 2201f19497..c2fea41b63 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/AbstractMenuPanel.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/AbstractMenuPanel.java @@ -20,12 +20,12 @@ import java.util.Collection; import java.util.Enumeration; import java.util.Properties; +import org.adempiere.webui.adwindow.ADWindow; import org.adempiere.webui.apps.AEnv; import org.adempiere.webui.event.TouchEventHelper; import org.adempiere.webui.event.TouchEvents; import org.adempiere.webui.exception.ApplicationException; import org.adempiere.webui.session.SessionManager; -import org.adempiere.webui.window.ADWindow; import org.compiere.model.GridTab; import org.compiere.model.MMenu; import org.compiere.model.MQuery; @@ -306,7 +306,7 @@ public abstract class AbstractMenuPanel extends Panel implements EventListener userPanel.setHeight("100%"); userPanel.setAlign("right"); userPanel.setStyle("position: absolute; text-align:right;"); - center.setFlex(true); + userPanel.setVflex("1"); + userPanel.setHflex("1"); LayoutUtils.addSclass("desktop-header-right", center); } diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoAssetPanel.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoAssetPanel.java index 5fafc4d1f9..9f69bd2e19 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoAssetPanel.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoAssetPanel.java @@ -204,7 +204,6 @@ public class InfoAssetPanel extends InfoPanel implements ValueChangeListener, Ev Center center = new Center(); layout.appendChild(center); - center.setFlex(true); Div div = new Div(); div.appendChild(contentPanel); if (isLookup()) @@ -214,6 +213,8 @@ public class InfoAssetPanel extends InfoPanel implements ValueChangeListener, Ev contentPanel.setVflex(true); div.setStyle("width :100%; height: 100%"); center.appendChild(div); + div.setVflex("1"); + div.setHflex("1"); South south = new South(); layout.appendChild(south); diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoAssignmentPanel.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoAssignmentPanel.java index 5c047439f1..ceaa0f2b3c 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoAssignmentPanel.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoAssignmentPanel.java @@ -237,7 +237,6 @@ public class InfoAssignmentPanel extends InfoPanel implements EventListener, Val Center center = new Center(); layout.appendChild(center); - center.setFlex(true); div = new Div(); div.appendChild(contentPanel); if (isLookup()) @@ -247,6 +246,8 @@ public class InfoAssignmentPanel extends InfoPanel implements EventListener, Val contentPanel.setVflex(true); div.setStyle("width :100%; height: 100%"); center.appendChild(div); + div.setVflex("1"); + div.setHflex("1"); South south = new South(); layout.appendChild(south); diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoBPartnerPanel.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoBPartnerPanel.java index cd4d98a2a6..c0b97098a1 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoBPartnerPanel.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoBPartnerPanel.java @@ -248,7 +248,6 @@ public class InfoBPartnerPanel extends InfoPanel implements EventListener, WTabl Center center = new Center(); layout.appendChild(center); - center.setFlex(true); Div div = new Div(); div.appendChild(contentPanel); if (isLookup()) @@ -258,6 +257,8 @@ public class InfoBPartnerPanel extends InfoPanel implements EventListener, WTabl contentPanel.setVflex(true); div.setStyle("width :100%; height: 100%"); center.appendChild(div); + div.setVflex("1"); + div.setHflex("1"); South south = new South(); layout.appendChild(south); diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoCashLinePanel.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoCashLinePanel.java index d0a7db84a4..0aa204d54a 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoCashLinePanel.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoCashLinePanel.java @@ -263,7 +263,6 @@ public class InfoCashLinePanel extends InfoPanel implements ValueChangeListener, Center center = new Center(); layout.appendChild(center); - center.setFlex(true); Div div = new Div(); div.appendChild(contentPanel); if (isLookup()) @@ -273,6 +272,8 @@ public class InfoCashLinePanel extends InfoPanel implements ValueChangeListener, contentPanel.setVflex(true); div.setStyle("width :100%; height: 100%"); center.appendChild(div); + div.setVflex("1"); + div.setHflex("1"); South south = new South(); layout.appendChild(south); diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoGeneralPanel.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoGeneralPanel.java index 70267d1e48..d728aaa795 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoGeneralPanel.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoGeneralPanel.java @@ -160,7 +160,6 @@ public class InfoGeneralPanel extends InfoPanel implements EventListener Center center = new Center(); layout.appendChild(center); - center.setFlex(true); Div div = new Div(); div.appendChild(contentPanel); if (isLookup()) @@ -170,6 +169,8 @@ public class InfoGeneralPanel extends InfoPanel implements EventListener contentPanel.setVflex(true); div.setStyle("width :100%; height: 100%"); center.appendChild(div); + div.setVflex("1"); + div.setHflex("1"); South south = new South(); layout.appendChild(south); diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoInOutPanel.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoInOutPanel.java index 69189c670a..30e922af02 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoInOutPanel.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoInOutPanel.java @@ -230,7 +230,6 @@ public class InfoInOutPanel extends InfoPanel implements ValueChangeListener, Ev Center center = new Center(); layout.appendChild(center); - center.setFlex(true); Div div = new Div(); div.appendChild(contentPanel); if (isLookup()) @@ -240,6 +239,8 @@ public class InfoInOutPanel extends InfoPanel implements ValueChangeListener, Ev contentPanel.setVflex(true); div.setStyle("width :100%; height: 100%"); center.appendChild(div); + div.setVflex("1"); + div.setHflex("1"); South south = new South(); layout.appendChild(south); diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoInvoicePanel.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoInvoicePanel.java index c0654ce13d..a4d5ca3a2b 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoInvoicePanel.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoInvoicePanel.java @@ -260,7 +260,6 @@ public class InfoInvoicePanel extends InfoPanel implements ValueChangeListener Center center = new Center(); layout.appendChild(center); - center.setFlex(true); Div div = new Div(); div.appendChild(contentPanel); if (isLookup()) @@ -270,6 +269,8 @@ public class InfoInvoicePanel extends InfoPanel implements ValueChangeListener contentPanel.setVflex(true); div.setStyle("width :100%; height: 100%"); center.appendChild(div); + div.setVflex("1"); + div.setHflex("1"); South south = new South(); layout.appendChild(south); diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoOrderPanel.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoOrderPanel.java index 6bf586d981..1f843a0820 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoOrderPanel.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoOrderPanel.java @@ -237,7 +237,6 @@ public class InfoOrderPanel extends InfoPanel implements ValueChangeListener Center center = new Center(); layout.appendChild(center); - center.setFlex(true); Div div = new Div(); div.appendChild(contentPanel); if (isLookup()) @@ -247,6 +246,8 @@ public class InfoOrderPanel extends InfoPanel implements ValueChangeListener contentPanel.setVflex(true); div.setStyle("width :100%; height: 100%"); center.appendChild(div); + div.setVflex("1"); + div.setHflex("1"); South south = new South(); layout.appendChild(south); diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoPAttributeInstancePanel.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoPAttributeInstancePanel.java index c0f776b4d3..f5e390fb67 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoPAttributeInstancePanel.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoPAttributeInstancePanel.java @@ -135,9 +135,10 @@ public class InfoPAttributeInstancePanel extends Window implements EventListener Center center = new Center(); center.setAutoscroll(true); - center.setFlex(true); - borderlayout.appendChild(center); + borderlayout.appendChild(center); center.appendChild(m_table); + m_table.setVflex("1"); + m_table.setHflex("1"); South south = new South(); borderlayout.appendChild(south); diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoPaymentPanel.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoPaymentPanel.java index 9f147efe12..5d56de8eca 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoPaymentPanel.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoPaymentPanel.java @@ -245,7 +245,6 @@ public class InfoPaymentPanel extends InfoPanel implements ValueChangeListener, Center center = new Center(); layout.appendChild(center); - center.setFlex(true); Div div = new Div(); div.appendChild(contentPanel); if (isLookup()) @@ -255,6 +254,8 @@ public class InfoPaymentPanel extends InfoPanel implements ValueChangeListener, contentPanel.setVflex(true); div.setStyle("width :100%; height: 100%"); center.appendChild(div); + div.setVflex("1"); + div.setHflex("1"); South south = new South(); layout.appendChild(south); diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoProductPanel.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoProductPanel.java index f79aa03333..e88b7150a2 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoProductPanel.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoProductPanel.java @@ -501,20 +501,22 @@ public class InfoProductPanel extends InfoPanel implements EventListener Center center = new Center(); //true will conflict with listbox scrolling center.setAutoscroll(false); - center.setFlex(true); - borderlayout.appendChild(center); + borderlayout.appendChild(center); center.appendChild(contentPanel); + contentPanel.setVflex("1"); + contentPanel.setHflex("1"); South south = new South(); int detailHeight = (height * 25 / 100); south.setHeight(detailHeight + "px"); south.setCollapsible(true); south.setSplittable(true); - south.setFlex(true); south.setTitle(Msg.translate(Env.getCtx(), "WarehouseStock")); south.setTooltiptext(Msg.translate(Env.getCtx(), "WarehouseStock")); borderlayout.appendChild(south); tabbedPane.setSclass("info-product-tabbedpane"); south.appendChild(tabbedPane); + tabbedPane.setVflex("1"); + tabbedPane.setHflex("1"); Borderlayout mainPanel = new Borderlayout(); mainPanel.setWidth("100%"); diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InvoiceHistory.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InvoiceHistory.java index 5bfbbc9fe7..5e2b7c1ec8 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InvoiceHistory.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InvoiceHistory.java @@ -190,9 +190,10 @@ public class InvoiceHistory extends Window implements EventListener Center center = new Center(); center.setStyle("border: none"); center.setAutoscroll(true); - center.setFlex(true); - borderlayout.appendChild(center); + borderlayout.appendChild(center); center.appendChild(tabbox); + tabbox.setVflex("1"); + tabbox.setHflex("1"); South south = new South(); south.setStyle("border: none"); diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/WAttachment.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/WAttachment.java index 5d2f7f36c1..7cc87033c6 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/WAttachment.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/WAttachment.java @@ -267,9 +267,10 @@ public class WAttachment extends Window implements EventListener Center centerPane = new Center(); centerPane.setAutoscroll(true); - centerPane.setFlex(true); mainPanel.appendChild(centerPane); centerPane.appendChild(previewPanel); + previewPanel.setVflex("1"); + previewPanel.setHflex("1"); South southPane = new South(); mainPanel.appendChild(southPane); diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/action/ExportAction.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/action/ExportAction.java index 530c1c59cd..cdbd771e0e 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/action/ExportAction.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/action/ExportAction.java @@ -24,16 +24,16 @@ import java.util.Set; import org.adempiere.base.IGridTabExporter; import org.adempiere.base.Service; import org.adempiere.exceptions.AdempiereException; +import org.adempiere.webui.adwindow.AbstractADWindowContent; +import org.adempiere.webui.adwindow.IADTabbox; +import org.adempiere.webui.adwindow.IADTabpanel; import org.adempiere.webui.apps.AEnv; import org.adempiere.webui.component.Checkbox; import org.adempiere.webui.component.ConfirmPanel; -import org.adempiere.webui.component.IADTab; import org.adempiere.webui.component.Label; import org.adempiere.webui.component.ListItem; import org.adempiere.webui.component.Listbox; import org.adempiere.webui.component.Window; -import org.adempiere.webui.panel.AbstractADWindowPanel; -import org.adempiere.webui.panel.IADTabpanel; import org.adempiere.webui.window.FDialog; import org.compiere.model.GridTab; import org.compiere.util.Env; @@ -53,7 +53,7 @@ import org.zkoss.zul.Vbox; */ public class ExportAction implements EventListener { - private AbstractADWindowPanel panel; + private AbstractADWindowContent panel; private Map exporterMap = null; private Map extensionMap = null; @@ -66,7 +66,7 @@ public class ExportAction implements EventListener /** * @param panel */ - public ExportAction(AbstractADWindowPanel panel) + public ExportAction(AbstractADWindowContent panel) { this.panel = panel; } @@ -162,7 +162,7 @@ public class ExportAction implements EventListener boolean currentRowOnly = chkCurrentRow.isSelected(); File file = File.createTempFile("Export", "."+ext); - IADTab adTab = panel.getADTab(); + IADTabbox adTab = panel.getADTab(); int selected = adTab.getSelectedIndex(); int tabLevel = panel.getActiveGridTab().getTabLevel(); Set tables = new HashSet(); diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/action/ReportAction.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/action/ReportAction.java index 4d43f5a1ac..d3c70b7f0f 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/action/ReportAction.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/action/ReportAction.java @@ -27,6 +27,7 @@ import java.util.logging.Level; import javax.sql.RowSet; import org.adempiere.webui.LayoutUtils; +import org.adempiere.webui.adwindow.AbstractADWindowContent; import org.adempiere.webui.apps.WProcessCtl; import org.adempiere.webui.component.Checkbox; import org.adempiere.webui.component.ConfirmPanel; @@ -34,7 +35,6 @@ import org.adempiere.webui.component.Label; import org.adempiere.webui.component.ListItem; import org.adempiere.webui.component.Listbox; import org.adempiere.webui.component.Window; -import org.adempiere.webui.panel.AbstractADWindowPanel; import org.adempiere.webui.window.FDialog; import org.compiere.model.GridTab; import org.compiere.model.MQuery; @@ -66,7 +66,7 @@ public class ReportAction implements EventListener { private static CLogger log = CLogger.getCLogger(ReportAction.class); - private AbstractADWindowPanel panel; + private AbstractADWindowContent panel; private Window winReport = null; private ConfirmPanel confirmPanel = new ConfirmPanel(true); @@ -78,7 +78,7 @@ public class ReportAction implements EventListener private ArrayList printFormatList = new ArrayList(); - public ReportAction(AbstractADWindowPanel panel) + public ReportAction(AbstractADWindowContent panel) { this.panel = panel; getPrintFormats(panel.getActiveGridTab().getAD_Table_ID()); diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/part/WindowContainer.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/part/WindowContainer.java index 4ee5a88d96..dd856cc6bb 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/part/WindowContainer.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/part/WindowContainer.java @@ -57,12 +57,16 @@ public class WindowContainer extends AbstractUIPart tabbox.setSclass("desktop-tabbox"); Tabpanels tabpanels = new Tabpanels(); + tabpanels.setVflex("1"); + tabpanels.setHflex("1"); Tabs tabs = new Tabs(); tabbox.appendChild(tabs); tabbox.appendChild(tabpanels); tabbox.setWidth("100%"); tabbox.setHeight("100%"); + tabbox.setVflex("1"); + tabbox.setHflex("1"); if (parent != null) tabbox.setParent(parent); @@ -135,7 +139,9 @@ public class WindowContainer extends AbstractUIPart } tabpanel.setHeight("100%"); tabpanel.setWidth("100%"); - tabpanel.setZclass("desktop-tabpanel"); + tabpanel.setVflex("1"); + tabpanel.setHflex("1"); + tabpanel.setSclass("desktop-tabpanel"); if (refTab == null) { diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/session/WebUIServlet.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/session/WebUIServlet.java index d479080ebc..290cb93ed1 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/session/WebUIServlet.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/session/WebUIServlet.java @@ -32,12 +32,10 @@ import javax.servlet.http.HttpServletResponse; import org.compiere.Adempiere; import org.compiere.util.CLogger; import org.compiere.util.Ini; -import org.zkoss.util.resource.ClassLocator; import org.zkoss.zk.ui.http.DHtmlLayoutServlet; import org.adempiere.util.ServerContext; import org.adempiere.util.ServerContextURLHandler; -import org.adempiere.webui.util.ZkResourceLocator; /** * @@ -54,8 +52,6 @@ public class WebUIServlet extends DHtmlLayoutServlet public void init(ServletConfig servletConfig) throws ServletException { - ClassLocator.addResourceLocator(new ZkResourceLocator()); - super.init(servletConfig); /** Initialise context for the current thread*/ diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/util/LogEventInterceptor.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/util/LogEventInterceptor.java new file mode 100644 index 0000000000..54052a64eb --- /dev/null +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/util/LogEventInterceptor.java @@ -0,0 +1,49 @@ +/** + * + */ +package org.adempiere.webui.util; + +import org.zkoss.zk.ui.event.Event; +import org.zkoss.zk.ui.util.EventInterceptor; + +/** + * @author hengsin + * + */ +public class LogEventInterceptor implements EventInterceptor { + + /* (non-Javadoc) + * @see org.zkoss.zk.ui.util.EventInterceptor#beforeSendEvent(org.zkoss.zk.ui.event.Event) + */ + @Override + public Event beforeSendEvent(Event event) { +// System.out.println("beforeSendEvent, event="+event.getName()+",target="+event.getTarget()); + return event; + } + + /* (non-Javadoc) + * @see org.zkoss.zk.ui.util.EventInterceptor#beforePostEvent(org.zkoss.zk.ui.event.Event) + */ + @Override + public Event beforePostEvent(Event event) { +// System.out.println("beforePostEvent, event="+event.getName()+",target="+event.getTarget()); + return event; + } + + /* (non-Javadoc) + * @see org.zkoss.zk.ui.util.EventInterceptor#beforeProcessEvent(org.zkoss.zk.ui.event.Event) + */ + @Override + public Event beforeProcessEvent(Event event) { + System.out.println("beforeProcessEvent, event="+event.getName()+",target="+event.getTarget()); + return event; + } + + /* (non-Javadoc) + * @see org.zkoss.zk.ui.util.EventInterceptor#afterProcessEvent(org.zkoss.zk.ui.event.Event) + */ + @Override + public void afterProcessEvent(Event event) { +// System.out.println("afterProcessEvent, event="+event.getName()+",target="+event.getTarget()); + } +} diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/util/ZkResourceLocator.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/util/ZkResourceLocator.java deleted file mode 100644 index c95a1e6c66..0000000000 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/util/ZkResourceLocator.java +++ /dev/null @@ -1,45 +0,0 @@ -/****************************************************************************** - * Copyright (C) 2012 Heng Sin Low * - * Copyright (C) 2012 Trek Global * - * This program is free software; you can redistribute it and/or modify it * - * under the terms version 2 of the GNU General Public License as published * - * by the Free Software Foundation. This program is distributed in the hope * - * that it will be useful, but WITHOUT ANY WARRANTY; without even the implied * - * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * - * See the GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License along * - * with this program; if not, write to the Free Software Foundation, Inc., * - * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * - *****************************************************************************/ -package org.adempiere.webui.util; - -import java.net.URL; - -import org.adempiere.webui.WebUIActivator; -import org.zkoss.util.resource.IResourceLocator; - -/** - * @author hengsin - * - */ -public class ZkResourceLocator implements IResourceLocator { - - private static ZkResourceLocator INSTANCE; - - public ZkResourceLocator() { - INSTANCE = this; - } - - /* (non-Javadoc) - * @see org.zkoss.util.resource.IResourceLocator#getResource(java.lang.String) - */ - @Override - public URL getResource(String name) { - return WebUIActivator.getBundleContext().getBundle().getEntry(name); - } - - public static boolean isStarted() { - return INSTANCE != null; - } - -} diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/FindWindow.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/FindWindow.java index b7bac58731..bf24f89a31 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/FindWindow.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/FindWindow.java @@ -363,7 +363,8 @@ public class FindWindow extends Window implements EventListener, ValueCha Center center = new Center(); layout.appendChild(center); center.appendChild(contentSimple); - center.setFlex(true); + contentSimple.setVflex("1"); + contentSimple.setHflex("1"); South south = new South(); layout.appendChild(south); diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WAccountDialog.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WAccountDialog.java index fe994989dc..dcb6e255d4 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WAccountDialog.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WAccountDialog.java @@ -22,6 +22,7 @@ import java.sql.SQLException; import java.util.logging.Level; import org.adempiere.util.Callback; +import org.adempiere.webui.adwindow.ADTabpanel; import org.adempiere.webui.apps.AEnv; import org.adempiere.webui.component.ConfirmPanel; import org.adempiere.webui.component.Grid; @@ -35,7 +36,6 @@ import org.adempiere.webui.editor.WEditor; import org.adempiere.webui.editor.WebEditorFactory; import org.adempiere.webui.event.ValueChangeEvent; import org.adempiere.webui.event.ValueChangeListener; -import org.adempiere.webui.panel.ADTabpanel; import org.adempiere.webui.panel.StatusBarPanel; import org.adempiere.webui.session.SessionManager; import org.compiere.model.DataStatusEvent; diff --git a/org.adempiere.ui.zk/WEB-INF/zk.xml b/org.adempiere.ui.zk/WEB-INF/zk.xml index 2ba6d1227e..be0e3bf04f 100644 --- a/org.adempiere.ui.zk/WEB-INF/zk.xml +++ b/org.adempiere.ui.zk/WEB-INF/zk.xml @@ -12,6 +12,11 @@ + + + [Optional] Monitor i3-log.conf and register a handler for the specified log-base diff --git a/org.zkoss.zk.library/META-INF/MANIFEST.MF b/org.zkoss.zk.library/META-INF/MANIFEST.MF index 69cd65f071..b7b22bf0c4 100644 --- a/org.zkoss.zk.library/META-INF/MANIFEST.MF +++ b/org.zkoss.zk.library/META-INF/MANIFEST.MF @@ -99,6 +99,7 @@ Import-Package: bsh, org.codehaus.groovy.vmplugin.v5, org.osgi.framework;version="1.3.0", org.osgi.service.component;version="1.1.0" +DynamicImport-Package: metainfo.zk Bundle-ClassPath: ., lib/asm.jar, lib/cglib.jar, @@ -221,7 +222,6 @@ Export-Package: Lib, metainfo.tld, metainfo.xel, metainfo.xml, - metainfo.zel, metainfo.zk, net, net.sf.cglib.asm, diff --git a/org.zkoss.zk.library/src/org/zkoss/util/resource/ClassLocator.java b/org.zkoss.zk.library/src/org/zkoss/util/resource/ClassLocator.java index e854f75a05..50a3e90935 100644 --- a/org.zkoss.zk.library/src/org/zkoss/util/resource/ClassLocator.java +++ b/org.zkoss.zk.library/src/org/zkoss/util/resource/ClassLocator.java @@ -53,19 +53,9 @@ import org.zkoss.idom.input.SAXBuilder; public class ClassLocator implements XMLResourcesLocator { private static final Log log = Log.lookup(ClassLocator.class); - private static List resourceLocators = new ArrayList(); - public ClassLocator() { } - public static synchronized void addResourceLocator(IResourceLocator locator) { - resourceLocators.add(locator); - } - - private static synchronized IResourceLocator[] getResourceLocators() { - return resourceLocators.toArray(new IResourceLocator[0]); - } - //XMLResourcesLocator// public Enumeration getResources(String name) throws IOException { List list = null; @@ -95,15 +85,6 @@ public class ClassLocator implements XMLResourcesLocator { final Enumeration en = ClassLoader.getSystemResources(name); list = Collections.list(en); } - IResourceLocator[] locators = ClassLocator.getResourceLocators(); - if (locators != null && locators.length > 0) { - for (IResourceLocator locator : locators) { - URL url = locator.getResource(name); - if (url != null) { - list.add(url); - } - } - } return Collections.enumeration(list); } public List getDependentXMLResources(String name, String elName, @@ -116,11 +97,6 @@ public class ClassLocator implements XMLResourcesLocator { if (old != null) log.warning("Replicate resource: "+xr.name +"\nOverwrite "+old.url+"\nwith "+xr.url); - else { - if (log.infoable()) { - log.info(xr); - } - } //it is possible if zcommon.jar is placed in both //WEB-INF/lib and shared/lib, i.e., appear twice in the class path //We overwrite because the order is the parent class loader first diff --git a/org.zkoss.zk.library/src/org/zkoss/util/resource/IResourceLocator.java b/org.zkoss.zk.library/src/org/zkoss/util/resource/IResourceLocator.java deleted file mode 100644 index 6ec65055f9..0000000000 --- a/org.zkoss.zk.library/src/org/zkoss/util/resource/IResourceLocator.java +++ /dev/null @@ -1,31 +0,0 @@ -/****************************************************************************** - * Copyright (C) 2012 Heng Sin Low * - * Copyright (C) 2012 Trek Global * - * This program is free software; you can redistribute it and/or modify it * - * under the terms version 2 of the GNU General Public License as published * - * by the Free Software Foundation. This program is distributed in the hope * - * that it will be useful, but WITHOUT ANY WARRANTY; without even the implied * - * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * - * See the GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License along * - * with this program; if not, write to the Free Software Foundation, Inc., * - * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * - *****************************************************************************/ -package org.zkoss.util.resource; - -import java.net.URL; - -/** - * - * @author hengsin - * - */ -public interface IResourceLocator { - - /** - * @param name - * @return resource url - */ - public URL getResource(String name); - -}