IDEMPIERE-352 Zk: Upgrade to release 6.5
This commit is contained in:
parent
f1860fa2ce
commit
638d303322
|
@ -44,7 +44,8 @@ Export-Package: metainfo.zk,
|
||||||
org.adempiere.webui.session,
|
org.adempiere.webui.session,
|
||||||
org.adempiere.webui.theme,
|
org.adempiere.webui.theme,
|
||||||
org.adempiere.webui.util,
|
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",
|
Require-Bundle: org.adempiere.report.jasper;bundle-version="1.0.0",
|
||||||
org.adempiere.base;bundle-version="1.0.0",
|
org.adempiere.base;bundle-version="1.0.0",
|
||||||
org.adempiere.report.jasper.library;bundle-version="1.0.0",
|
org.adempiere.report.jasper.library;bundle-version="1.0.0",
|
||||||
|
|
|
@ -20,6 +20,7 @@ import java.util.regex.Pattern;
|
||||||
import org.zkoss.zk.ui.Component;
|
import org.zkoss.zk.ui.Component;
|
||||||
import org.zkoss.zk.ui.Desktop;
|
import org.zkoss.zk.ui.Desktop;
|
||||||
import org.zkoss.zk.ui.Page;
|
import org.zkoss.zk.ui.Page;
|
||||||
|
import org.zkoss.zk.ui.metainfo.ComponentInfo;
|
||||||
import org.zkoss.zk.ui.sys.IdGenerator;
|
import org.zkoss.zk.ui.sys.IdGenerator;
|
||||||
|
|
||||||
public class AdempiereIdGenerator implements 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";
|
public static final String ZK_COMPONENT_PREFIX_ATTRIBUTE = "zk_component_prefix";
|
||||||
|
|
||||||
@Override
|
@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);
|
String prefix = (String) comp.getAttribute(ZK_COMPONENT_PREFIX_ATTRIBUTE);
|
||||||
if (prefix == null || prefix.length() == 0)
|
if (prefix == null || prefix.length() == 0)
|
||||||
prefix = DEFAULT_ZK_COMP_PREFIX;
|
prefix = DEFAULT_ZK_COMP_PREFIX;
|
||||||
|
|
|
@ -69,7 +69,6 @@ public class WLogin extends AbstractUIPart
|
||||||
Center center = new Center();
|
Center center = new Center();
|
||||||
center.setParent(layout);
|
center.setParent(layout);
|
||||||
center.setBorder("none");
|
center.setBorder("none");
|
||||||
center.setFlex(true);
|
|
||||||
center.setAutoscroll(true);
|
center.setAutoscroll(true);
|
||||||
center.setStyle("border: none; background-color: transparent;");
|
center.setStyle("border: none; background-color: transparent;");
|
||||||
|
|
||||||
|
@ -80,6 +79,8 @@ public class WLogin extends AbstractUIPart
|
||||||
vb.setPack("center");
|
vb.setPack("center");
|
||||||
vb.setAlign("center");
|
vb.setAlign("center");
|
||||||
vb.setStyle("background-color: transparent;");
|
vb.setStyle("background-color: transparent;");
|
||||||
|
vb.setHflex("1");
|
||||||
|
vb.setVflex("1");
|
||||||
|
|
||||||
loginWindow = new LoginWindow(app);
|
loginWindow = new LoginWindow(app);
|
||||||
loginWindow.setParent(vb);
|
loginWindow.setParent(vb);
|
||||||
|
|
|
@ -510,13 +510,14 @@ public class WAcctViewer extends Window implements EventListener
|
||||||
result.appendChild(resultPanel);
|
result.appendChild(resultPanel);
|
||||||
|
|
||||||
Center resultCenter = new Center();
|
Center resultCenter = new Center();
|
||||||
resultCenter.setFlex(true);
|
|
||||||
resultPanel.appendChild(resultCenter);
|
resultPanel.appendChild(resultCenter);
|
||||||
table.setHflex("1");
|
table.setHflex("1");
|
||||||
table.setVflex(true);
|
table.setVflex(true);
|
||||||
table.setHeight("99%");
|
table.setHeight("99%");
|
||||||
table.setStyle("position: absolute;");
|
table.setStyle("position: absolute;");
|
||||||
resultCenter.appendChild(table);
|
resultCenter.appendChild(table);
|
||||||
|
table.setHflex("1");
|
||||||
|
table.setVflex("1");
|
||||||
|
|
||||||
pagingPanel = new South();
|
pagingPanel = new South();
|
||||||
resultPanel.appendChild(pagingPanel);
|
resultPanel.appendChild(pagingPanel);
|
||||||
|
@ -563,17 +564,18 @@ public class WAcctViewer extends Window implements EventListener
|
||||||
|
|
||||||
Center center = new Center();
|
Center center = new Center();
|
||||||
center.setParent(layout);
|
center.setParent(layout);
|
||||||
center.setFlex(true);
|
|
||||||
center.setStyle("background-color: transparent; padding: 2px;");
|
center.setStyle("background-color: transparent; padding: 2px;");
|
||||||
tabbedPane.setParent(center);
|
tabbedPane.setParent(center);
|
||||||
|
tabbedPane.setHflex("1");
|
||||||
|
tabbedPane.setVflex("1");
|
||||||
|
|
||||||
South south = new South();
|
South south = new South();
|
||||||
south.setParent(layout);
|
south.setParent(layout);
|
||||||
south.setFlex(true);
|
|
||||||
south.setStyle("background-color: transparent");
|
south.setStyle("background-color: transparent");
|
||||||
south.setHeight("36px");
|
south.setHeight("36px");
|
||||||
southPanel.setParent(south);
|
southPanel.setParent(south);
|
||||||
southPanel.setVflex("1");
|
southPanel.setVflex("1");
|
||||||
|
southPanel.setHflex("1");
|
||||||
|
|
||||||
this.setTitle(TITLE);
|
this.setTitle(TITLE);
|
||||||
this.setClosable(true);
|
this.setClosable(true);
|
||||||
|
|
|
@ -159,7 +159,8 @@ public class ProcessDialog extends Window implements EventListener<Event>, IProc
|
||||||
center = new Center();
|
center = new Center();
|
||||||
layout.appendChild(center);
|
layout.appendChild(center);
|
||||||
center.appendChild(centerPanel);
|
center.appendChild(centerPanel);
|
||||||
center.setFlex(true);
|
centerPanel.setHflex("1");
|
||||||
|
centerPanel.setVflex("1");
|
||||||
center.setAutoscroll(true);
|
center.setAutoscroll(true);
|
||||||
center.setStyle("border: none");
|
center.setStyle("border: none");
|
||||||
|
|
||||||
|
@ -459,6 +460,8 @@ public class ProcessDialog extends Window implements EventListener<Event>, IProc
|
||||||
messageDiv.setStyle("");
|
messageDiv.setStyle("");
|
||||||
north.setVisible(false);
|
north.setVisible(false);
|
||||||
center.appendChild(messageDiv);
|
center.appendChild(messageDiv);
|
||||||
|
messageDiv.setVflex("1");
|
||||||
|
messageDiv.setHflex("1");
|
||||||
invalidate();
|
invalidate();
|
||||||
|
|
||||||
Clients.response(new AuEcho(this, "onAfterProcess", null));
|
Clients.response(new AuEcho(this, "onAfterProcess", null));
|
||||||
|
|
|
@ -268,9 +268,10 @@ public class WAllocation extends Allocation
|
||||||
center.setStyle("border: none");
|
center.setStyle("border: none");
|
||||||
//
|
//
|
||||||
center = new Center();
|
center = new Center();
|
||||||
center.setFlex(true);
|
|
||||||
mainLayout.appendChild(center);
|
mainLayout.appendChild(center);
|
||||||
center.appendChild(infoPanel);
|
center.appendChild(infoPanel);
|
||||||
|
infoPanel.setHflex("1");
|
||||||
|
infoPanel.setVflex("1");
|
||||||
|
|
||||||
infoPanel.setStyle("border: none");
|
infoPanel.setStyle("border: none");
|
||||||
infoPanel.setWidth("100%");
|
infoPanel.setWidth("100%");
|
||||||
|
@ -284,9 +285,10 @@ public class WAllocation extends Allocation
|
||||||
north.setSplittable(true);
|
north.setSplittable(true);
|
||||||
center = new Center();
|
center = new Center();
|
||||||
center.setStyle("border: none");
|
center.setStyle("border: none");
|
||||||
center.setFlex(true);
|
|
||||||
infoPanel.appendChild(center);
|
infoPanel.appendChild(center);
|
||||||
center.appendChild(invoicePanel);
|
center.appendChild(invoicePanel);
|
||||||
|
invoicePanel.setHflex("1");
|
||||||
|
invoicePanel.setVflex("1");
|
||||||
} // jbInit
|
} // jbInit
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -261,10 +261,11 @@ public class WCharge extends Charge implements IFormController, EventListener
|
||||||
|
|
||||||
Center center = new Center();
|
Center center = new Center();
|
||||||
center.setBorder("none");
|
center.setBorder("none");
|
||||||
center.setFlex(true);
|
|
||||||
center.setAutoscroll(true);
|
center.setAutoscroll(true);
|
||||||
borderlayout.appendChild(center);
|
borderlayout.appendChild(center);
|
||||||
center.appendChild(m_tblData);
|
center.appendChild(m_tblData);
|
||||||
|
m_tblData.setVflex("1");
|
||||||
|
m_tblData.setHflex("1");
|
||||||
|
|
||||||
South south = new South();
|
South south = new South();
|
||||||
south.setBorder("none");
|
south.setBorder("none");
|
||||||
|
|
|
@ -145,9 +145,10 @@ public class WFileImport extends ADForm implements EventListener
|
||||||
layout.appendChild(north);
|
layout.appendChild(north);
|
||||||
north.appendChild(northPanel);
|
north.appendChild(northPanel);
|
||||||
Center center = new Center();
|
Center center = new Center();
|
||||||
center.setFlex(true);
|
|
||||||
layout.appendChild(center);
|
layout.appendChild(center);
|
||||||
center.appendChild(centerPanel);
|
center.appendChild(centerPanel);
|
||||||
|
centerPanel.setVflex("1");
|
||||||
|
centerPanel.setHflex("1");
|
||||||
South south = new South();
|
South south = new South();
|
||||||
layout.appendChild(south);
|
layout.appendChild(south);
|
||||||
south.appendChild(confirmPanel);
|
south.appendChild(confirmPanel);
|
||||||
|
|
|
@ -115,7 +115,8 @@ public class WGenForm extends ADForm implements EventListener, WTableModelListen
|
||||||
center.setStyle("border: none");
|
center.setStyle("border: none");
|
||||||
contentPane.appendChild(center);
|
contentPane.appendChild(center);
|
||||||
center.appendChild(tabbedPane);
|
center.appendChild(tabbedPane);
|
||||||
center.setFlex(true);
|
tabbedPane.setVflex("1");
|
||||||
|
tabbedPane.setHflex("1");
|
||||||
South south = new South();
|
South south = new South();
|
||||||
south.setStyle("border: none");
|
south.setStyle("border: none");
|
||||||
contentPane.appendChild(south);
|
contentPane.appendChild(south);
|
||||||
|
@ -167,7 +168,8 @@ public class WGenForm extends ADForm implements EventListener, WTableModelListen
|
||||||
Center center = new Center();
|
Center center = new Center();
|
||||||
selPanel.appendChild(center);
|
selPanel.appendChild(center);
|
||||||
center.appendChild(miniTable);
|
center.appendChild(miniTable);
|
||||||
center.setFlex(true);
|
miniTable.setVflex("1");
|
||||||
|
miniTable.setHflex("1");
|
||||||
miniTable.setHeight("99%");
|
miniTable.setHeight("99%");
|
||||||
confirmPanelSel.addActionListener(this);
|
confirmPanelSel.addActionListener(this);
|
||||||
//
|
//
|
||||||
|
|
|
@ -272,7 +272,8 @@ public class WMatch extends Match
|
||||||
Center center = new Center();
|
Center center = new Center();
|
||||||
mainLayout.appendChild(center);
|
mainLayout.appendChild(center);
|
||||||
center.appendChild(centerPanel);
|
center.appendChild(centerPanel);
|
||||||
center.setFlex(true);
|
centerPanel.setHflex("1");
|
||||||
|
centerPanel.setVflex("1");
|
||||||
centerLayout.setWidth("100%");
|
centerLayout.setWidth("100%");
|
||||||
centerLayout.setHeight("100%");
|
centerLayout.setHeight("100%");
|
||||||
north = new North();
|
north = new North();
|
||||||
|
@ -298,9 +299,10 @@ public class WMatch extends Match
|
||||||
center = new Center();
|
center = new Center();
|
||||||
centerLayout.appendChild(center);
|
centerLayout.appendChild(center);
|
||||||
center.setStyle("border: none");
|
center.setStyle("border: none");
|
||||||
center.setFlex(false);
|
|
||||||
// center.setHeight("6%");
|
// center.setHeight("6%");
|
||||||
center.appendChild(xPanel);
|
center.appendChild(xPanel);
|
||||||
|
xPanel.setVflex("1");
|
||||||
|
xPanel.setHflex("1");
|
||||||
xPanel.appendChild(sameBPartner);
|
xPanel.appendChild(sameBPartner);
|
||||||
xPanel.appendChild(new Space());
|
xPanel.appendChild(new Space());
|
||||||
xPanel.appendChild(sameProduct);
|
xPanel.appendChild(sameProduct);
|
||||||
|
|
|
@ -251,7 +251,8 @@ public class WSetupWizard extends SetupWizard implements IFormController, EventL
|
||||||
West west = new West();
|
West west = new West();
|
||||||
mainLayout.appendChild(west);
|
mainLayout.appendChild(west);
|
||||||
west.appendChild(wfnodeTree);
|
west.appendChild(wfnodeTree);
|
||||||
west.setFlex(true);
|
wfnodeTree.setVflex("1");
|
||||||
|
wfnodeTree.setHflex("1");
|
||||||
west.setAutoscroll(true);
|
west.setAutoscroll(true);
|
||||||
west.setWidth("30%");
|
west.setWidth("30%");
|
||||||
|
|
||||||
|
|
|
@ -228,7 +228,8 @@ public class WTreeBOM extends TreeBOM implements IFormController, EventListener
|
||||||
mainLayout.appendChild(center);
|
mainLayout.appendChild(center);
|
||||||
center.appendChild(dataPane);
|
center.appendChild(dataPane);
|
||||||
dataPane.appendChild(tableBOM);
|
dataPane.appendChild(tableBOM);
|
||||||
center.setFlex(true);
|
dataPane.setHflex("1");
|
||||||
|
dataPane.setVflex("1");
|
||||||
center.setAutoscroll(true);
|
center.setAutoscroll(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -169,7 +169,8 @@ public class WTreeMaintenance extends TreeMaintenance implements IFormController
|
||||||
Center center = new Center();
|
Center center = new Center();
|
||||||
mainLayout.appendChild(center);
|
mainLayout.appendChild(center);
|
||||||
center.appendChild(centerTree);
|
center.appendChild(centerTree);
|
||||||
center.setFlex(true);
|
centerTree.setVflex("1");
|
||||||
|
centerTree.setHflex("1");
|
||||||
center.setAutoscroll(true);
|
center.setAutoscroll(true);
|
||||||
|
|
||||||
East east = new East();
|
East east = new East();
|
||||||
|
|
|
@ -21,6 +21,7 @@ import java.util.Properties;
|
||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
|
|
||||||
import org.adempiere.webui.LayoutUtils;
|
import org.adempiere.webui.LayoutUtils;
|
||||||
|
import org.adempiere.webui.adwindow.ADTabpanel;
|
||||||
import org.adempiere.webui.apps.AEnv;
|
import org.adempiere.webui.apps.AEnv;
|
||||||
import org.adempiere.webui.component.ConfirmPanel;
|
import org.adempiere.webui.component.ConfirmPanel;
|
||||||
import org.adempiere.webui.component.Grid;
|
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.ValueChangeEvent;
|
||||||
import org.adempiere.webui.event.ValueChangeListener;
|
import org.adempiere.webui.event.ValueChangeListener;
|
||||||
import org.adempiere.webui.panel.ADForm;
|
import org.adempiere.webui.panel.ADForm;
|
||||||
import org.adempiere.webui.panel.ADTabpanel;
|
|
||||||
import org.adempiere.webui.panel.CustomForm;
|
import org.adempiere.webui.panel.CustomForm;
|
||||||
import org.adempiere.webui.panel.IFormController;
|
import org.adempiere.webui.panel.IFormController;
|
||||||
import org.adempiere.webui.panel.StatusBarPanel;
|
import org.adempiere.webui.panel.StatusBarPanel;
|
||||||
|
@ -212,8 +212,9 @@ public class WTrxMaterial extends TrxMaterial
|
||||||
m_gridController.switchRowPresentation();
|
m_gridController.switchRowPresentation();
|
||||||
Center center = new Center();
|
Center center = new Center();
|
||||||
mainLayout.appendChild(center);
|
mainLayout.appendChild(center);
|
||||||
center.setFlex(true);
|
|
||||||
center.appendChild(m_gridController);
|
center.appendChild(m_gridController);
|
||||||
|
m_gridController.setVflex("1");
|
||||||
|
m_gridController.setHflex("1");
|
||||||
} // dynInit
|
} // dynInit
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -108,7 +108,6 @@ public class WFPanel extends Borderlayout implements EventListener
|
||||||
center.appendChild(table);
|
center.appendChild(table);
|
||||||
contentPanel.setStyle("width: 100%; heigh: 100%;");
|
contentPanel.setStyle("width: 100%; heigh: 100%;");
|
||||||
center.setAutoscroll(true);
|
center.setAutoscroll(true);
|
||||||
center.setFlex(false);
|
|
||||||
|
|
||||||
South south = new South();
|
South south = new South();
|
||||||
this.appendChild(south);
|
this.appendChild(south);
|
||||||
|
@ -120,7 +119,8 @@ public class WFPanel extends Borderlayout implements EventListener
|
||||||
south.setSplittable(true);
|
south.setSplittable(true);
|
||||||
south.setCollapsible(true);
|
south.setCollapsible(true);
|
||||||
south.setAutoscroll(true);
|
south.setAutoscroll(true);
|
||||||
south.setFlex(true);
|
div.setVflex("1");
|
||||||
|
div.setHflex("1");
|
||||||
} // jbInit
|
} // jbInit
|
||||||
|
|
||||||
private void createTable() {
|
private void createTable() {
|
||||||
|
|
|
@ -243,7 +243,8 @@ public class WWFActivity extends ADForm implements EventListener
|
||||||
North north = new North();
|
North north = new North();
|
||||||
north.appendChild(listbox);
|
north.appendChild(listbox);
|
||||||
north.setSplittable(true);
|
north.setSplittable(true);
|
||||||
north.setFlex(true);
|
listbox.setVflex("1");
|
||||||
|
listbox.setHflex("1");
|
||||||
north.setHeight("50%");
|
north.setHeight("50%");
|
||||||
layout.appendChild(north);
|
layout.appendChild(north);
|
||||||
north.setStyle("background-color: transparent");
|
north.setStyle("background-color: transparent");
|
||||||
|
@ -253,7 +254,8 @@ public class WWFActivity extends ADForm implements EventListener
|
||||||
center.appendChild(grid);
|
center.appendChild(grid);
|
||||||
layout.appendChild(center);
|
layout.appendChild(center);
|
||||||
center.setStyle("background-color: transparent");
|
center.setStyle("background-color: transparent");
|
||||||
center.setFlex(true);
|
grid.setVflex("1");
|
||||||
|
grid.setHflex("1");
|
||||||
|
|
||||||
South south = new South();
|
South south = new South();
|
||||||
south.appendChild(statusBar);
|
south.appendChild(statusBar);
|
||||||
|
|
|
@ -54,8 +54,7 @@ public class Accordion extends Borderlayout implements EventListener {
|
||||||
north.setCollapsible(false);
|
north.setCollapsible(false);
|
||||||
|
|
||||||
Center center = new Center();
|
Center center = new Center();
|
||||||
center.setFlex(true);
|
appendChild(center);
|
||||||
appendChild(new Center());
|
|
||||||
|
|
||||||
South south = new South();
|
South south = new South();
|
||||||
appendChild(south);
|
appendChild(south);
|
||||||
|
|
|
@ -90,9 +90,10 @@ public class FolderBrowser extends Window implements EventListener
|
||||||
north.appendChild(txtPath);
|
north.appendChild(txtPath);
|
||||||
|
|
||||||
Center center = new Center();
|
Center center = new Center();
|
||||||
center.setFlex(true);
|
|
||||||
contentLayout.appendChild(center);
|
contentLayout.appendChild(center);
|
||||||
center.appendChild(listDir);
|
center.appendChild(listDir);
|
||||||
|
listDir.setVflex("1");
|
||||||
|
listDir.setHflex("1");
|
||||||
|
|
||||||
South south = new South();
|
South south = new South();
|
||||||
south.setStyle("border: none");
|
south.setStyle("border: none");
|
||||||
|
|
|
@ -15,11 +15,11 @@ package org.adempiere.webui.dashboard;
|
||||||
|
|
||||||
import java.util.Enumeration;
|
import java.util.Enumeration;
|
||||||
|
|
||||||
|
import org.adempiere.webui.adwindow.ADWindow;
|
||||||
import org.adempiere.webui.apps.AEnv;
|
import org.adempiere.webui.apps.AEnv;
|
||||||
import org.adempiere.webui.event.TouchEventHelper;
|
import org.adempiere.webui.event.TouchEventHelper;
|
||||||
import org.adempiere.webui.exception.ApplicationException;
|
import org.adempiere.webui.exception.ApplicationException;
|
||||||
import org.adempiere.webui.session.SessionManager;
|
import org.adempiere.webui.session.SessionManager;
|
||||||
import org.adempiere.webui.window.ADWindow;
|
|
||||||
import org.adempiere.webui.window.FDialog;
|
import org.adempiere.webui.window.FDialog;
|
||||||
import org.compiere.model.GridTab;
|
import org.compiere.model.GridTab;
|
||||||
import org.compiere.model.MMenu;
|
import org.compiere.model.MMenu;
|
||||||
|
@ -293,7 +293,7 @@ public class DPFavourites extends DashboardPanel implements EventListener<Event>
|
||||||
if(frame == null)
|
if(frame == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
GridTab tab = frame.getADWindowPanel().getActiveGridTab();
|
GridTab tab = frame.getADWindowContent().getActiveGridTab();
|
||||||
tab.dataNew(false);
|
tab.dataNew(false);
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
|
|
|
@ -131,7 +131,8 @@ public class EventWindow extends Window implements EventListener<Event> {
|
||||||
Center center = new Center();
|
Center center = new Center();
|
||||||
borderlayout.appendChild(center);
|
borderlayout.appendChild(center);
|
||||||
center.appendChild(grid);
|
center.appendChild(grid);
|
||||||
center.setFlex(true);
|
grid.setVflex("1");
|
||||||
|
grid.setHflex("1");
|
||||||
|
|
||||||
South south = new South();
|
South south = new South();
|
||||||
borderlayout.appendChild(south);
|
borderlayout.appendChild(south);
|
||||||
|
|
|
@ -237,7 +237,8 @@ public class RequestWindow extends Window implements EventListener<Event> {
|
||||||
Center center = new Center();
|
Center center = new Center();
|
||||||
borderlayout.appendChild(center);
|
borderlayout.appendChild(center);
|
||||||
center.appendChild(grid);
|
center.appendChild(grid);
|
||||||
center.setFlex(true);
|
grid.setVflex("1");
|
||||||
|
grid.setHflex("1");
|
||||||
|
|
||||||
South south = new South();
|
South south = new South();
|
||||||
borderlayout.appendChild(south);
|
borderlayout.appendChild(south);
|
||||||
|
|
|
@ -34,6 +34,7 @@ import org.adempiere.webui.session.SessionManager;
|
||||||
import org.adempiere.webui.util.IServerPushCallback;
|
import org.adempiere.webui.util.IServerPushCallback;
|
||||||
import org.adempiere.webui.util.ServerPushTemplate;
|
import org.adempiere.webui.util.ServerPushTemplate;
|
||||||
import org.adempiere.webui.util.UserPreference;
|
import org.adempiere.webui.util.UserPreference;
|
||||||
|
import org.compiere.Adempiere;
|
||||||
import org.compiere.util.CLogger;
|
import org.compiere.util.CLogger;
|
||||||
import org.compiere.util.Env;
|
import org.compiere.util.Env;
|
||||||
import org.compiere.util.Msg;
|
import org.compiere.util.Msg;
|
||||||
|
@ -120,7 +121,6 @@ public class DefaultDesktop extends TabbedDesktop implements MenuListener, Seria
|
||||||
w.setSclass("desktop-left-column");
|
w.setSclass("desktop-left-column");
|
||||||
w.setCollapsible(true);
|
w.setCollapsible(true);
|
||||||
w.setSplittable(true);
|
w.setSplittable(true);
|
||||||
w.setFlex(false);
|
|
||||||
w.setHflex("1");
|
w.setHflex("1");
|
||||||
w.addEventListener(Events.ON_OPEN, new EventListener<Event>() {
|
w.addEventListener(Events.ON_OPEN, new EventListener<Event>() {
|
||||||
@Override
|
@Override
|
||||||
|
@ -139,7 +139,6 @@ public class DefaultDesktop extends TabbedDesktop implements MenuListener, Seria
|
||||||
|
|
||||||
windowArea = new Center();
|
windowArea = new Center();
|
||||||
windowArea.setParent(layout);
|
windowArea.setParent(layout);
|
||||||
windowArea.setFlex(true);
|
|
||||||
windowArea.setSclass("desktop-center");
|
windowArea.setSclass("desktop-center");
|
||||||
|
|
||||||
windowContainer.createPart(windowArea);
|
windowContainer.createPart(windowArea);
|
||||||
|
@ -178,8 +177,7 @@ public class DefaultDesktop extends TabbedDesktop implements MenuListener, Seria
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
Thread thread = new Thread(runnable);
|
Adempiere.getThreadPoolExecutor().submit(runnable);
|
||||||
thread.start();
|
|
||||||
|
|
||||||
return layout;
|
return layout;
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,12 +14,12 @@
|
||||||
package org.adempiere.webui.desktop;
|
package org.adempiere.webui.desktop;
|
||||||
|
|
||||||
import org.adempiere.webui.ClientInfo;
|
import org.adempiere.webui.ClientInfo;
|
||||||
|
import org.adempiere.webui.adwindow.ADWindow;
|
||||||
import org.adempiere.webui.apps.ProcessDialog;
|
import org.adempiere.webui.apps.ProcessDialog;
|
||||||
import org.adempiere.webui.component.Window;
|
import org.adempiere.webui.component.Window;
|
||||||
import org.adempiere.webui.panel.ADForm;
|
import org.adempiere.webui.panel.ADForm;
|
||||||
import org.adempiere.webui.part.UIPart;
|
import org.adempiere.webui.part.UIPart;
|
||||||
import org.adempiere.webui.util.ServerPushTemplate;
|
import org.adempiere.webui.util.ServerPushTemplate;
|
||||||
import org.adempiere.webui.window.ADWindow;
|
|
||||||
import org.compiere.model.MQuery;
|
import org.compiere.model.MQuery;
|
||||||
import org.compiere.util.WebDoc;
|
import org.compiere.util.WebDoc;
|
||||||
import org.zkoss.zk.ui.Component;
|
import org.zkoss.zk.ui.Component;
|
||||||
|
|
|
@ -17,6 +17,7 @@ import java.io.Serializable;
|
||||||
import java.util.Properties;
|
import java.util.Properties;
|
||||||
|
|
||||||
import org.adempiere.util.ServerContext;
|
import org.adempiere.util.ServerContext;
|
||||||
|
import org.adempiere.webui.adwindow.ADWindow;
|
||||||
import org.adempiere.webui.apps.BusyDialog;
|
import org.adempiere.webui.apps.BusyDialog;
|
||||||
import org.adempiere.webui.apps.ProcessDialog;
|
import org.adempiere.webui.apps.ProcessDialog;
|
||||||
import org.adempiere.webui.component.Accordion;
|
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.IServerPushCallback;
|
||||||
import org.adempiere.webui.util.ServerPushTemplate;
|
import org.adempiere.webui.util.ServerPushTemplate;
|
||||||
import org.adempiere.webui.util.UserPreference;
|
import org.adempiere.webui.util.UserPreference;
|
||||||
import org.adempiere.webui.window.ADWindow;
|
|
||||||
import org.compiere.util.CLogger;
|
import org.compiere.util.CLogger;
|
||||||
import org.compiere.util.Env;
|
import org.compiere.util.Env;
|
||||||
import org.compiere.util.Msg;
|
import org.compiere.util.Msg;
|
||||||
|
@ -118,7 +118,6 @@ public class NavBar2Desktop extends TabbedDesktop implements MenuListener, Seria
|
||||||
w.setWidth("300px");
|
w.setWidth("300px");
|
||||||
w.setCollapsible(true);
|
w.setCollapsible(true);
|
||||||
w.setSplittable(true);
|
w.setSplittable(true);
|
||||||
w.setFlex(true);
|
|
||||||
w.addEventListener(Events.ON_OPEN, new EventListener<Event>() {
|
w.addEventListener(Events.ON_OPEN, new EventListener<Event>() {
|
||||||
@Override
|
@Override
|
||||||
public void onEvent(Event event) throws Exception {
|
public void onEvent(Event event) throws Exception {
|
||||||
|
@ -136,12 +135,13 @@ public class NavBar2Desktop extends TabbedDesktop implements MenuListener, Seria
|
||||||
|
|
||||||
Center center = new Center();
|
Center center = new Center();
|
||||||
center.setParent(layout);
|
center.setParent(layout);
|
||||||
center.setFlex(true);
|
|
||||||
|
|
||||||
Borderlayout innerLayout = new Borderlayout();
|
Borderlayout innerLayout = new Borderlayout();
|
||||||
innerLayout.setHeight("100%");
|
innerLayout.setHeight("100%");
|
||||||
innerLayout.setWidth("100%");
|
innerLayout.setWidth("100%");
|
||||||
innerLayout.setParent(center);
|
innerLayout.setParent(center);
|
||||||
|
innerLayout.setVflex("1");
|
||||||
|
innerLayout.setHflex("1");
|
||||||
|
|
||||||
West innerW = new West();
|
West innerW = new West();
|
||||||
innerW.setWidth("200px");
|
innerW.setWidth("200px");
|
||||||
|
@ -173,7 +173,6 @@ public class NavBar2Desktop extends TabbedDesktop implements MenuListener, Seria
|
||||||
|
|
||||||
windowArea = new Center();
|
windowArea = new Center();
|
||||||
windowArea.setParent(innerLayout);
|
windowArea.setParent(innerLayout);
|
||||||
windowArea.setFlex(true);
|
|
||||||
|
|
||||||
windowContainer.createPart(windowArea);
|
windowContainer.createPart(windowArea);
|
||||||
|
|
||||||
|
|
|
@ -17,6 +17,7 @@ import java.io.Serializable;
|
||||||
import java.util.Properties;
|
import java.util.Properties;
|
||||||
|
|
||||||
import org.adempiere.util.ServerContext;
|
import org.adempiere.util.ServerContext;
|
||||||
|
import org.adempiere.webui.adwindow.ADWindow;
|
||||||
import org.adempiere.webui.apps.BusyDialog;
|
import org.adempiere.webui.apps.BusyDialog;
|
||||||
import org.adempiere.webui.apps.ProcessDialog;
|
import org.adempiere.webui.apps.ProcessDialog;
|
||||||
import org.adempiere.webui.component.Accordion;
|
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.IServerPushCallback;
|
||||||
import org.adempiere.webui.util.ServerPushTemplate;
|
import org.adempiere.webui.util.ServerPushTemplate;
|
||||||
import org.adempiere.webui.util.UserPreference;
|
import org.adempiere.webui.util.UserPreference;
|
||||||
import org.adempiere.webui.window.ADWindow;
|
|
||||||
import org.compiere.util.CLogger;
|
import org.compiere.util.CLogger;
|
||||||
import org.compiere.util.Env;
|
import org.compiere.util.Env;
|
||||||
import org.compiere.util.Msg;
|
import org.compiere.util.Msg;
|
||||||
|
@ -127,7 +127,6 @@ public class NavBarDesktop extends TabbedDesktop implements MenuListener, Serial
|
||||||
leftRegion.setCollapsible(true);
|
leftRegion.setCollapsible(true);
|
||||||
leftRegion.setSplittable(true);
|
leftRegion.setSplittable(true);
|
||||||
leftRegion.setTitle("Navigation");
|
leftRegion.setTitle("Navigation");
|
||||||
leftRegion.setFlex(true);
|
|
||||||
leftRegion.addEventListener(Events.ON_OPEN, new EventListener<Event>() {
|
leftRegion.addEventListener(Events.ON_OPEN, new EventListener<Event>() {
|
||||||
@Override
|
@Override
|
||||||
public void onEvent(Event event) throws Exception {
|
public void onEvent(Event event) throws Exception {
|
||||||
|
@ -174,7 +173,6 @@ public class NavBarDesktop extends TabbedDesktop implements MenuListener, Serial
|
||||||
|
|
||||||
windowArea = new Center();
|
windowArea = new Center();
|
||||||
windowArea.setParent(layout);
|
windowArea.setParent(layout);
|
||||||
windowArea.setFlex(true);
|
|
||||||
|
|
||||||
windowContainer.createPart(windowArea);
|
windowContainer.createPart(windowArea);
|
||||||
|
|
||||||
|
|
|
@ -15,6 +15,7 @@ package org.adempiere.webui.desktop;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.adempiere.webui.adwindow.ADWindow;
|
||||||
import org.adempiere.webui.apps.ProcessDialog;
|
import org.adempiere.webui.apps.ProcessDialog;
|
||||||
import org.adempiere.webui.apps.wf.WFPanel;
|
import org.adempiere.webui.apps.wf.WFPanel;
|
||||||
import org.adempiere.webui.component.DesktopTabpanel;
|
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.panel.ADForm;
|
||||||
import org.adempiere.webui.part.WindowContainer;
|
import org.adempiere.webui.part.WindowContainer;
|
||||||
import org.adempiere.webui.session.SessionManager;
|
import org.adempiere.webui.session.SessionManager;
|
||||||
import org.adempiere.webui.window.ADWindow;
|
|
||||||
import org.adempiere.webui.window.WTask;
|
import org.adempiere.webui.window.WTask;
|
||||||
import org.compiere.model.MQuery;
|
import org.compiere.model.MQuery;
|
||||||
import org.compiere.model.MTask;
|
import org.compiere.model.MTask;
|
||||||
|
|
|
@ -20,12 +20,12 @@ import java.util.Collection;
|
||||||
import java.util.Enumeration;
|
import java.util.Enumeration;
|
||||||
import java.util.Properties;
|
import java.util.Properties;
|
||||||
|
|
||||||
|
import org.adempiere.webui.adwindow.ADWindow;
|
||||||
import org.adempiere.webui.apps.AEnv;
|
import org.adempiere.webui.apps.AEnv;
|
||||||
import org.adempiere.webui.event.TouchEventHelper;
|
import org.adempiere.webui.event.TouchEventHelper;
|
||||||
import org.adempiere.webui.event.TouchEvents;
|
import org.adempiere.webui.event.TouchEvents;
|
||||||
import org.adempiere.webui.exception.ApplicationException;
|
import org.adempiere.webui.exception.ApplicationException;
|
||||||
import org.adempiere.webui.session.SessionManager;
|
import org.adempiere.webui.session.SessionManager;
|
||||||
import org.adempiere.webui.window.ADWindow;
|
|
||||||
import org.compiere.model.GridTab;
|
import org.compiere.model.GridTab;
|
||||||
import org.compiere.model.MMenu;
|
import org.compiere.model.MMenu;
|
||||||
import org.compiere.model.MQuery;
|
import org.compiere.model.MQuery;
|
||||||
|
@ -306,7 +306,7 @@ public abstract class AbstractMenuPanel extends Panel implements EventListener<E
|
||||||
if(frame == null)
|
if(frame == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
GridTab tab = frame.getADWindowPanel().getActiveGridTab();
|
GridTab tab = frame.getADWindowContent().getActiveGridTab();
|
||||||
tab.dataNew(false);
|
tab.dataNew(false);
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
|
|
|
@ -258,7 +258,8 @@ public class CustomizeGridViewPanel extends Panel
|
||||||
centerPanel.appendChild(div);
|
centerPanel.appendChild(div);
|
||||||
|
|
||||||
center.appendChild(centerPanel);
|
center.appendChild(centerPanel);
|
||||||
center.setFlex(true);
|
centerPanel.setVflex("1");
|
||||||
|
centerPanel.setHflex("1");
|
||||||
layout.appendChild(center);
|
layout.appendChild(center);
|
||||||
|
|
||||||
South south = new South();
|
South south = new South();
|
||||||
|
|
|
@ -109,7 +109,8 @@ public class HeaderPanel extends Panel implements EventListener<Event>
|
||||||
userPanel.setHeight("100%");
|
userPanel.setHeight("100%");
|
||||||
userPanel.setAlign("right");
|
userPanel.setAlign("right");
|
||||||
userPanel.setStyle("position: absolute; text-align:right;");
|
userPanel.setStyle("position: absolute; text-align:right;");
|
||||||
center.setFlex(true);
|
userPanel.setVflex("1");
|
||||||
|
userPanel.setHflex("1");
|
||||||
LayoutUtils.addSclass("desktop-header-right", center);
|
LayoutUtils.addSclass("desktop-header-right", center);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -204,7 +204,6 @@ public class InfoAssetPanel extends InfoPanel implements ValueChangeListener, Ev
|
||||||
|
|
||||||
Center center = new Center();
|
Center center = new Center();
|
||||||
layout.appendChild(center);
|
layout.appendChild(center);
|
||||||
center.setFlex(true);
|
|
||||||
Div div = new Div();
|
Div div = new Div();
|
||||||
div.appendChild(contentPanel);
|
div.appendChild(contentPanel);
|
||||||
if (isLookup())
|
if (isLookup())
|
||||||
|
@ -214,6 +213,8 @@ public class InfoAssetPanel extends InfoPanel implements ValueChangeListener, Ev
|
||||||
contentPanel.setVflex(true);
|
contentPanel.setVflex(true);
|
||||||
div.setStyle("width :100%; height: 100%");
|
div.setStyle("width :100%; height: 100%");
|
||||||
center.appendChild(div);
|
center.appendChild(div);
|
||||||
|
div.setVflex("1");
|
||||||
|
div.setHflex("1");
|
||||||
|
|
||||||
South south = new South();
|
South south = new South();
|
||||||
layout.appendChild(south);
|
layout.appendChild(south);
|
||||||
|
|
|
@ -237,7 +237,6 @@ public class InfoAssignmentPanel extends InfoPanel implements EventListener, Val
|
||||||
|
|
||||||
Center center = new Center();
|
Center center = new Center();
|
||||||
layout.appendChild(center);
|
layout.appendChild(center);
|
||||||
center.setFlex(true);
|
|
||||||
div = new Div();
|
div = new Div();
|
||||||
div.appendChild(contentPanel);
|
div.appendChild(contentPanel);
|
||||||
if (isLookup())
|
if (isLookup())
|
||||||
|
@ -247,6 +246,8 @@ public class InfoAssignmentPanel extends InfoPanel implements EventListener, Val
|
||||||
contentPanel.setVflex(true);
|
contentPanel.setVflex(true);
|
||||||
div.setStyle("width :100%; height: 100%");
|
div.setStyle("width :100%; height: 100%");
|
||||||
center.appendChild(div);
|
center.appendChild(div);
|
||||||
|
div.setVflex("1");
|
||||||
|
div.setHflex("1");
|
||||||
|
|
||||||
South south = new South();
|
South south = new South();
|
||||||
layout.appendChild(south);
|
layout.appendChild(south);
|
||||||
|
|
|
@ -248,7 +248,6 @@ public class InfoBPartnerPanel extends InfoPanel implements EventListener, WTabl
|
||||||
|
|
||||||
Center center = new Center();
|
Center center = new Center();
|
||||||
layout.appendChild(center);
|
layout.appendChild(center);
|
||||||
center.setFlex(true);
|
|
||||||
Div div = new Div();
|
Div div = new Div();
|
||||||
div.appendChild(contentPanel);
|
div.appendChild(contentPanel);
|
||||||
if (isLookup())
|
if (isLookup())
|
||||||
|
@ -258,6 +257,8 @@ public class InfoBPartnerPanel extends InfoPanel implements EventListener, WTabl
|
||||||
contentPanel.setVflex(true);
|
contentPanel.setVflex(true);
|
||||||
div.setStyle("width :100%; height: 100%");
|
div.setStyle("width :100%; height: 100%");
|
||||||
center.appendChild(div);
|
center.appendChild(div);
|
||||||
|
div.setVflex("1");
|
||||||
|
div.setHflex("1");
|
||||||
|
|
||||||
South south = new South();
|
South south = new South();
|
||||||
layout.appendChild(south);
|
layout.appendChild(south);
|
||||||
|
|
|
@ -263,7 +263,6 @@ public class InfoCashLinePanel extends InfoPanel implements ValueChangeListener,
|
||||||
|
|
||||||
Center center = new Center();
|
Center center = new Center();
|
||||||
layout.appendChild(center);
|
layout.appendChild(center);
|
||||||
center.setFlex(true);
|
|
||||||
Div div = new Div();
|
Div div = new Div();
|
||||||
div.appendChild(contentPanel);
|
div.appendChild(contentPanel);
|
||||||
if (isLookup())
|
if (isLookup())
|
||||||
|
@ -273,6 +272,8 @@ public class InfoCashLinePanel extends InfoPanel implements ValueChangeListener,
|
||||||
contentPanel.setVflex(true);
|
contentPanel.setVflex(true);
|
||||||
div.setStyle("width :100%; height: 100%");
|
div.setStyle("width :100%; height: 100%");
|
||||||
center.appendChild(div);
|
center.appendChild(div);
|
||||||
|
div.setVflex("1");
|
||||||
|
div.setHflex("1");
|
||||||
|
|
||||||
South south = new South();
|
South south = new South();
|
||||||
layout.appendChild(south);
|
layout.appendChild(south);
|
||||||
|
|
|
@ -160,7 +160,6 @@ public class InfoGeneralPanel extends InfoPanel implements EventListener
|
||||||
|
|
||||||
Center center = new Center();
|
Center center = new Center();
|
||||||
layout.appendChild(center);
|
layout.appendChild(center);
|
||||||
center.setFlex(true);
|
|
||||||
Div div = new Div();
|
Div div = new Div();
|
||||||
div.appendChild(contentPanel);
|
div.appendChild(contentPanel);
|
||||||
if (isLookup())
|
if (isLookup())
|
||||||
|
@ -170,6 +169,8 @@ public class InfoGeneralPanel extends InfoPanel implements EventListener
|
||||||
contentPanel.setVflex(true);
|
contentPanel.setVflex(true);
|
||||||
div.setStyle("width :100%; height: 100%");
|
div.setStyle("width :100%; height: 100%");
|
||||||
center.appendChild(div);
|
center.appendChild(div);
|
||||||
|
div.setVflex("1");
|
||||||
|
div.setHflex("1");
|
||||||
|
|
||||||
South south = new South();
|
South south = new South();
|
||||||
layout.appendChild(south);
|
layout.appendChild(south);
|
||||||
|
|
|
@ -230,7 +230,6 @@ public class InfoInOutPanel extends InfoPanel implements ValueChangeListener, Ev
|
||||||
|
|
||||||
Center center = new Center();
|
Center center = new Center();
|
||||||
layout.appendChild(center);
|
layout.appendChild(center);
|
||||||
center.setFlex(true);
|
|
||||||
Div div = new Div();
|
Div div = new Div();
|
||||||
div.appendChild(contentPanel);
|
div.appendChild(contentPanel);
|
||||||
if (isLookup())
|
if (isLookup())
|
||||||
|
@ -240,6 +239,8 @@ public class InfoInOutPanel extends InfoPanel implements ValueChangeListener, Ev
|
||||||
contentPanel.setVflex(true);
|
contentPanel.setVflex(true);
|
||||||
div.setStyle("width :100%; height: 100%");
|
div.setStyle("width :100%; height: 100%");
|
||||||
center.appendChild(div);
|
center.appendChild(div);
|
||||||
|
div.setVflex("1");
|
||||||
|
div.setHflex("1");
|
||||||
|
|
||||||
South south = new South();
|
South south = new South();
|
||||||
layout.appendChild(south);
|
layout.appendChild(south);
|
||||||
|
|
|
@ -260,7 +260,6 @@ public class InfoInvoicePanel extends InfoPanel implements ValueChangeListener
|
||||||
|
|
||||||
Center center = new Center();
|
Center center = new Center();
|
||||||
layout.appendChild(center);
|
layout.appendChild(center);
|
||||||
center.setFlex(true);
|
|
||||||
Div div = new Div();
|
Div div = new Div();
|
||||||
div.appendChild(contentPanel);
|
div.appendChild(contentPanel);
|
||||||
if (isLookup())
|
if (isLookup())
|
||||||
|
@ -270,6 +269,8 @@ public class InfoInvoicePanel extends InfoPanel implements ValueChangeListener
|
||||||
contentPanel.setVflex(true);
|
contentPanel.setVflex(true);
|
||||||
div.setStyle("width :100%; height: 100%");
|
div.setStyle("width :100%; height: 100%");
|
||||||
center.appendChild(div);
|
center.appendChild(div);
|
||||||
|
div.setVflex("1");
|
||||||
|
div.setHflex("1");
|
||||||
|
|
||||||
South south = new South();
|
South south = new South();
|
||||||
layout.appendChild(south);
|
layout.appendChild(south);
|
||||||
|
|
|
@ -237,7 +237,6 @@ public class InfoOrderPanel extends InfoPanel implements ValueChangeListener
|
||||||
|
|
||||||
Center center = new Center();
|
Center center = new Center();
|
||||||
layout.appendChild(center);
|
layout.appendChild(center);
|
||||||
center.setFlex(true);
|
|
||||||
Div div = new Div();
|
Div div = new Div();
|
||||||
div.appendChild(contentPanel);
|
div.appendChild(contentPanel);
|
||||||
if (isLookup())
|
if (isLookup())
|
||||||
|
@ -247,6 +246,8 @@ public class InfoOrderPanel extends InfoPanel implements ValueChangeListener
|
||||||
contentPanel.setVflex(true);
|
contentPanel.setVflex(true);
|
||||||
div.setStyle("width :100%; height: 100%");
|
div.setStyle("width :100%; height: 100%");
|
||||||
center.appendChild(div);
|
center.appendChild(div);
|
||||||
|
div.setVflex("1");
|
||||||
|
div.setHflex("1");
|
||||||
|
|
||||||
South south = new South();
|
South south = new South();
|
||||||
layout.appendChild(south);
|
layout.appendChild(south);
|
||||||
|
|
|
@ -135,9 +135,10 @@ public class InfoPAttributeInstancePanel extends Window implements EventListener
|
||||||
|
|
||||||
Center center = new Center();
|
Center center = new Center();
|
||||||
center.setAutoscroll(true);
|
center.setAutoscroll(true);
|
||||||
center.setFlex(true);
|
borderlayout.appendChild(center);
|
||||||
borderlayout.appendChild(center);
|
|
||||||
center.appendChild(m_table);
|
center.appendChild(m_table);
|
||||||
|
m_table.setVflex("1");
|
||||||
|
m_table.setHflex("1");
|
||||||
|
|
||||||
South south = new South();
|
South south = new South();
|
||||||
borderlayout.appendChild(south);
|
borderlayout.appendChild(south);
|
||||||
|
|
|
@ -245,7 +245,6 @@ public class InfoPaymentPanel extends InfoPanel implements ValueChangeListener,
|
||||||
|
|
||||||
Center center = new Center();
|
Center center = new Center();
|
||||||
layout.appendChild(center);
|
layout.appendChild(center);
|
||||||
center.setFlex(true);
|
|
||||||
Div div = new Div();
|
Div div = new Div();
|
||||||
div.appendChild(contentPanel);
|
div.appendChild(contentPanel);
|
||||||
if (isLookup())
|
if (isLookup())
|
||||||
|
@ -255,6 +254,8 @@ public class InfoPaymentPanel extends InfoPanel implements ValueChangeListener,
|
||||||
contentPanel.setVflex(true);
|
contentPanel.setVflex(true);
|
||||||
div.setStyle("width :100%; height: 100%");
|
div.setStyle("width :100%; height: 100%");
|
||||||
center.appendChild(div);
|
center.appendChild(div);
|
||||||
|
div.setVflex("1");
|
||||||
|
div.setHflex("1");
|
||||||
|
|
||||||
South south = new South();
|
South south = new South();
|
||||||
layout.appendChild(south);
|
layout.appendChild(south);
|
||||||
|
|
|
@ -501,20 +501,22 @@ public class InfoProductPanel extends InfoPanel implements EventListener
|
||||||
Center center = new Center();
|
Center center = new Center();
|
||||||
//true will conflict with listbox scrolling
|
//true will conflict with listbox scrolling
|
||||||
center.setAutoscroll(false);
|
center.setAutoscroll(false);
|
||||||
center.setFlex(true);
|
borderlayout.appendChild(center);
|
||||||
borderlayout.appendChild(center);
|
|
||||||
center.appendChild(contentPanel);
|
center.appendChild(contentPanel);
|
||||||
|
contentPanel.setVflex("1");
|
||||||
|
contentPanel.setHflex("1");
|
||||||
South south = new South();
|
South south = new South();
|
||||||
int detailHeight = (height * 25 / 100);
|
int detailHeight = (height * 25 / 100);
|
||||||
south.setHeight(detailHeight + "px");
|
south.setHeight(detailHeight + "px");
|
||||||
south.setCollapsible(true);
|
south.setCollapsible(true);
|
||||||
south.setSplittable(true);
|
south.setSplittable(true);
|
||||||
south.setFlex(true);
|
|
||||||
south.setTitle(Msg.translate(Env.getCtx(), "WarehouseStock"));
|
south.setTitle(Msg.translate(Env.getCtx(), "WarehouseStock"));
|
||||||
south.setTooltiptext(Msg.translate(Env.getCtx(), "WarehouseStock"));
|
south.setTooltiptext(Msg.translate(Env.getCtx(), "WarehouseStock"));
|
||||||
borderlayout.appendChild(south);
|
borderlayout.appendChild(south);
|
||||||
tabbedPane.setSclass("info-product-tabbedpane");
|
tabbedPane.setSclass("info-product-tabbedpane");
|
||||||
south.appendChild(tabbedPane);
|
south.appendChild(tabbedPane);
|
||||||
|
tabbedPane.setVflex("1");
|
||||||
|
tabbedPane.setHflex("1");
|
||||||
|
|
||||||
Borderlayout mainPanel = new Borderlayout();
|
Borderlayout mainPanel = new Borderlayout();
|
||||||
mainPanel.setWidth("100%");
|
mainPanel.setWidth("100%");
|
||||||
|
|
|
@ -190,9 +190,10 @@ public class InvoiceHistory extends Window implements EventListener
|
||||||
Center center = new Center();
|
Center center = new Center();
|
||||||
center.setStyle("border: none");
|
center.setStyle("border: none");
|
||||||
center.setAutoscroll(true);
|
center.setAutoscroll(true);
|
||||||
center.setFlex(true);
|
borderlayout.appendChild(center);
|
||||||
borderlayout.appendChild(center);
|
|
||||||
center.appendChild(tabbox);
|
center.appendChild(tabbox);
|
||||||
|
tabbox.setVflex("1");
|
||||||
|
tabbox.setHflex("1");
|
||||||
|
|
||||||
South south = new South();
|
South south = new South();
|
||||||
south.setStyle("border: none");
|
south.setStyle("border: none");
|
||||||
|
|
|
@ -267,9 +267,10 @@ public class WAttachment extends Window implements EventListener<Event>
|
||||||
|
|
||||||
Center centerPane = new Center();
|
Center centerPane = new Center();
|
||||||
centerPane.setAutoscroll(true);
|
centerPane.setAutoscroll(true);
|
||||||
centerPane.setFlex(true);
|
|
||||||
mainPanel.appendChild(centerPane);
|
mainPanel.appendChild(centerPane);
|
||||||
centerPane.appendChild(previewPanel);
|
centerPane.appendChild(previewPanel);
|
||||||
|
previewPanel.setVflex("1");
|
||||||
|
previewPanel.setHflex("1");
|
||||||
|
|
||||||
South southPane = new South();
|
South southPane = new South();
|
||||||
mainPanel.appendChild(southPane);
|
mainPanel.appendChild(southPane);
|
||||||
|
|
|
@ -24,16 +24,16 @@ import java.util.Set;
|
||||||
import org.adempiere.base.IGridTabExporter;
|
import org.adempiere.base.IGridTabExporter;
|
||||||
import org.adempiere.base.Service;
|
import org.adempiere.base.Service;
|
||||||
import org.adempiere.exceptions.AdempiereException;
|
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.apps.AEnv;
|
||||||
import org.adempiere.webui.component.Checkbox;
|
import org.adempiere.webui.component.Checkbox;
|
||||||
import org.adempiere.webui.component.ConfirmPanel;
|
import org.adempiere.webui.component.ConfirmPanel;
|
||||||
import org.adempiere.webui.component.IADTab;
|
|
||||||
import org.adempiere.webui.component.Label;
|
import org.adempiere.webui.component.Label;
|
||||||
import org.adempiere.webui.component.ListItem;
|
import org.adempiere.webui.component.ListItem;
|
||||||
import org.adempiere.webui.component.Listbox;
|
import org.adempiere.webui.component.Listbox;
|
||||||
import org.adempiere.webui.component.Window;
|
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.adempiere.webui.window.FDialog;
|
||||||
import org.compiere.model.GridTab;
|
import org.compiere.model.GridTab;
|
||||||
import org.compiere.util.Env;
|
import org.compiere.util.Env;
|
||||||
|
@ -53,7 +53,7 @@ import org.zkoss.zul.Vbox;
|
||||||
*/
|
*/
|
||||||
public class ExportAction implements EventListener<Event>
|
public class ExportAction implements EventListener<Event>
|
||||||
{
|
{
|
||||||
private AbstractADWindowPanel panel;
|
private AbstractADWindowContent panel;
|
||||||
|
|
||||||
private Map<String, IGridTabExporter> exporterMap = null;
|
private Map<String, IGridTabExporter> exporterMap = null;
|
||||||
private Map<String, String> extensionMap = null;
|
private Map<String, String> extensionMap = null;
|
||||||
|
@ -66,7 +66,7 @@ public class ExportAction implements EventListener<Event>
|
||||||
/**
|
/**
|
||||||
* @param panel
|
* @param panel
|
||||||
*/
|
*/
|
||||||
public ExportAction(AbstractADWindowPanel panel)
|
public ExportAction(AbstractADWindowContent panel)
|
||||||
{
|
{
|
||||||
this.panel = panel;
|
this.panel = panel;
|
||||||
}
|
}
|
||||||
|
@ -162,7 +162,7 @@ public class ExportAction implements EventListener<Event>
|
||||||
|
|
||||||
boolean currentRowOnly = chkCurrentRow.isSelected();
|
boolean currentRowOnly = chkCurrentRow.isSelected();
|
||||||
File file = File.createTempFile("Export", "."+ext);
|
File file = File.createTempFile("Export", "."+ext);
|
||||||
IADTab adTab = panel.getADTab();
|
IADTabbox adTab = panel.getADTab();
|
||||||
int selected = adTab.getSelectedIndex();
|
int selected = adTab.getSelectedIndex();
|
||||||
int tabLevel = panel.getActiveGridTab().getTabLevel();
|
int tabLevel = panel.getActiveGridTab().getTabLevel();
|
||||||
Set<String> tables = new HashSet<String>();
|
Set<String> tables = new HashSet<String>();
|
||||||
|
|
|
@ -27,6 +27,7 @@ import java.util.logging.Level;
|
||||||
import javax.sql.RowSet;
|
import javax.sql.RowSet;
|
||||||
|
|
||||||
import org.adempiere.webui.LayoutUtils;
|
import org.adempiere.webui.LayoutUtils;
|
||||||
|
import org.adempiere.webui.adwindow.AbstractADWindowContent;
|
||||||
import org.adempiere.webui.apps.WProcessCtl;
|
import org.adempiere.webui.apps.WProcessCtl;
|
||||||
import org.adempiere.webui.component.Checkbox;
|
import org.adempiere.webui.component.Checkbox;
|
||||||
import org.adempiere.webui.component.ConfirmPanel;
|
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.ListItem;
|
||||||
import org.adempiere.webui.component.Listbox;
|
import org.adempiere.webui.component.Listbox;
|
||||||
import org.adempiere.webui.component.Window;
|
import org.adempiere.webui.component.Window;
|
||||||
import org.adempiere.webui.panel.AbstractADWindowPanel;
|
|
||||||
import org.adempiere.webui.window.FDialog;
|
import org.adempiere.webui.window.FDialog;
|
||||||
import org.compiere.model.GridTab;
|
import org.compiere.model.GridTab;
|
||||||
import org.compiere.model.MQuery;
|
import org.compiere.model.MQuery;
|
||||||
|
@ -66,7 +66,7 @@ public class ReportAction implements EventListener<Event>
|
||||||
{
|
{
|
||||||
private static CLogger log = CLogger.getCLogger(ReportAction.class);
|
private static CLogger log = CLogger.getCLogger(ReportAction.class);
|
||||||
|
|
||||||
private AbstractADWindowPanel panel;
|
private AbstractADWindowContent panel;
|
||||||
|
|
||||||
private Window winReport = null;
|
private Window winReport = null;
|
||||||
private ConfirmPanel confirmPanel = new ConfirmPanel(true);
|
private ConfirmPanel confirmPanel = new ConfirmPanel(true);
|
||||||
|
@ -78,7 +78,7 @@ public class ReportAction implements EventListener<Event>
|
||||||
|
|
||||||
private ArrayList<KeyNamePair> printFormatList = new ArrayList<KeyNamePair>();
|
private ArrayList<KeyNamePair> printFormatList = new ArrayList<KeyNamePair>();
|
||||||
|
|
||||||
public ReportAction(AbstractADWindowPanel panel)
|
public ReportAction(AbstractADWindowContent panel)
|
||||||
{
|
{
|
||||||
this.panel = panel;
|
this.panel = panel;
|
||||||
getPrintFormats(panel.getActiveGridTab().getAD_Table_ID());
|
getPrintFormats(panel.getActiveGridTab().getAD_Table_ID());
|
||||||
|
|
|
@ -57,12 +57,16 @@ public class WindowContainer extends AbstractUIPart
|
||||||
tabbox.setSclass("desktop-tabbox");
|
tabbox.setSclass("desktop-tabbox");
|
||||||
|
|
||||||
Tabpanels tabpanels = new Tabpanels();
|
Tabpanels tabpanels = new Tabpanels();
|
||||||
|
tabpanels.setVflex("1");
|
||||||
|
tabpanels.setHflex("1");
|
||||||
Tabs tabs = new Tabs();
|
Tabs tabs = new Tabs();
|
||||||
|
|
||||||
tabbox.appendChild(tabs);
|
tabbox.appendChild(tabs);
|
||||||
tabbox.appendChild(tabpanels);
|
tabbox.appendChild(tabpanels);
|
||||||
tabbox.setWidth("100%");
|
tabbox.setWidth("100%");
|
||||||
tabbox.setHeight("100%");
|
tabbox.setHeight("100%");
|
||||||
|
tabbox.setVflex("1");
|
||||||
|
tabbox.setHflex("1");
|
||||||
|
|
||||||
if (parent != null)
|
if (parent != null)
|
||||||
tabbox.setParent(parent);
|
tabbox.setParent(parent);
|
||||||
|
@ -135,7 +139,9 @@ public class WindowContainer extends AbstractUIPart
|
||||||
}
|
}
|
||||||
tabpanel.setHeight("100%");
|
tabpanel.setHeight("100%");
|
||||||
tabpanel.setWidth("100%");
|
tabpanel.setWidth("100%");
|
||||||
tabpanel.setZclass("desktop-tabpanel");
|
tabpanel.setVflex("1");
|
||||||
|
tabpanel.setHflex("1");
|
||||||
|
tabpanel.setSclass("desktop-tabpanel");
|
||||||
|
|
||||||
if (refTab == null)
|
if (refTab == null)
|
||||||
{
|
{
|
||||||
|
|
|
@ -32,12 +32,10 @@ import javax.servlet.http.HttpServletResponse;
|
||||||
import org.compiere.Adempiere;
|
import org.compiere.Adempiere;
|
||||||
import org.compiere.util.CLogger;
|
import org.compiere.util.CLogger;
|
||||||
import org.compiere.util.Ini;
|
import org.compiere.util.Ini;
|
||||||
import org.zkoss.util.resource.ClassLocator;
|
|
||||||
import org.zkoss.zk.ui.http.DHtmlLayoutServlet;
|
import org.zkoss.zk.ui.http.DHtmlLayoutServlet;
|
||||||
|
|
||||||
import org.adempiere.util.ServerContext;
|
import org.adempiere.util.ServerContext;
|
||||||
import org.adempiere.util.ServerContextURLHandler;
|
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
|
public void init(ServletConfig servletConfig) throws ServletException
|
||||||
{
|
{
|
||||||
ClassLocator.addResourceLocator(new ZkResourceLocator());
|
|
||||||
|
|
||||||
super.init(servletConfig);
|
super.init(servletConfig);
|
||||||
|
|
||||||
/** Initialise context for the current thread*/
|
/** Initialise context for the current thread*/
|
||||||
|
|
|
@ -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());
|
||||||
|
}
|
||||||
|
}
|
|
@ -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;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
|
@ -363,7 +363,8 @@ public class FindWindow extends Window implements EventListener<Event>, ValueCha
|
||||||
Center center = new Center();
|
Center center = new Center();
|
||||||
layout.appendChild(center);
|
layout.appendChild(center);
|
||||||
center.appendChild(contentSimple);
|
center.appendChild(contentSimple);
|
||||||
center.setFlex(true);
|
contentSimple.setVflex("1");
|
||||||
|
contentSimple.setHflex("1");
|
||||||
|
|
||||||
South south = new South();
|
South south = new South();
|
||||||
layout.appendChild(south);
|
layout.appendChild(south);
|
||||||
|
|
|
@ -22,6 +22,7 @@ import java.sql.SQLException;
|
||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
|
|
||||||
import org.adempiere.util.Callback;
|
import org.adempiere.util.Callback;
|
||||||
|
import org.adempiere.webui.adwindow.ADTabpanel;
|
||||||
import org.adempiere.webui.apps.AEnv;
|
import org.adempiere.webui.apps.AEnv;
|
||||||
import org.adempiere.webui.component.ConfirmPanel;
|
import org.adempiere.webui.component.ConfirmPanel;
|
||||||
import org.adempiere.webui.component.Grid;
|
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.editor.WebEditorFactory;
|
||||||
import org.adempiere.webui.event.ValueChangeEvent;
|
import org.adempiere.webui.event.ValueChangeEvent;
|
||||||
import org.adempiere.webui.event.ValueChangeListener;
|
import org.adempiere.webui.event.ValueChangeListener;
|
||||||
import org.adempiere.webui.panel.ADTabpanel;
|
|
||||||
import org.adempiere.webui.panel.StatusBarPanel;
|
import org.adempiere.webui.panel.StatusBarPanel;
|
||||||
import org.adempiere.webui.session.SessionManager;
|
import org.adempiere.webui.session.SessionManager;
|
||||||
import org.compiere.model.DataStatusEvent;
|
import org.compiere.model.DataStatusEvent;
|
||||||
|
|
|
@ -12,6 +12,11 @@
|
||||||
</listener-class>
|
</listener-class>
|
||||||
</listener>
|
</listener>
|
||||||
|
|
||||||
|
<!-- uncomment following to debug event flow -->
|
||||||
|
<!-- listener>
|
||||||
|
<listener-class>org.adempiere.webui.util.LogEventInterceptor</listener-class>
|
||||||
|
</listener -->
|
||||||
|
|
||||||
<log>
|
<log>
|
||||||
<description>[Optional] Monitor i3-log.conf and register a
|
<description>[Optional] Monitor i3-log.conf and register a
|
||||||
handler for the specified log-base</description>
|
handler for the specified log-base</description>
|
||||||
|
|
|
@ -99,6 +99,7 @@ Import-Package: bsh,
|
||||||
org.codehaus.groovy.vmplugin.v5,
|
org.codehaus.groovy.vmplugin.v5,
|
||||||
org.osgi.framework;version="1.3.0",
|
org.osgi.framework;version="1.3.0",
|
||||||
org.osgi.service.component;version="1.1.0"
|
org.osgi.service.component;version="1.1.0"
|
||||||
|
DynamicImport-Package: metainfo.zk
|
||||||
Bundle-ClassPath: .,
|
Bundle-ClassPath: .,
|
||||||
lib/asm.jar,
|
lib/asm.jar,
|
||||||
lib/cglib.jar,
|
lib/cglib.jar,
|
||||||
|
@ -221,7 +222,6 @@ Export-Package: Lib,
|
||||||
metainfo.tld,
|
metainfo.tld,
|
||||||
metainfo.xel,
|
metainfo.xel,
|
||||||
metainfo.xml,
|
metainfo.xml,
|
||||||
metainfo.zel,
|
|
||||||
metainfo.zk,
|
metainfo.zk,
|
||||||
net,
|
net,
|
||||||
net.sf.cglib.asm,
|
net.sf.cglib.asm,
|
||||||
|
|
|
@ -53,19 +53,9 @@ import org.zkoss.idom.input.SAXBuilder;
|
||||||
public class ClassLocator implements XMLResourcesLocator {
|
public class ClassLocator implements XMLResourcesLocator {
|
||||||
private static final Log log = Log.lookup(ClassLocator.class);
|
private static final Log log = Log.lookup(ClassLocator.class);
|
||||||
|
|
||||||
private static List<IResourceLocator> resourceLocators = new ArrayList<IResourceLocator>();
|
|
||||||
|
|
||||||
public ClassLocator() {
|
public ClassLocator() {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static synchronized void addResourceLocator(IResourceLocator locator) {
|
|
||||||
resourceLocators.add(locator);
|
|
||||||
}
|
|
||||||
|
|
||||||
private static synchronized IResourceLocator[] getResourceLocators() {
|
|
||||||
return resourceLocators.toArray(new IResourceLocator[0]);
|
|
||||||
}
|
|
||||||
|
|
||||||
//XMLResourcesLocator//
|
//XMLResourcesLocator//
|
||||||
public Enumeration<URL> getResources(String name) throws IOException {
|
public Enumeration<URL> getResources(String name) throws IOException {
|
||||||
List<URL> list = null;
|
List<URL> list = null;
|
||||||
|
@ -95,15 +85,6 @@ public class ClassLocator implements XMLResourcesLocator {
|
||||||
final Enumeration<URL> en = ClassLoader.getSystemResources(name);
|
final Enumeration<URL> en = ClassLoader.getSystemResources(name);
|
||||||
list = Collections.list(en);
|
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);
|
return Collections.enumeration(list);
|
||||||
}
|
}
|
||||||
public List<Resource> getDependentXMLResources(String name, String elName,
|
public List<Resource> getDependentXMLResources(String name, String elName,
|
||||||
|
@ -116,11 +97,6 @@ public class ClassLocator implements XMLResourcesLocator {
|
||||||
if (old != null)
|
if (old != null)
|
||||||
log.warning("Replicate resource: "+xr.name
|
log.warning("Replicate resource: "+xr.name
|
||||||
+"\nOverwrite "+old.url+"\nwith "+xr.url);
|
+"\nOverwrite "+old.url+"\nwith "+xr.url);
|
||||||
else {
|
|
||||||
if (log.infoable()) {
|
|
||||||
log.info(xr);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
//it is possible if zcommon.jar is placed in both
|
//it is possible if zcommon.jar is placed in both
|
||||||
//WEB-INF/lib and shared/lib, i.e., appear twice in the class path
|
//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
|
//We overwrite because the order is the parent class loader first
|
||||||
|
|
|
@ -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);
|
|
||||||
|
|
||||||
}
|
|
Loading…
Reference in New Issue