IDEMPIERE-142 Upgrade web client to Zk 6.0 CE

This commit is contained in:
Heng Sin Low 2012-02-28 01:08:14 +08:00
parent 108b3527a5
commit edd1a6f2bd
123 changed files with 1490 additions and 1342 deletions

View File

@ -97,4 +97,10 @@ syntax: regexp
^work/.*$ ^work/.*$
syntax: regexp syntax: regexp
swingclient.product .* swingclient.product .*
syntax: regexp
^org\.zkoss\.zk\.library/bin$
syntax: regexp
\.class$
syntax: regexp
\.class$

View File

@ -32,7 +32,7 @@ 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",
org.adempiere.ui;bundle-version="1.0.0", org.adempiere.ui;bundle-version="1.0.0",
org.zkoss.zk.library;bundle-version="3.6.3" org.zkoss.zk.library;bundle-version="6.0.0"
Bundle-RequiredExecutionEnvironment: JavaSE-1.6 Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Eclipse-ExtensibleAPI: true Eclipse-ExtensibleAPI: true
Import-Package: javax.servlet, Import-Package: javax.servlet,

View File

@ -43,7 +43,6 @@ import org.compiere.model.MUser;
import org.compiere.util.CLogger; import org.compiere.util.CLogger;
import org.compiere.util.Env; import org.compiere.util.Env;
import org.compiere.util.Language; import org.compiere.util.Language;
import org.zkoss.zk.au.Command;
import org.zkoss.zk.ui.Component; import org.zkoss.zk.ui.Component;
import org.zkoss.zk.ui.Executions; import org.zkoss.zk.ui.Executions;
import org.zkoss.zk.ui.Page; import org.zkoss.zk.ui.Page;
@ -122,6 +121,10 @@ public class AdempiereWebUI extends Window implements EventListener, IWebClient
{ {
loginCompleted(); loginCompleted();
} }
Executions.getCurrent().getDesktop().addListener(new DrillCommand());
Executions.getCurrent().getDesktop().addListener(new TokenCommand());
Executions.getCurrent().getDesktop().addListener(new ZoomCommand());
} }
public void onOk() public void onOk()
@ -361,13 +364,5 @@ public class AdempiereWebUI extends Window implements EventListener, IWebClient
*/ */
public UserPreference getUserPreference() { public UserPreference getUserPreference() {
return userPreference; return userPreference;
} }
//global command
static {
new ZoomCommand("onZoom", Command.IGNORE_OLD_EQUIV);
new DrillCommand("onDrillAcross", Command.IGNORE_OLD_EQUIV);
new DrillCommand("onDrillDown", Command.IGNORE_OLD_EQUIV);
new TokenCommand(TokenEvent.ON_USER_TOKEN, Command.IGNORE_OLD_EQUIV);
}
} }

View File

@ -16,6 +16,7 @@
*****************************************************************************/ *****************************************************************************/
package org.adempiere.webui; package org.adempiere.webui;
import java.io.Serializable;
import java.util.TimeZone; import java.util.TimeZone;
/** /**
@ -23,7 +24,12 @@ import java.util.TimeZone;
* @author Low Heng Sin * @author Low Heng Sin
* *
*/ */
public class ClientInfo { public class ClientInfo implements Serializable {
/**
*
*/
private static final long serialVersionUID = -713195891415378500L;
public int colorDepth; public int colorDepth;
public int desktopWidth; public int desktopWidth;
public int desktopHeight; public int desktopHeight;

View File

@ -17,7 +17,7 @@ import org.zkoss.zk.au.out.AuScript;
import org.zkoss.zk.ui.Component; import org.zkoss.zk.ui.Component;
import org.zkoss.zk.ui.HtmlBasedComponent; import org.zkoss.zk.ui.HtmlBasedComponent;
import org.zkoss.zk.ui.util.Clients; import org.zkoss.zk.ui.util.Clients;
import org.zkoss.zkex.zul.Borderlayout; import org.zkoss.zul.Borderlayout;
import org.zkoss.zul.Div; import org.zkoss.zul.Div;
/** /**

View File

@ -24,12 +24,12 @@ import org.zkoss.zk.ui.Component;
import org.zkoss.zk.ui.Executions; import org.zkoss.zk.ui.Executions;
import org.zkoss.zk.ui.UiException; import org.zkoss.zk.ui.UiException;
import org.zkoss.zk.ui.metainfo.PageDefinition; import org.zkoss.zk.ui.metainfo.PageDefinition;
import org.zkoss.zkex.zul.Borderlayout; import org.zkoss.zul.Borderlayout;
import org.zkoss.zkex.zul.Center; import org.zkoss.zul.Center;
import org.zkoss.zkex.zul.East; import org.zkoss.zul.East;
import org.zkoss.zkex.zul.North; import org.zkoss.zul.North;
import org.zkoss.zkex.zul.South; import org.zkoss.zul.South;
import org.zkoss.zkex.zul.West; import org.zkoss.zul.West;
import org.zkoss.zul.Div; import org.zkoss.zul.Div;
import org.zkoss.zul.Vbox; import org.zkoss.zul.Vbox;
import org.zkoss.zul.Window; import org.zkoss.zul.Window;

View File

@ -61,9 +61,9 @@ import org.compiere.util.ValueNamePair;
import org.zkoss.zk.ui.event.Event; import org.zkoss.zk.ui.event.Event;
import org.zkoss.zk.ui.event.EventListener; import org.zkoss.zk.ui.event.EventListener;
import org.zkoss.zk.ui.event.Events; import org.zkoss.zk.ui.event.Events;
import org.zkoss.zkex.zul.Borderlayout; import org.zkoss.zul.Borderlayout;
import org.zkoss.zkex.zul.Center; import org.zkoss.zul.Center;
import org.zkoss.zkex.zul.South; import org.zkoss.zul.South;
import org.zkoss.zul.Caption; import org.zkoss.zul.Caption;
import org.zkoss.zul.Filedownload; import org.zkoss.zul.Filedownload;
import org.zkoss.zul.Groupbox; import org.zkoss.zul.Groupbox;
@ -520,7 +520,7 @@ public class WAcctViewer extends Window implements EventListener
southPanel.setWidths("80%, 20%"); southPanel.setWidths("80%, 20%");
Grid southLeftGrid = new Grid(); Grid southLeftGrid = new Grid();
southLeftGrid.setInnerWidth(""); southLeftGrid.setInnerWidth("");
southLeftGrid.setInnerHeight(""); southLeftGrid.setHeight("");
southLeftGrid.makeNoStrip(); southLeftGrid.makeNoStrip();
southLeftGrid.setStyle("border: none; margin: none"); southLeftGrid.setStyle("border: none; margin: none");
southPanel.appendChild(southLeftGrid); southPanel.appendChild(southLeftGrid);

View File

@ -39,10 +39,10 @@ import org.zkoss.zk.ui.event.Event;
import org.zkoss.zk.ui.event.EventListener; import org.zkoss.zk.ui.event.EventListener;
import org.zkoss.zk.ui.event.Events; import org.zkoss.zk.ui.event.Events;
import org.zkoss.zk.ui.util.Clients; import org.zkoss.zk.ui.util.Clients;
import org.zkoss.zkex.zul.Borderlayout; import org.zkoss.zul.Borderlayout;
import org.zkoss.zkex.zul.Center; import org.zkoss.zul.Center;
import org.zkoss.zkex.zul.North; import org.zkoss.zul.North;
import org.zkoss.zkex.zul.South; import org.zkoss.zul.South;
import org.zkoss.zul.Div; import org.zkoss.zul.Div;
import org.zkoss.zul.Hbox; import org.zkoss.zul.Hbox;
import org.zkoss.zul.Html; import org.zkoss.zul.Html;

View File

@ -309,7 +309,7 @@ public class ProcessModalDialog extends Window implements EventListener, IProces
if (m_processMonitor != null) { if (m_processMonitor != null) {
m_processMonitor.lockUI(m_pi); m_processMonitor.lockUI(m_pi);
Clients.showBusy(null, false); Clients.clearBusy();
} }
lockUI(m_pi); lockUI(m_pi);

View File

@ -53,10 +53,10 @@ import org.compiere.util.Msg;
import org.compiere.util.Trx; import org.compiere.util.Trx;
import org.zkoss.zk.ui.event.Event; import org.zkoss.zk.ui.event.Event;
import org.zkoss.zk.ui.event.EventListener; import org.zkoss.zk.ui.event.EventListener;
import org.zkoss.zkex.zul.Borderlayout; import org.zkoss.zul.Borderlayout;
import org.zkoss.zkex.zul.Center; import org.zkoss.zul.Center;
import org.zkoss.zkex.zul.North; import org.zkoss.zul.North;
import org.zkoss.zkex.zul.South; import org.zkoss.zul.South;
import org.zkoss.zul.Separator; import org.zkoss.zul.Separator;
import org.zkoss.zul.Space; import org.zkoss.zul.Space;

View File

@ -49,10 +49,10 @@ import org.zkoss.zk.ui.WrongValueException;
import org.zkoss.zk.ui.event.Event; import org.zkoss.zk.ui.event.Event;
import org.zkoss.zk.ui.event.EventListener; import org.zkoss.zk.ui.event.EventListener;
import org.zkoss.zk.ui.event.Events; import org.zkoss.zk.ui.event.Events;
import org.zkoss.zkex.zul.Borderlayout; import org.zkoss.zul.Borderlayout;
import org.zkoss.zkex.zul.Center; import org.zkoss.zul.Center;
import org.zkoss.zkex.zul.North; import org.zkoss.zul.North;
import org.zkoss.zkex.zul.South; import org.zkoss.zul.South;
import org.zkoss.zul.Separator; import org.zkoss.zul.Separator;
/** /**

View File

@ -44,8 +44,8 @@ import org.compiere.util.KeyNamePair;
import org.compiere.util.Msg; import org.compiere.util.Msg;
import org.zkoss.zk.ui.event.Event; import org.zkoss.zk.ui.event.Event;
import org.zkoss.zk.ui.event.EventListener; import org.zkoss.zk.ui.event.EventListener;
import org.zkoss.zkex.zul.Borderlayout; import org.zkoss.zul.Borderlayout;
import org.zkoss.zkex.zul.Center; import org.zkoss.zul.Center;
import org.zkoss.zul.Space; import org.zkoss.zul.Space;
public class WCreateFromInvoiceUI extends CreateFromInvoice implements EventListener, ValueChangeListener public class WCreateFromInvoiceUI extends CreateFromInvoice implements EventListener, ValueChangeListener

View File

@ -36,8 +36,8 @@ import org.compiere.util.CLogger;
import org.compiere.util.DisplayType; import org.compiere.util.DisplayType;
import org.compiere.util.Env; import org.compiere.util.Env;
import org.compiere.util.Msg; import org.compiere.util.Msg;
import org.zkoss.zkex.zul.Borderlayout; import org.zkoss.zul.Borderlayout;
import org.zkoss.zkex.zul.Center; import org.zkoss.zul.Center;
public class WCreateFromRMAUI extends CreateFromRMA implements ValueChangeListener public class WCreateFromRMAUI extends CreateFromRMA implements ValueChangeListener
{ {

View File

@ -53,8 +53,8 @@ import org.compiere.util.Msg;
import org.zkoss.zk.ui.event.Event; import org.zkoss.zk.ui.event.Event;
import org.zkoss.zk.ui.event.EventListener; import org.zkoss.zk.ui.event.EventListener;
import org.zkoss.zk.ui.event.Events; import org.zkoss.zk.ui.event.Events;
import org.zkoss.zkex.zul.Borderlayout; import org.zkoss.zul.Borderlayout;
import org.zkoss.zkex.zul.Center; import org.zkoss.zul.Center;
import org.zkoss.zul.Space; import org.zkoss.zul.Space;
public class WCreateFromShipmentUI extends CreateFromShipment implements EventListener, ValueChangeListener public class WCreateFromShipmentUI extends CreateFromShipment implements EventListener, ValueChangeListener

View File

@ -51,8 +51,8 @@ import org.compiere.util.Msg;
import org.zkoss.zk.ui.event.Event; import org.zkoss.zk.ui.event.Event;
import org.zkoss.zk.ui.event.EventListener; import org.zkoss.zk.ui.event.EventListener;
import org.zkoss.zk.ui.event.Events; import org.zkoss.zk.ui.event.Events;
import org.zkoss.zkex.zul.Borderlayout; import org.zkoss.zul.Borderlayout;
import org.zkoss.zkex.zul.Center; import org.zkoss.zul.Center;
import org.zkoss.zul.Hbox; import org.zkoss.zul.Hbox;
public class WCreateFromStatementUI extends CreateFromStatement implements EventListener public class WCreateFromStatementUI extends CreateFromStatement implements EventListener

View File

@ -30,10 +30,10 @@ import org.compiere.util.Trx;
import org.compiere.util.TrxRunnable; import org.compiere.util.TrxRunnable;
import org.zkoss.zk.ui.event.Event; import org.zkoss.zk.ui.event.Event;
import org.zkoss.zk.ui.event.EventListener; import org.zkoss.zk.ui.event.EventListener;
import org.zkoss.zkex.zul.Borderlayout; import org.zkoss.zul.Borderlayout;
import org.zkoss.zkex.zul.Center; import org.zkoss.zul.Center;
import org.zkoss.zkex.zul.North; import org.zkoss.zul.North;
import org.zkoss.zkex.zul.South; import org.zkoss.zul.South;
import org.zkoss.zul.Separator; import org.zkoss.zul.Separator;
public class WCreateFromWindow extends Window implements EventListener, WTableModelListener public class WCreateFromWindow extends Window implements EventListener, WTableModelListener

View File

@ -53,10 +53,10 @@ import org.zkoss.util.media.Media;
import org.zkoss.zk.ui.event.Event; import org.zkoss.zk.ui.event.Event;
import org.zkoss.zk.ui.event.EventListener; import org.zkoss.zk.ui.event.EventListener;
import org.zkoss.zk.ui.event.Events; import org.zkoss.zk.ui.event.Events;
import org.zkoss.zkex.zul.Borderlayout; import org.zkoss.zul.Borderlayout;
import org.zkoss.zkex.zul.Center; import org.zkoss.zul.Center;
import org.zkoss.zkex.zul.North; import org.zkoss.zul.North;
import org.zkoss.zkex.zul.South; import org.zkoss.zul.South;
import org.zkoss.zul.Div; import org.zkoss.zul.Div;
import org.zkoss.zul.Fileupload; import org.zkoss.zul.Fileupload;
import org.zkoss.zul.Hbox; import org.zkoss.zul.Hbox;
@ -321,14 +321,7 @@ public class WFileImport extends ADForm implements EventListener
{ {
Media media = null; Media media = null;
try media = Fileupload.get();
{
media = Fileupload.get();
}
catch (InterruptedException e)
{
e.printStackTrace();
}
if (media == null) if (media == null)
return; return;

View File

@ -57,10 +57,10 @@ import org.zkoss.zk.ui.event.Event;
import org.zkoss.zk.ui.event.EventListener; import org.zkoss.zk.ui.event.EventListener;
import org.zkoss.zk.ui.event.Events; import org.zkoss.zk.ui.event.Events;
import org.zkoss.zk.ui.util.Clients; import org.zkoss.zk.ui.util.Clients;
import org.zkoss.zkex.zul.Borderlayout; import org.zkoss.zul.Borderlayout;
import org.zkoss.zkex.zul.Center; import org.zkoss.zul.Center;
import org.zkoss.zkex.zul.North; import org.zkoss.zul.North;
import org.zkoss.zkex.zul.South; import org.zkoss.zul.South;
import org.zkoss.zul.Div; import org.zkoss.zul.Div;
import org.zkoss.zul.Html; import org.zkoss.zul.Html;
@ -206,7 +206,7 @@ public class WGenForm extends ADForm implements EventListener, WTableModelListen
public void postQueryEvent() public void postQueryEvent()
{ {
Clients.showBusy(Msg.getMsg(Env.getCtx(), "Processing"), true); Clients.showBusy(Msg.getMsg(Env.getCtx(), "Processing"));
Events.echoEvent("onExecuteQuery", this, null); Events.echoEvent("onExecuteQuery", this, null);
} }
@ -221,7 +221,7 @@ public class WGenForm extends ADForm implements EventListener, WTableModelListen
} }
finally finally
{ {
Clients.showBusy(null, false); Clients.clearBusy();
} }
} }
@ -341,7 +341,7 @@ public class WGenForm extends ADForm implements EventListener, WTableModelListen
// OK to print // OK to print
if (FDialog.ask(getWindowNo(), this, genForm.getAskPrintMsg())) if (FDialog.ask(getWindowNo(), this, genForm.getAskPrintMsg()))
{ {
Clients.showBusy("Processing...", true); Clients.showBusy("Processing...");
Clients.response(new AuEcho(this, "onPrint", null)); Clients.response(new AuEcho(this, "onPrint", null));
} // OK to print } // OK to print
} }
@ -378,14 +378,14 @@ public class WGenForm extends ADForm implements EventListener, WTableModelListen
File outFile = File.createTempFile(genForm.getClass().getName(), ".pdf"); File outFile = File.createTempFile(genForm.getClass().getName(), ".pdf");
AEnv.mergePdf(pdfList, outFile); AEnv.mergePdf(pdfList, outFile);
Clients.showBusy(null, false); Clients.clearBusy();
Window win = new SimplePDFViewer(getFormName(), new FileInputStream(outFile)); Window win = new SimplePDFViewer(getFormName(), new FileInputStream(outFile));
SessionManager.getAppDesktop().showWindow(win, "center"); SessionManager.getAppDesktop().showWindow(win, "center");
} catch (Exception e) { } catch (Exception e) {
log.log(Level.SEVERE, e.getLocalizedMessage(), e); log.log(Level.SEVERE, e.getLocalizedMessage(), e);
} }
} else if (pdfList.size() > 0) { } else if (pdfList.size() > 0) {
Clients.showBusy(null, false); Clients.clearBusy();
try { try {
Window win = new SimplePDFViewer(getFormName(), new FileInputStream(pdfList.get(0))); Window win = new SimplePDFViewer(getFormName(), new FileInputStream(pdfList.get(0)));
SessionManager.getAppDesktop().showWindow(win, "center"); SessionManager.getAppDesktop().showWindow(win, "center");

View File

@ -56,10 +56,10 @@ import org.compiere.util.Msg;
import org.zkoss.zk.ui.event.Event; import org.zkoss.zk.ui.event.Event;
import org.zkoss.zk.ui.event.EventListener; import org.zkoss.zk.ui.event.EventListener;
import org.zkoss.zk.ui.event.Events; import org.zkoss.zk.ui.event.Events;
import org.zkoss.zkex.zul.Borderlayout; import org.zkoss.zul.Borderlayout;
import org.zkoss.zkex.zul.Center; import org.zkoss.zul.Center;
import org.zkoss.zkex.zul.North; import org.zkoss.zul.North;
import org.zkoss.zkex.zul.South; import org.zkoss.zul.South;
import org.zkoss.zul.Separator; import org.zkoss.zul.Separator;
import org.zkoss.zul.Space; import org.zkoss.zul.Space;

View File

@ -43,9 +43,9 @@ import org.zkoss.zk.au.out.AuEcho;
import org.zkoss.zk.ui.event.Event; import org.zkoss.zk.ui.event.Event;
import org.zkoss.zk.ui.event.EventListener; import org.zkoss.zk.ui.event.EventListener;
import org.zkoss.zk.ui.util.Clients; import org.zkoss.zk.ui.util.Clients;
import org.zkoss.zkex.zul.Borderlayout; import org.zkoss.zul.Borderlayout;
import org.zkoss.zkex.zul.Center; import org.zkoss.zul.Center;
import org.zkoss.zkex.zul.South; import org.zkoss.zul.South;
/** /**
* Merge Dialog. * Merge Dialog.
@ -265,7 +265,7 @@ public class WMerge extends Merge implements IFormController, EventListener
m_success = merge (columnName, from_ID, to_ID); m_success = merge (columnName, from_ID, to_ID);
postMerge(columnName, to_ID); postMerge(columnName, to_ID);
} finally{ } finally{
Clients.showBusy(null, false); Clients.clearBusy();
Clients.response(new AuEcho(form, "onAfterProcess", null)); Clients.response(new AuEcho(form, "onAfterProcess", null));
} }
} }

View File

@ -58,9 +58,9 @@ import org.compiere.util.PaymentExport;
import org.compiere.util.ValueNamePair; import org.compiere.util.ValueNamePair;
import org.zkoss.zk.ui.event.Event; import org.zkoss.zk.ui.event.Event;
import org.zkoss.zk.ui.event.EventListener; import org.zkoss.zk.ui.event.EventListener;
import org.zkoss.zkex.zul.Borderlayout; import org.zkoss.zul.Borderlayout;
import org.zkoss.zkex.zul.Center; import org.zkoss.zul.Center;
import org.zkoss.zkex.zul.South; import org.zkoss.zul.South;
import org.zkoss.zul.Filedownload; import org.zkoss.zul.Filedownload;
/** /**

View File

@ -56,10 +56,10 @@ import org.zkoss.zk.ui.SuspendNotAllowedException;
import org.zkoss.zk.ui.event.Event; import org.zkoss.zk.ui.event.Event;
import org.zkoss.zk.ui.event.EventListener; import org.zkoss.zk.ui.event.EventListener;
import org.zkoss.zk.ui.util.Clients; import org.zkoss.zk.ui.util.Clients;
import org.zkoss.zkex.zul.Borderlayout; import org.zkoss.zul.Borderlayout;
import org.zkoss.zkex.zul.Center; import org.zkoss.zul.Center;
import org.zkoss.zkex.zul.North; import org.zkoss.zul.North;
import org.zkoss.zkex.zul.South; import org.zkoss.zul.South;
import org.zkoss.zul.Separator; import org.zkoss.zul.Separator;
import org.zkoss.zul.Space; import org.zkoss.zul.Space;
@ -388,8 +388,6 @@ public class WPaySelect extends PaySelect
dialog.doModal(); dialog.doModal();
} catch (SuspendNotAllowedException e) { } catch (SuspendNotAllowedException e) {
log.log(Level.SEVERE, e.getLocalizedMessage(), e); log.log(Level.SEVERE, e.getLocalizedMessage(), e);
} catch (InterruptedException e) {
log.log(Level.SEVERE, e.getLocalizedMessage(), e);
} }
} }
} // generatePaySelect } // generatePaySelect
@ -402,7 +400,7 @@ public class WPaySelect extends PaySelect
{ {
if (m_isLock) return; if (m_isLock) return;
m_isLock = true; m_isLock = true;
Clients.showBusy(null, true); Clients.showBusy(null);
} // lockUI } // lockUI
/** /**
@ -414,7 +412,7 @@ public class WPaySelect extends PaySelect
if (!m_isLock) return; if (!m_isLock) return;
m_isLock = false; m_isLock = false;
m_pi = pi; m_pi = pi;
Clients.showBusy(null, false); Clients.clearBusy();
//TODO: The response returned is always Cancel //TODO: The response returned is always Cancel
// if (!FDialog.ask(0, form, "VPaySelectPrint?", "(" + m_pi.getSummary() + ")")) // if (!FDialog.ask(0, form, "VPaySelectPrint?", "(" + m_pi.getSummary() + ")"))

View File

@ -72,10 +72,10 @@ import org.zkoss.zk.au.out.AuEcho;
import org.zkoss.zk.ui.event.Event; import org.zkoss.zk.ui.event.Event;
import org.zkoss.zk.ui.event.EventListener; import org.zkoss.zk.ui.event.EventListener;
import org.zkoss.zk.ui.util.Clients; import org.zkoss.zk.ui.util.Clients;
import org.zkoss.zkex.zul.Borderlayout; import org.zkoss.zul.Borderlayout;
import org.zkoss.zkex.zul.Center; import org.zkoss.zul.Center;
import org.zkoss.zkex.zul.North; import org.zkoss.zul.North;
import org.zkoss.zkex.zul.South; import org.zkoss.zul.South;
import org.zkoss.zul.Space; import org.zkoss.zul.Space;
/** /**

View File

@ -41,12 +41,12 @@ import org.compiere.util.Msg;
import org.zkoss.zk.ui.event.Event; import org.zkoss.zk.ui.event.Event;
import org.zkoss.zk.ui.event.EventListener; import org.zkoss.zk.ui.event.EventListener;
import org.zkoss.zk.ui.event.Events; import org.zkoss.zk.ui.event.Events;
import org.zkoss.zkex.zul.Borderlayout; import org.zkoss.zul.Borderlayout;
import org.zkoss.zkex.zul.Center; import org.zkoss.zul.Center;
import org.zkoss.zkex.zul.East; import org.zkoss.zul.East;
import org.zkoss.zkex.zul.North; import org.zkoss.zul.North;
import org.zkoss.zul.ListModel; import org.zkoss.zul.ListModel;
import org.zkoss.zul.SimpleTreeNode; import org.zkoss.zul.DefaultTreeNode;
import org.zkoss.zul.Space; import org.zkoss.zul.Space;
import org.zkoss.zul.Splitter; import org.zkoss.zul.Splitter;
import org.zkoss.zul.Tree; import org.zkoss.zul.Tree;
@ -300,9 +300,9 @@ public class WTreeMaintenance extends TreeMaintenance implements IFormController
if (selected != null) // allow add if not in tree if (selected != null) // allow add if not in tree
{ {
SimpleTreeModel tm = (SimpleTreeModel) centerTree.getModel(); SimpleTreeModel tm = (SimpleTreeModel) centerTree.getModel();
SimpleTreeNode stn = tm.find(tm.getRoot(), selected.id); DefaultTreeNode stn = tm.find(tm.getRoot(), selected.id);
if (stn != null) { if (stn != null) {
int[] path = tm.getPath(tm.getRoot(), stn); int[] path = tm.getPath(stn);
Treeitem ti = centerTree.renderItemByPath(path); Treeitem ti = centerTree.renderItemByPath(path);
ti.setSelected(true); ti.setSelected(true);
} }
@ -317,7 +317,7 @@ public class WTreeMaintenance extends TreeMaintenance implements IFormController
private void onTreeSelection (Event e) private void onTreeSelection (Event e)
{ {
Treeitem ti = centerTree.getSelectedItem(); Treeitem ti = centerTree.getSelectedItem();
SimpleTreeNode stn = (SimpleTreeNode) ti.getValue(); DefaultTreeNode stn = (DefaultTreeNode) ti.getValue();
MTreeNode tn = (MTreeNode)stn.getData(); MTreeNode tn = (MTreeNode)stn.getData();
log.info(tn.toString()); log.info(tn.toString());
if (tn == null) if (tn == null)
@ -344,17 +344,17 @@ public class WTreeMaintenance extends TreeMaintenance implements IFormController
if (item != null) if (item != null)
{ {
SimpleTreeModel model = (SimpleTreeModel) centerTree.getModel(); SimpleTreeModel model = (SimpleTreeModel) centerTree.getModel();
SimpleTreeNode stn = model.find(model.getRoot(), item.id); DefaultTreeNode stn = model.find(model.getRoot(), item.id);
if (stn != null) { if (stn != null) {
MTreeNode tNode = (MTreeNode) stn.getData(); MTreeNode tNode = (MTreeNode) stn.getData();
tNode.setName(item.name); tNode.setName(item.name);
tNode.setAllowsChildren(item.isSummary); tNode.setAllowsChildren(item.isSummary);
tNode.setImageIndicator(item.imageIndicator); tNode.setImageIndicator(item.imageIndicator);
model.nodeUpdated(stn); model.nodeUpdated(stn);
Treeitem ti = centerTree.renderItemByPath(model.getPath(model.getRoot(), stn)); Treeitem ti = centerTree.renderItemByPath(model.getPath(stn));
ti.setTooltiptext(item.description); ti.setTooltiptext(item.description);
} else { } else {
stn = new SimpleTreeNode(new MTreeNode(item.id, 0, item.name, item.description, 0, item.isSummary, stn = new DefaultTreeNode(new MTreeNode(item.id, 0, item.name, item.description, 0, item.isSummary,
item.imageIndicator, false, null), new ArrayList<Object>()); item.imageIndicator, false, null), new ArrayList<Object>());
model.addNode(stn); model.addNode(stn);
} }
@ -373,7 +373,7 @@ public class WTreeMaintenance extends TreeMaintenance implements IFormController
if (item != null) if (item != null)
{ {
SimpleTreeModel model = (SimpleTreeModel) centerTree.getModel(); SimpleTreeModel model = (SimpleTreeModel) centerTree.getModel();
SimpleTreeNode stn = model.find(model.getRoot(), item.id); DefaultTreeNode stn = model.find(model.getRoot(), item.id);
if (stn != null) if (stn != null)
model.removeNode(stn); model.removeNode(stn);

View File

@ -50,10 +50,10 @@ import org.compiere.util.Env;
import org.compiere.util.Msg; import org.compiere.util.Msg;
import org.zkoss.zk.ui.event.Event; import org.zkoss.zk.ui.event.Event;
import org.zkoss.zk.ui.event.EventListener; import org.zkoss.zk.ui.event.EventListener;
import org.zkoss.zkex.zul.Borderlayout; import org.zkoss.zul.Borderlayout;
import org.zkoss.zkex.zul.Center; import org.zkoss.zul.Center;
import org.zkoss.zkex.zul.North; import org.zkoss.zul.North;
import org.zkoss.zkex.zul.South; import org.zkoss.zul.South;
import org.zkoss.zul.Separator; import org.zkoss.zul.Separator;
/** /**

View File

@ -55,9 +55,9 @@ import org.zkoss.zk.ui.event.Event;
import org.zkoss.zk.ui.event.EventListener; import org.zkoss.zk.ui.event.EventListener;
import org.zkoss.zk.ui.event.Events; import org.zkoss.zk.ui.event.Events;
import org.zkoss.zk.ui.event.MouseEvent; import org.zkoss.zk.ui.event.MouseEvent;
import org.zkoss.zkex.zul.Borderlayout; import org.zkoss.zul.Borderlayout;
import org.zkoss.zkex.zul.Center; import org.zkoss.zul.Center;
import org.zkoss.zkex.zul.East; import org.zkoss.zul.East;
import org.zkoss.zul.Area; import org.zkoss.zul.Area;
import org.zkoss.zul.Div; import org.zkoss.zul.Div;
import org.zkoss.zul.Imagemap; import org.zkoss.zul.Imagemap;

View File

@ -50,10 +50,10 @@ import org.zkoss.zk.ui.event.DropEvent;
import org.zkoss.zk.ui.event.Event; import org.zkoss.zk.ui.event.Event;
import org.zkoss.zk.ui.event.EventListener; import org.zkoss.zk.ui.event.EventListener;
import org.zkoss.zk.ui.event.Events; import org.zkoss.zk.ui.event.Events;
import org.zkoss.zkex.zul.Borderlayout; import org.zkoss.zul.Borderlayout;
import org.zkoss.zkex.zul.Center; import org.zkoss.zul.Center;
import org.zkoss.zkex.zul.North; import org.zkoss.zul.North;
import org.zkoss.zkex.zul.South; import org.zkoss.zul.South;
import org.zkoss.zul.Div; import org.zkoss.zul.Div;
import org.zkoss.zul.Hbox; import org.zkoss.zul.Hbox;
import org.zkoss.zul.Label; import org.zkoss.zul.Label;
@ -215,8 +215,6 @@ public class WFEditor extends ADForm {
w.doModal(); w.doModal();
} catch (SuspendNotAllowedException e) { } catch (SuspendNotAllowedException e) {
e.printStackTrace(); e.printStackTrace();
} catch (InterruptedException e) {
e.printStackTrace();
} }
String name = text.getText(); String name = text.getText();

View File

@ -33,9 +33,9 @@ import org.zkoss.zhtml.Tr;
import org.zkoss.zk.ui.event.Event; import org.zkoss.zk.ui.event.Event;
import org.zkoss.zk.ui.event.EventListener; import org.zkoss.zk.ui.event.EventListener;
import org.zkoss.zk.ui.event.Events; import org.zkoss.zk.ui.event.Events;
import org.zkoss.zkex.zul.Borderlayout; import org.zkoss.zul.Borderlayout;
import org.zkoss.zkex.zul.Center; import org.zkoss.zul.Center;
import org.zkoss.zkex.zul.South; import org.zkoss.zul.South;
import org.zkoss.zul.Div; import org.zkoss.zul.Div;
import org.zkoss.zul.Html; import org.zkoss.zul.Html;

View File

@ -59,10 +59,10 @@ import org.zkoss.zk.ui.event.Event;
import org.zkoss.zk.ui.event.EventListener; import org.zkoss.zk.ui.event.EventListener;
import org.zkoss.zk.ui.event.Events; import org.zkoss.zk.ui.event.Events;
import org.zkoss.zk.ui.util.Clients; import org.zkoss.zk.ui.util.Clients;
import org.zkoss.zkex.zul.Borderlayout; import org.zkoss.zul.Borderlayout;
import org.zkoss.zkex.zul.Center; import org.zkoss.zul.Center;
import org.zkoss.zkex.zul.North; import org.zkoss.zul.North;
import org.zkoss.zkex.zul.South; import org.zkoss.zul.South;
import org.zkoss.zul.Div; import org.zkoss.zul.Div;
import org.zkoss.zul.Hbox; import org.zkoss.zul.Hbox;
import org.zkoss.zul.Html; import org.zkoss.zul.Html;
@ -275,7 +275,7 @@ public class WWFActivity extends ADForm implements EventListener
cmd_zoom(); cmd_zoom();
else if (comp == bOK) else if (comp == bOK)
{ {
Clients.showBusy(Msg.getMsg(Env.getCtx(), "Processing"), true); Clients.showBusy(Msg.getMsg(Env.getCtx(), "Processing"));
Events.echoEvent("onOK", this, null); Events.echoEvent("onOK", this, null);
} }
else if (comp == fAnswerButton) else if (comp == fAnswerButton)
@ -595,7 +595,7 @@ public class WWFActivity extends ADForm implements EventListener
log.config("Activity=" + m_activity); log.config("Activity=" + m_activity);
if (m_activity == null) if (m_activity == null)
{ {
Clients.showBusy(null, false); Clients.clearBusy();
return; return;
} }
int AD_User_ID = Env.getAD_User_ID(Env.getCtx()); int AD_User_ID = Env.getAD_User_ID(Env.getCtx());
@ -689,7 +689,7 @@ public class WWFActivity extends ADForm implements EventListener
} }
finally finally
{ {
Clients.showBusy(null, false); Clients.clearBusy();
if (trx != null) if (trx != null)
trx.close(); trx.close();
} }

View File

@ -68,7 +68,8 @@ public class ADTabListModel extends AbstractListModel implements ListitemRendere
} }
} }
public void render(Listitem item, Object data) throws Exception { @Override
public void render(Listitem item, Object data, int index) throws Exception {
ADTabLabel tabLabel = (ADTabLabel)data; ADTabLabel tabLabel = (ADTabLabel)data;
Listcell cell = new Listcell(tabLabel.label, null); Listcell cell = new Listcell(tabLabel.label, null);
if (tabLabel.tabLevel > 0) { if (tabLabel.tabLevel > 0) {

View File

@ -24,7 +24,7 @@ import org.zkoss.zk.ui.event.EventListener;
import org.zkoss.zk.ui.event.Events; import org.zkoss.zk.ui.event.Events;
import org.zkoss.zul.Menuitem; import org.zkoss.zul.Menuitem;
import org.zkoss.zul.Menupopup; import org.zkoss.zul.Menupopup;
import org.zkoss.zul.SimpleTreeNode; import org.zkoss.zul.DefaultTreeNode;
import org.zkoss.zul.Tree; import org.zkoss.zul.Tree;
import org.zkoss.zul.Treeitem; import org.zkoss.zul.Treeitem;
import org.zkoss.zul.Treerow; import org.zkoss.zul.Treerow;
@ -67,7 +67,7 @@ public class ADTreeOnDropListener implements EventListener {
if (de.getDragged() != de.getTarget()) { if (de.getDragged() != de.getTarget()) {
Treeitem src = (Treeitem) ((Treerow) de.getDragged()).getParent(); Treeitem src = (Treeitem) ((Treerow) de.getDragged()).getParent();
Treeitem target = (Treeitem) ((Treerow) de.getTarget()).getParent(); Treeitem target = (Treeitem) ((Treerow) de.getTarget()).getParent();
moveNode((SimpleTreeNode)src.getValue(), (SimpleTreeNode)target.getValue()); moveNode((DefaultTreeNode)src.getValue(), (DefaultTreeNode)target.getValue());
} }
} }
} }
@ -77,7 +77,7 @@ public class ADTreeOnDropListener implements EventListener {
* @param movingNode The node to be moved * @param movingNode The node to be moved
* @param toNode The target node * @param toNode The target node
*/ */
private void moveNode(SimpleTreeNode movingNode, SimpleTreeNode toNode) private void moveNode(DefaultTreeNode movingNode, DefaultTreeNode toNode)
{ {
log.info(movingNode.toString() + " to " + toNode.toString()); log.info(movingNode.toString() + " to " + toNode.toString());
@ -86,7 +86,7 @@ public class ADTreeOnDropListener implements EventListener {
MTreeNode toMNode = (MTreeNode) toNode.getData(); MTreeNode toMNode = (MTreeNode) toNode.getData();
SimpleTreeNode newParent; DefaultTreeNode newParent;
int index; int index;
if (!toMNode.isSummary()) // drop on a child node if (!toMNode.isSummary()) // drop on a child node
{ {
@ -95,7 +95,7 @@ public class ADTreeOnDropListener implements EventListener {
else // drop on a summary node else // drop on a summary node
{ {
//prompt user to select insert after or drop into the summary node //prompt user to select insert after or drop into the summary node
int path[] = treeModel.getPath(treeModel.getRoot(), toNode); int path[] = treeModel.getPath(toNode);
Treeitem toItem = tree.renderItemByPath(path); Treeitem toItem = tree.renderItemByPath(path);
tree.setSelectedItem(toItem); tree.setSelectedItem(toItem);
@ -121,13 +121,13 @@ public class ADTreeOnDropListener implements EventListener {
} // moveNode } // moveNode
private void moveNode(SimpleTreeNode movingNode, SimpleTreeNode toNode, boolean moveInto) private void moveNode(DefaultTreeNode movingNode, DefaultTreeNode toNode, boolean moveInto)
{ {
SimpleTreeNode newParent; DefaultTreeNode newParent;
int index; int index;
// remove // remove
SimpleTreeNode oldParent = treeModel.getParent(movingNode); DefaultTreeNode oldParent = treeModel.getParent(movingNode);
treeModel.removeNode(movingNode); treeModel.removeNode(movingNode);
//get new index //get new index
@ -145,7 +145,7 @@ public class ADTreeOnDropListener implements EventListener {
// insert // insert
treeModel.addNode(newParent, movingNode, index); treeModel.addNode(newParent, movingNode, index);
int path[] = treeModel.getPath(treeModel.getRoot(), movingNode); int path[] = treeModel.getPath(movingNode);
Treeitem movingItem = tree.renderItemByPath(path); Treeitem movingItem = tree.renderItemByPath(path);
tree.setSelectedItem(movingItem); tree.setSelectedItem(movingItem);
Events.sendEvent(tree, new Event(Events.ON_SELECT, tree)); Events.sendEvent(tree, new Event(Events.ON_SELECT, tree));
@ -158,7 +158,7 @@ public class ADTreeOnDropListener implements EventListener {
MTreeNode oldMParent = (MTreeNode) oldParent.getData(); MTreeNode oldMParent = (MTreeNode) oldParent.getData();
for (int i = 0; i < oldParent.getChildCount(); i++) for (int i = 0; i < oldParent.getChildCount(); i++)
{ {
SimpleTreeNode nd = (SimpleTreeNode)oldParent.getChildAt(i); DefaultTreeNode nd = (DefaultTreeNode)oldParent.getChildAt(i);
MTreeNode md = (MTreeNode) nd.getData(); MTreeNode md = (MTreeNode) nd.getData();
StringBuffer sql = new StringBuffer("UPDATE "); StringBuffer sql = new StringBuffer("UPDATE ");
sql.append(mTree.getNodeTableName()) sql.append(mTree.getNodeTableName())
@ -175,7 +175,7 @@ public class ADTreeOnDropListener implements EventListener {
MTreeNode newMParent = (MTreeNode) newParent.getData(); MTreeNode newMParent = (MTreeNode) newParent.getData();
for (int i = 0; i < newParent.getChildCount(); i++) for (int i = 0; i < newParent.getChildCount(); i++)
{ {
SimpleTreeNode nd = (SimpleTreeNode)newParent.getChildAt(i); DefaultTreeNode nd = (DefaultTreeNode)newParent.getChildAt(i);
MTreeNode md = (MTreeNode) nd.getData(); MTreeNode md = (MTreeNode) nd.getData();
StringBuffer sql = new StringBuffer("UPDATE "); StringBuffer sql = new StringBuffer("UPDATE ");
sql.append(mTree.getNodeTableName()) sql.append(mTree.getNodeTableName())
@ -201,9 +201,9 @@ public class ADTreeOnDropListener implements EventListener {
} }
class MenuListener implements EventListener { class MenuListener implements EventListener {
private SimpleTreeNode movingNode; private DefaultTreeNode movingNode;
private SimpleTreeNode toNode; private DefaultTreeNode toNode;
MenuListener(SimpleTreeNode movingNode, SimpleTreeNode toNode) { MenuListener(DefaultTreeNode movingNode, DefaultTreeNode toNode) {
this.movingNode = movingNode; this.movingNode = movingNode;
this.toNode = toNode; this.toNode = toNode;
} }

View File

@ -20,10 +20,10 @@ import org.zkoss.zk.ui.Component;
import org.zkoss.zk.ui.event.Event; import org.zkoss.zk.ui.event.Event;
import org.zkoss.zk.ui.event.EventListener; import org.zkoss.zk.ui.event.EventListener;
import org.zkoss.zk.ui.event.Events; import org.zkoss.zk.ui.event.Events;
import org.zkoss.zkex.zul.Borderlayout; import org.zkoss.zul.Borderlayout;
import org.zkoss.zkex.zul.Center; import org.zkoss.zul.Center;
import org.zkoss.zkex.zul.North; import org.zkoss.zul.North;
import org.zkoss.zkex.zul.South; import org.zkoss.zul.South;
import org.zkoss.zul.Div; import org.zkoss.zul.Div;
import org.zkoss.zul.Vbox; import org.zkoss.zul.Vbox;

View File

@ -4,17 +4,17 @@
package org.adempiere.webui.component; package org.adempiere.webui.component;
import org.zkoss.zk.ui.Component; import org.zkoss.zk.ui.Component;
import org.zkoss.zkex.zul.Center; import org.zkoss.zul.Center;
import org.zkoss.zkex.zul.East; import org.zkoss.zul.East;
import org.zkoss.zkex.zul.North; import org.zkoss.zul.North;
import org.zkoss.zkex.zul.South; import org.zkoss.zul.South;
import org.zkoss.zkex.zul.West; import org.zkoss.zul.West;
/** /**
* @author teo_sarca * @author teo_sarca
* *
*/ */
public class Borderlayout extends org.zkoss.zkex.zul.Borderlayout public class Borderlayout extends org.zkoss.zul.Borderlayout
{ {
/** /**
* *

View File

@ -119,9 +119,12 @@ public class Combobox extends org.zkoss.zul.Combobox
return item.getValue().equals(value); return item.getValue().equals(value);
} }
//TODO: Find zk6 replacement
/** Returns RS_NO_WIDTH|RS_NO_HEIGHT. /** Returns RS_NO_WIDTH|RS_NO_HEIGHT.
*/ */
/*
protected int getRealStyleFlags() { protected int getRealStyleFlags() {
return super.getRealStyleFlags() & 0x0006; return super.getRealStyleFlags() & 0x0006;
} }
*/
} }

View File

@ -13,11 +13,13 @@
*****************************************************************************/ *****************************************************************************/
package org.adempiere.webui.component; package org.adempiere.webui.component;
import java.util.Map;
import org.adempiere.webui.event.DrillEvent; import org.adempiere.webui.event.DrillEvent;
import org.compiere.model.MQuery; import org.compiere.model.MQuery;
import org.zkoss.lang.Objects; import org.zkoss.lang.Objects;
import org.zkoss.zk.au.AuRequest; import org.zkoss.zk.au.AuRequest;
import org.zkoss.zk.au.Command; import org.zkoss.zk.au.AuService;
import org.zkoss.zk.mesg.MZk; import org.zkoss.zk.mesg.MZk;
import org.zkoss.zk.ui.Component; import org.zkoss.zk.ui.Component;
import org.zkoss.zk.ui.UiException; import org.zkoss.zk.ui.UiException;
@ -28,15 +30,18 @@ import org.zkoss.zk.ui.event.Events;
* @author hengsin * @author hengsin
* *
*/ */
public class DrillCommand extends Command { public class DrillCommand implements AuService {
public DrillCommand(String id, int flags) { public DrillCommand() {
super(id, flags);
} }
@Override public boolean service(AuRequest request, boolean everError) {
protected void process(AuRequest request) { if (!DrillEvent.ON_DRILL_ACROSS.equals(request.getCommand())
final String[] data = request.getData(); && !DrillEvent.ON_DRILL_DOWN.equals(request.getCommand()))
return false;
final Map<?, ?> map = request.getData();
String[] data = (String[]) map.get("");
final Component comp = request.getComponent(); final Component comp = request.getComponent();
if (comp == null) if (comp == null)
@ -53,6 +58,8 @@ public class DrillCommand extends Command {
MQuery query = new MQuery(tableName); MQuery query = new MQuery(tableName);
query.addRestriction(columnName, MQuery.EQUAL, code); query.addRestriction(columnName, MQuery.EQUAL, code);
Events.postEvent(new DrillEvent(getId(), comp, query)); Events.postEvent(new DrillEvent(request.getCommand(), comp, query));
return true;
} }
} }

View File

@ -24,10 +24,10 @@ import org.compiere.util.ValueNamePair;
import org.zkoss.zk.ui.event.Event; import org.zkoss.zk.ui.event.Event;
import org.zkoss.zk.ui.event.EventListener; import org.zkoss.zk.ui.event.EventListener;
import org.zkoss.zk.ui.event.Events; import org.zkoss.zk.ui.event.Events;
import org.zkoss.zkex.zul.Borderlayout; import org.zkoss.zul.Borderlayout;
import org.zkoss.zkex.zul.Center; import org.zkoss.zul.Center;
import org.zkoss.zkex.zul.North; import org.zkoss.zul.North;
import org.zkoss.zkex.zul.South; import org.zkoss.zul.South;
/** /**
* Directory and File Browser * Directory and File Browser

View File

@ -37,9 +37,9 @@ import org.zkoss.zk.ui.event.Event;
import org.zkoss.zk.ui.event.EventListener; import org.zkoss.zk.ui.event.EventListener;
import org.zkoss.zk.ui.event.Events; import org.zkoss.zk.ui.event.Events;
import org.zkoss.zk.ui.util.Clients; import org.zkoss.zk.ui.util.Clients;
import org.zkoss.zkex.zul.Borderlayout; import org.zkoss.zul.Borderlayout;
import org.zkoss.zkex.zul.Center; import org.zkoss.zul.Center;
import org.zkoss.zkex.zul.South; import org.zkoss.zul.South;
import org.zkoss.zul.Column; import org.zkoss.zul.Column;
import org.zkoss.zul.Div; import org.zkoss.zul.Div;
import org.zkoss.zul.Paging; import org.zkoss.zul.Paging;

View File

@ -76,7 +76,8 @@ public class GridTabListItemRenderer implements ListitemRenderer, ListitemRender
* @param data * @param data
* @see ListitemRenderer#render(Listitem, Object) * @see ListitemRenderer#render(Listitem, Object)
*/ */
public void render(Listitem listitem, Object data) throws Exception { @Override
public void render(Listitem listitem, Object data, int index) throws Exception {
//don't render if not visible //don't render if not visible
for(Component c = listitem.getParent(); c != null; c = c.getParent()) { for(Component c = listitem.getParent(); c != null; c = c.getParent()) {
if (!c.isVisible()) if (!c.isVisible())

View File

@ -344,7 +344,8 @@ public class GridTabRowRenderer implements RowRenderer, RowRendererExt, Renderer
* @param data * @param data
* @see RowRenderer#render(Row, Object) * @see RowRenderer#render(Row, Object)
*/ */
public void render(Row row, Object data) throws Exception { @Override
public void render(Row row, Object data, int index) throws Exception {
//don't render if not visible //don't render if not visible
if (gridPanel != null && !gridPanel.isVisible()) { if (gridPanel != null && !gridPanel.isVisible()) {
return; return;

View File

@ -224,4 +224,9 @@ public class GridTableListModel extends AbstractListModel implements TableModelL
editing = b; editing = b;
} }
@Override
public String getSortDirection(Comparator cmpr) {
return "natural";
}
} }

View File

@ -29,9 +29,9 @@ import org.compiere.util.DisplayType;
import org.zkoss.zk.ui.event.Event; import org.zkoss.zk.ui.event.Event;
import org.zkoss.zk.ui.event.EventListener; import org.zkoss.zk.ui.event.EventListener;
import org.zkoss.zk.ui.event.Events; import org.zkoss.zk.ui.event.Events;
import org.zkoss.zkex.zul.Borderlayout; import org.zkoss.zul.Borderlayout;
import org.zkoss.zkex.zul.Center; import org.zkoss.zul.Center;
import org.zkoss.zkex.zul.South; import org.zkoss.zul.South;
import org.zkoss.zul.Paging; import org.zkoss.zul.Paging;
import org.zkoss.zul.event.ZulEvents; import org.zkoss.zul.event.ZulEvents;

View File

@ -99,12 +99,6 @@ public class Listbox extends org.zkoss.zul.Listbox implements EventListener
return (ListItem)super.getSelectedItem(); return (ListItem)super.getSelectedItem();
} }
@SuppressWarnings("unchecked")
public List<ListItem> getItems()
{
return (List<ListItem>)super.getItems();
}
/** /**
* Set selected item for the list box based on the value of list item * Set selected item for the list box based on the value of list item
* set selected to none if no item found matching the value given or * set selected to none if no item found matching the value given or
@ -120,8 +114,8 @@ public class Listbox extends org.zkoss.zul.Listbox implements EventListener
return ; return ;
} }
List<ListItem> items = getItems(); List<Listitem> items = getItems();
for (ListItem item : items) for (Listitem item : items)
{ {
if (value.getClass() != item.getValue().getClass()) { if (value.getClass() != item.getValue().getClass()) {
// if the classes of value and item are different convert both to String // if the classes of value and item are different convert both to String
@ -331,7 +325,7 @@ public class Listbox extends org.zkoss.zul.Listbox implements EventListener
@Override @Override
public String toString() { public String toString() {
StringBuffer items = new StringBuffer("["); StringBuffer items = new StringBuffer("[");
for (ListItem item : getItems()) { for (Listitem item : getItems()) {
if (items.length() > 1) if (items.length() > 1)
items.append(", "); items.append(", ");
items.append(item.toString()); items.append(item.toString());

View File

@ -132,7 +132,7 @@ public class NumberBox extends Div
public void setValue(Object value) public void setValue(Object value)
{ {
if (value == null) if (value == null)
decimalBox.setValue(null); decimalBox.setValue((BigDecimal) null);
else if (value instanceof BigDecimal) else if (value instanceof BigDecimal)
decimalBox.setValue((BigDecimal) value); decimalBox.setValue((BigDecimal) value);
else if (value instanceof Number) else if (value instanceof Number)
@ -199,7 +199,7 @@ public class NumberBox extends Div
char separatorChar = DisplayType.getNumberFormat(DisplayType.Number, Env.getLanguage(Env.getCtx())).getDecimalFormatSymbols().getDecimalSeparator(); char separatorChar = DisplayType.getNumberFormat(DisplayType.Number, Env.getLanguage(Env.getCtx())).getDecimalFormatSymbols().getDecimalSeparator();
txtCalc = new Textbox(); txtCalc = new Textbox();
txtCalc.setAction("onKeyPress : return calc.validate('" + txtCalc.setWidgetListener("onKeyPress", "return calc.validate('" +
decimalBox.getId() + "','" + txtCalc.getId() decimalBox.getId() + "','" + txtCalc.getId()
+ "'," + integral + "," + (int)separatorChar + ", event);"); + "'," + integral + "," + (int)separatorChar + ", event);");
txtCalc.setMaxlength(250); txtCalc.setMaxlength(250);
@ -213,27 +213,27 @@ public class NumberBox extends Div
Button btnAC = new Button(); Button btnAC = new Button();
btnAC.setWidth("40px"); btnAC.setWidth("40px");
btnAC.setLabel("AC"); btnAC.setLabel("AC");
btnAC.setAction("onClick : calc.clearAll('" + txtCalcId + "')"); btnAC.setWidgetListener("onClick", "calc.clearAll('" + txtCalcId + "')");
Button btn7 = new Button(); Button btn7 = new Button();
btn7.setWidth("30px"); btn7.setWidth("30px");
btn7.setLabel("7"); btn7.setLabel("7");
btn7.setAction("onClick : calc.append('" + txtCalcId + "', '7')"); btn7.setWidgetListener("onClick", "calc.append('" + txtCalcId + "', '7')");
Button btn8 = new Button(); Button btn8 = new Button();
btn8.setWidth("30px"); btn8.setWidth("30px");
btn8.setLabel("8"); btn8.setLabel("8");
btn8.setAction("onClick : calc.append('" + txtCalcId + "', '8')"); btn8.setWidgetListener("onClick", "calc.append('" + txtCalcId + "', '8')");
Button btn9 = new Button(); Button btn9 = new Button();
btn9.setWidth("30px"); btn9.setWidth("30px");
btn9.setLabel("9"); btn9.setLabel("9");
btn9.setAction("onClick : calc.append('" + txtCalcId + "', '9')"); btn9.setWidgetListener("onClick", "calc.append('" + txtCalcId + "', '9')");
Button btnMultiply = new Button(); Button btnMultiply = new Button();
btnMultiply.setWidth("30px"); btnMultiply.setWidth("30px");
btnMultiply.setLabel("*"); btnMultiply.setLabel("*");
btnMultiply.setAction("onClick : calc.append('" + txtCalcId + "', ' * ')"); btnMultiply.setWidgetListener("onClick", "calc.append('" + txtCalcId + "', ' * ')");
row1.appendChild(btnAC); row1.appendChild(btnAC);
row1.appendChild(btn7); row1.appendChild(btn7);
@ -246,27 +246,27 @@ public class NumberBox extends Div
Button btnC = new Button(); Button btnC = new Button();
btnC.setWidth("40px"); btnC.setWidth("40px");
btnC.setLabel("C"); btnC.setLabel("C");
btnC.setAction("onClick : calc.clear('" + txtCalcId + "')"); btnC.setWidgetListener("onClick", "calc.clear('" + txtCalcId + "')");
Button btn4 = new Button(); Button btn4 = new Button();
btn4.setWidth("30px"); btn4.setWidth("30px");
btn4.setLabel("4"); btn4.setLabel("4");
btn4.setAction("onClick : calc.append('" + txtCalcId + "', '4')"); btn4.setWidgetListener("onClick", "calc.append('" + txtCalcId + "', '4')");
Button btn5 = new Button(); Button btn5 = new Button();
btn5.setWidth("30px"); btn5.setWidth("30px");
btn5.setLabel("5"); btn5.setLabel("5");
btn5.setAction("onClick : calc.append('" + txtCalcId + "', '5')"); btn5.setWidgetListener("onClick", "calc.append('" + txtCalcId + "', '5')");
Button btn6 = new Button(); Button btn6 = new Button();
btn6.setWidth("30px"); btn6.setWidth("30px");
btn6.setLabel("6"); btn6.setLabel("6");
btn6.setAction("onClick : calc.append('" + txtCalcId + "', '6')"); btn6.setWidgetListener("onClick", "calc.append('" + txtCalcId + "', '6')");
Button btnDivide = new Button(); Button btnDivide = new Button();
btnDivide.setWidth("30px"); btnDivide.setWidth("30px");
btnDivide.setLabel("/"); btnDivide.setLabel("/");
btnDivide.setAction("onClick : calc.append('" + txtCalcId + "', ' / ')"); btnDivide.setWidgetListener("onClick", "calc.append('" + txtCalcId + "', ' / ')");
row2.appendChild(btnC); row2.appendChild(btnC);
row2.appendChild(btn4); row2.appendChild(btn4);
@ -279,27 +279,27 @@ public class NumberBox extends Div
Button btnModulo = new Button(); Button btnModulo = new Button();
btnModulo.setWidth("40px"); btnModulo.setWidth("40px");
btnModulo.setLabel("%"); btnModulo.setLabel("%");
btnModulo.setAction("onClick : calc.append('" + txtCalcId + "', ' % ')"); btnModulo.setWidgetListener("onClick", "calc.append('" + txtCalcId + "', ' % ')");
Button btn1 = new Button(); Button btn1 = new Button();
btn1.setWidth("30px"); btn1.setWidth("30px");
btn1.setLabel("1"); btn1.setLabel("1");
btn1.setAction("onClick : calc.append('" + txtCalcId + "', '1')"); btn1.setWidgetListener("onClick", "calc.append('" + txtCalcId + "', '1')");
Button btn2 = new Button(); Button btn2 = new Button();
btn2.setWidth("30px"); btn2.setWidth("30px");
btn2.setLabel("2"); btn2.setLabel("2");
btn2.setAction("onClick : calc.append('" + txtCalcId + "', '2')"); btn2.setWidgetListener("onClick", "calc.append('" + txtCalcId + "', '2')");
Button btn3 = new Button(); Button btn3 = new Button();
btn3.setWidth("30px"); btn3.setWidth("30px");
btn3.setLabel("3"); btn3.setLabel("3");
btn3.setAction("onClick : calc.append('" + txtCalcId + "', '3')"); btn3.setWidgetListener("onClick", "calc.append('" + txtCalcId + "', '3')");
Button btnSubstract = new Button(); Button btnSubstract = new Button();
btnSubstract.setWidth("30px"); btnSubstract.setWidth("30px");
btnSubstract.setLabel("-"); btnSubstract.setLabel("-");
btnSubstract.setAction("onClick : calc.append('" + txtCalcId + "', ' - ')"); btnSubstract.setWidgetListener("onClick", "calc.append('" + txtCalcId + "', ' - ')");
row3.appendChild(btnModulo); row3.appendChild(btnModulo);
row3.appendChild(btn1); row3.appendChild(btn1);
@ -317,25 +317,25 @@ public class NumberBox extends Div
Button btn0 = new Button(); Button btn0 = new Button();
btn0.setWidth("30px"); btn0.setWidth("30px");
btn0.setLabel("0"); btn0.setLabel("0");
btn0.setAction("onClick : calc.append('" + txtCalcId + "', '0')"); btn0.setWidgetListener("onClick", "calc.append('" + txtCalcId + "', '0')");
String separator = Character.toString(separatorChar); String separator = Character.toString(separatorChar);
Button btnDot = new Button(); Button btnDot = new Button();
btnDot.setWidth("30px"); btnDot.setWidth("30px");
btnDot.setLabel(separator); btnDot.setLabel(separator);
btnDot.setDisabled(integral); btnDot.setDisabled(integral);
btnDot.setAction("onClick : calc.append('" + txtCalcId + "', '" + separator + "')"); btnDot.setWidgetListener("onClick", "calc.append('" + txtCalcId + "', '" + separator + "')");
Button btnEqual = new Button(); Button btnEqual = new Button();
btnEqual.setWidth("30px"); btnEqual.setWidth("30px");
btnEqual.setLabel("="); btnEqual.setLabel("=");
btnEqual.setAction("onClick : calc.evaluate('" + decimalBox.getId() + "','" btnEqual.setWidgetListener("onClick", "calc.evaluate('" + decimalBox.getId() + "','"
+ txtCalcId + "','" + separator + "')"); + txtCalcId + "','" + separator + "')");
Button btnAdd = new Button(); Button btnAdd = new Button();
btnAdd.setWidth("30px"); btnAdd.setWidth("30px");
btnAdd.setLabel("+"); btnAdd.setLabel("+");
btnAdd.setAction("onClick : calc.append('" + txtCalcId + "', ' + ')"); btnAdd.setWidgetListener("onClick", "calc.append('" + txtCalcId + "', ' + ')");
row4.appendChild(btnCurrency); row4.appendChild(btnCurrency);
row4.appendChild(btnDot); row4.appendChild(btnDot);

View File

@ -68,7 +68,8 @@ public class SimpleListModel extends AbstractListModel implements ListitemRender
.append(src.substring(0, j)).append("..."); .append(src.substring(0, j)).append("...");
} }
public void render(Listitem item, Object data) throws Exception { @Override
public void render(Listitem item, Object data, int index) throws Exception {
if (data instanceof Object[]) { if (data instanceof Object[]) {
renderArray(item, (Object[])data); renderArray(item, (Object[])data);
} else if (data instanceof Collection) { } else if (data instanceof Collection) {

View File

@ -25,8 +25,9 @@ import org.zkoss.lang.Objects;
import org.zkoss.zk.ui.event.Event; import org.zkoss.zk.ui.event.Event;
import org.zkoss.zk.ui.event.EventListener; import org.zkoss.zk.ui.event.EventListener;
import org.zkoss.zk.ui.event.Events; import org.zkoss.zk.ui.event.Events;
import org.zkoss.zul.SimpleTreeNode; import org.zkoss.zul.DefaultTreeNode;
import org.zkoss.zul.Tree; import org.zkoss.zul.Tree;
import org.zkoss.zul.TreeNode;
import org.zkoss.zul.Treecell; import org.zkoss.zul.Treecell;
import org.zkoss.zul.Treecol; import org.zkoss.zul.Treecol;
import org.zkoss.zul.Treecols; import org.zkoss.zul.Treecols;
@ -40,7 +41,7 @@ import org.zkoss.zul.event.TreeDataEvent;
* @author Low Heng Sin * @author Low Heng Sin
* *
*/ */
public class SimpleTreeModel extends org.zkoss.zul.SimpleTreeModel implements TreeitemRenderer, EventListener { public class SimpleTreeModel extends org.zkoss.zul.DefaultTreeModel implements TreeitemRenderer, EventListener {
/** /**
* *
@ -52,7 +53,7 @@ public class SimpleTreeModel extends org.zkoss.zul.SimpleTreeModel implements Tr
private boolean itemDraggable; private boolean itemDraggable;
private List<EventListener> onDropListners = new ArrayList<EventListener>(); private List<EventListener> onDropListners = new ArrayList<EventListener>();
public SimpleTreeModel(SimpleTreeNode root) { public SimpleTreeModel(DefaultTreeNode root) {
super(root); super(root);
} }
@ -105,10 +106,10 @@ public class SimpleTreeModel extends org.zkoss.zul.SimpleTreeModel implements Tr
SimpleTreeModel model = null; SimpleTreeModel model = null;
Enumeration nodeEnum = root.children(); Enumeration nodeEnum = root.children();
SimpleTreeNode stRoot = new SimpleTreeNode(root, new ArrayList()); DefaultTreeNode stRoot = new DefaultTreeNode(root, new ArrayList());
while(nodeEnum.hasMoreElements()) { while(nodeEnum.hasMoreElements()) {
MTreeNode childNode = (MTreeNode)nodeEnum.nextElement(); MTreeNode childNode = (MTreeNode)nodeEnum.nextElement();
SimpleTreeNode stNode = new SimpleTreeNode(childNode, new ArrayList()); DefaultTreeNode stNode = new DefaultTreeNode(childNode, new ArrayList());
stRoot.getChildren().add(stNode); stRoot.getChildren().add(stNode);
if (childNode.getChildCount() > 0) { if (childNode.getChildCount() > 0) {
populate(stNode, childNode); populate(stNode, childNode);
@ -118,11 +119,11 @@ public class SimpleTreeModel extends org.zkoss.zul.SimpleTreeModel implements Tr
return model; return model;
} }
private static void populate(SimpleTreeNode stNode, MTreeNode root) { private static void populate(DefaultTreeNode stNode, MTreeNode root) {
Enumeration nodeEnum = root.children(); Enumeration nodeEnum = root.children();
while(nodeEnum.hasMoreElements()) { while(nodeEnum.hasMoreElements()) {
MTreeNode childNode = (MTreeNode)nodeEnum.nextElement(); MTreeNode childNode = (MTreeNode)nodeEnum.nextElement();
SimpleTreeNode stChildNode = new SimpleTreeNode(childNode, new ArrayList()); DefaultTreeNode stChildNode = new DefaultTreeNode(childNode, new ArrayList());
stNode.getChildren().add(stChildNode); stNode.getChildren().add(stChildNode);
if (childNode.getChildCount() > 0) { if (childNode.getChildCount() > 0) {
populate(stChildNode, childNode); populate(stChildNode, childNode);
@ -160,33 +161,33 @@ public class SimpleTreeModel extends org.zkoss.zul.SimpleTreeModel implements Tr
* Add to root * Add to root
* @param newNode * @param newNode
*/ */
public void addNode(SimpleTreeNode newNode) { public void addNode(DefaultTreeNode newNode) {
SimpleTreeNode root = (SimpleTreeNode) getRoot(); DefaultTreeNode root = (DefaultTreeNode) getRoot();
root.getChildren().add(newNode); root.getChildren().add(newNode);
fireEvent(root, root.getChildCount() - 1, root.getChildCount() - 1, TreeDataEvent.INTERVAL_ADDED); fireEvent(root, root.getChildCount() - 1, root.getChildCount() - 1, TreeDataEvent.INTERVAL_ADDED);
} }
@Override @Override
public SimpleTreeNode getRoot() { public DefaultTreeNode getRoot() {
return (SimpleTreeNode) super.getRoot(); return (DefaultTreeNode) super.getRoot();
} }
@Override @Override
public SimpleTreeNode getChild(Object parent, int index) { public DefaultTreeNode getChild(Object parent, int index) {
return (SimpleTreeNode) super.getChild(parent, index); return (DefaultTreeNode) super.getChild((TreeNode)parent, index);
} }
/** /**
* @param treeNode * @param treeNode
*/ */
public void removeNode(SimpleTreeNode treeNode) { public void removeNode(DefaultTreeNode treeNode) {
int path[] = this.getPath(getRoot(), treeNode); int path[] = this.getPath(treeNode);
if (path != null && path.length > 0) { if (path != null && path.length > 0) {
SimpleTreeNode parentNode = getRoot(); DefaultTreeNode parentNode = getRoot();
int index = path.length - 1; int index = path.length - 1;
for (int i = 0; i < index; i++) { for (int i = 0; i < index; i++) {
parentNode = getChild(parentNode, path[i]); parentNode = (DefaultTreeNode) getChild((TreeNode)parentNode, path[i]);
} }
@ -230,16 +231,16 @@ public class SimpleTreeModel extends org.zkoss.zul.SimpleTreeModel implements Tr
/** /**
* @param treeNode * @param treeNode
* @return SimpleTreeNode * @return DefaultTreeNode
*/ */
public SimpleTreeNode getParent(SimpleTreeNode treeNode) { public DefaultTreeNode getParent(DefaultTreeNode treeNode) {
int path[] = this.getPath(getRoot(), treeNode); int path[] = this.getPath(treeNode);
if (path != null && path.length > 0) { if (path != null && path.length > 0) {
SimpleTreeNode parentNode = getRoot(); DefaultTreeNode parentNode = getRoot();
int index = path.length - 1; int index = path.length - 1;
for (int i = 0; i < index; i++) { for (int i = 0; i < index; i++) {
parentNode = getChild(parentNode, path[i]); parentNode = (DefaultTreeNode) getChild((TreeNode)parentNode, path[i]);
} }
return parentNode; return parentNode;
@ -253,7 +254,7 @@ public class SimpleTreeModel extends org.zkoss.zul.SimpleTreeModel implements Tr
* @param newNode * @param newNode
* @param index * @param index
*/ */
public void addNode(SimpleTreeNode newParent, SimpleTreeNode newNode, public void addNode(DefaultTreeNode newParent, DefaultTreeNode newNode,
int index) { int index) {
newParent.getChildren().add(index, newNode); newParent.getChildren().add(index, newNode);
fireEvent(newParent, index, index, TreeDataEvent.INTERVAL_ADDED); fireEvent(newParent, index, index, TreeDataEvent.INTERVAL_ADDED);
@ -262,9 +263,9 @@ public class SimpleTreeModel extends org.zkoss.zul.SimpleTreeModel implements Tr
/** /**
* @param fromNode * @param fromNode
* @param recordId * @param recordId
* @return SimpleTreeNode * @return DefaultTreeNode
*/ */
public SimpleTreeNode find(SimpleTreeNode fromNode, int recordId) { public DefaultTreeNode find(DefaultTreeNode fromNode, int recordId) {
if (fromNode == null) if (fromNode == null)
fromNode = getRoot(); fromNode = getRoot();
MTreeNode data = (MTreeNode) fromNode.getData(); MTreeNode data = (MTreeNode) fromNode.getData();
@ -274,8 +275,8 @@ public class SimpleTreeModel extends org.zkoss.zul.SimpleTreeModel implements Tr
return null; return null;
int cnt = getChildCount(fromNode); int cnt = getChildCount(fromNode);
for(int i = 0; i < cnt; i++ ) { for(int i = 0; i < cnt; i++ ) {
SimpleTreeNode child = getChild(fromNode, i); DefaultTreeNode child = (DefaultTreeNode) getChild(fromNode, i);
SimpleTreeNode treeNode = find(child, recordId); DefaultTreeNode treeNode = find(child, recordId);
if (treeNode != null) if (treeNode != null)
return treeNode; return treeNode;
} }
@ -285,11 +286,17 @@ public class SimpleTreeModel extends org.zkoss.zul.SimpleTreeModel implements Tr
/** /**
* @param node * @param node
*/ */
public void nodeUpdated(SimpleTreeNode node) { public void nodeUpdated(DefaultTreeNode node) {
SimpleTreeNode parent = getParent(node); DefaultTreeNode parent = getParent(node);
if (parent != null) { if (parent != null) {
int i = parent.getChildren().indexOf(node); int i = parent.getChildren().indexOf(node);
fireEvent(parent, i, i, TreeDataEvent.CONTENTS_CHANGED); fireEvent(parent, i, i, TreeDataEvent.CONTENTS_CHANGED);
} }
} }
@Override
public void render(Treeitem arg0, Object arg1, int arg2) throws Exception {
// TODO Auto-generated method stub
}
} }

View File

@ -13,10 +13,12 @@
*****************************************************************************/ *****************************************************************************/
package org.adempiere.webui.component; package org.adempiere.webui.component;
import java.util.Map;
import org.adempiere.webui.event.TokenEvent; import org.adempiere.webui.event.TokenEvent;
import org.zkoss.lang.Objects; import org.zkoss.lang.Objects;
import org.zkoss.zk.au.AuRequest; import org.zkoss.zk.au.AuRequest;
import org.zkoss.zk.au.Command; import org.zkoss.zk.au.AuService;
import org.zkoss.zk.mesg.MZk; import org.zkoss.zk.mesg.MZk;
import org.zkoss.zk.ui.Component; import org.zkoss.zk.ui.Component;
import org.zkoss.zk.ui.UiException; import org.zkoss.zk.ui.UiException;
@ -27,15 +29,17 @@ import org.zkoss.zk.ui.event.Events;
* @author hengsin * @author hengsin
* *
*/ */
public class TokenCommand extends Command { public class TokenCommand implements AuService {
public TokenCommand(String id, int flags) { public TokenCommand() {
super(id, flags);
} }
@Override public boolean service(AuRequest request, boolean everError) {
protected void process(AuRequest request) { if (!TokenEvent.ON_USER_TOKEN.equals(request.getCommand()))
final String[] data = request.getData(); return false;
Map<?, ?> map = request.getData();
final String[] data = (String[]) map.get("");
final Component comp = request.getComponent(); final Component comp = request.getComponent();
if (comp == null) if (comp == null)
@ -44,7 +48,9 @@ public class TokenCommand extends Command {
if (data == null || data.length < 2) if (data == null || data.length < 2)
throw new UiException(MZk.ILLEGAL_REQUEST_WRONG_DATA, new Object[] { throw new UiException(MZk.ILLEGAL_REQUEST_WRONG_DATA, new Object[] {
Objects.toString(data), this }); Objects.toString(data), this });
Events.postEvent(new TokenEvent(getId(), comp, data)); Events.postEvent(new TokenEvent(request.getCommand(), comp, data));
return true;
} }
} }

View File

@ -128,9 +128,10 @@ public class WListItemRenderer implements ListitemRenderer, EventListener, Listi
/* (non-Javadoc) /* (non-Javadoc)
* @see org.zkoss.zul.ListitemRenderer#render(org.zkoss.zul.Listitem, java.lang.Object) * @see org.zkoss.zul.ListitemRenderer#render(org.zkoss.zul.Listitem, java.lang.Object)
*/ */
public void render(Listitem item, Object data) throws Exception @Override
public void render(Listitem item, Object data, int index) throws Exception
{ {
render((ListItem)item, data); render((ListItem)item, data, index);
} }
/** /**
@ -143,7 +144,7 @@ public class WListItemRenderer implements ListitemRenderer, EventListener, Listi
* @throws Exception * @throws Exception
* @see {@link #render(Listitem, Object)} * @see {@link #render(Listitem, Object)}
*/ */
private void render(ListItem item, Object data) private void render(ListItem item, Object data, int index)
{ {
Listcell listcell = null; Listcell listcell = null;
int colIndex = 0; int colIndex = 0;

View File

@ -13,11 +13,13 @@
*****************************************************************************/ *****************************************************************************/
package org.adempiere.webui.component; package org.adempiere.webui.component;
import java.util.Map;
import org.adempiere.webui.event.ZoomEvent; import org.adempiere.webui.event.ZoomEvent;
import org.compiere.model.MQuery; import org.compiere.model.MQuery;
import org.zkoss.lang.Objects; import org.zkoss.lang.Objects;
import org.zkoss.zk.au.AuRequest; import org.zkoss.zk.au.AuRequest;
import org.zkoss.zk.au.Command; import org.zkoss.zk.au.AuService;
import org.zkoss.zk.mesg.MZk; import org.zkoss.zk.mesg.MZk;
import org.zkoss.zk.ui.Component; import org.zkoss.zk.ui.Component;
import org.zkoss.zk.ui.UiException; import org.zkoss.zk.ui.UiException;
@ -28,15 +30,17 @@ import org.zkoss.zk.ui.event.Events;
* @author hengsin * @author hengsin
* *
*/ */
public class ZoomCommand extends Command { public class ZoomCommand implements AuService {
public ZoomCommand(String id, int flags) { public ZoomCommand() {
super(id, flags);
} }
@Override public boolean service(AuRequest request, boolean everError) {
protected void process(AuRequest request) { if (!ZoomEvent.EVENT_NAME.equals(request.getCommand()))
final String[] data = request.getData(); return false;
Map<?, ?> map = request.getData();
final String[] data = (String[]) map.get("");
final Component comp = request.getComponent(); final Component comp = request.getComponent();
if (comp == null) if (comp == null)
@ -67,6 +71,8 @@ public class ZoomCommand extends Command {
query.setRecordCount(1); query.setRecordCount(1);
Events.postEvent(new ZoomEvent(comp, query)); Events.postEvent(new ZoomEvent(comp, query));
return true;
} }
} }

View File

@ -56,10 +56,6 @@ public abstract class AbstractDesktop extends AbstractUIPart implements IDesktop
public void onMenuSelected(int menuId) public void onMenuSelected(int menuId)
{ {
MMenu menu = new MMenu(Env.getCtx(), menuId, null); MMenu menu = new MMenu(Env.getCtx(), menuId, null);
if(menu == null)
{
return;
}
if(menu.getAction().equals(MMenu.ACTION_Window)) if(menu.getAction().equals(MMenu.ACTION_Window))
{ {
@ -193,14 +189,7 @@ public abstract class AbstractDesktop extends AbstractUIPart implements IDesktop
//fall back to highlighted if can't execute doModal //fall back to highlighted if can't execute doModal
if (Events.inEventListener()) if (Events.inEventListener())
{ {
try win.doModal();
{
win.doModal();
}
catch(InterruptedException e)
{
}
} }
else else
{ {

View File

@ -59,12 +59,12 @@ import org.zkoss.zk.ui.event.EventListener;
import org.zkoss.zk.ui.event.Events; import org.zkoss.zk.ui.event.Events;
import org.zkoss.zk.ui.event.OpenEvent; import org.zkoss.zk.ui.event.OpenEvent;
import org.zkoss.zk.ui.util.Clients; import org.zkoss.zk.ui.util.Clients;
import org.zkoss.zkex.zul.Borderlayout; import org.zkoss.zul.Borderlayout;
import org.zkoss.zkex.zul.Center; import org.zkoss.zul.Center;
import org.zkoss.zkex.zul.North; import org.zkoss.zul.Hlayout;
import org.zkoss.zkex.zul.West; import org.zkoss.zul.North;
import org.zkoss.zkmax.zul.Portalchildren; import org.zkoss.zul.Vlayout;
import org.zkoss.zkmax.zul.Portallayout; import org.zkoss.zul.West;
import org.zkoss.zul.Html; import org.zkoss.zul.Html;
import org.zkoss.zul.Panel; import org.zkoss.zul.Panel;
import org.zkoss.zul.Panelchildren; import org.zkoss.zul.Panelchildren;
@ -203,14 +203,14 @@ public class DefaultDesktop extends TabbedDesktop implements MenuListener, Seria
{ {
homeTab.getChildren().clear(); homeTab.getChildren().clear();
Portallayout portalLayout = new Portallayout(); Hlayout portalLayout = new Hlayout();
portalLayout.setWidth("100%"); portalLayout.setWidth("100%");
portalLayout.setHeight("100%"); portalLayout.setHeight("100%");
portalLayout.setStyle("position: absolute; overflow: auto"); portalLayout.setStyle("position: absolute; overflow: auto");
homeTab.appendChild(portalLayout); homeTab.appendChild(portalLayout);
// Dashboard content // Dashboard content
Portalchildren portalchildren = null; Vlayout portalchildren = null;
int currentColumnNo = 0; int currentColumnNo = 0;
int noOfCols = 0; int noOfCols = 0;
@ -225,7 +225,7 @@ public class DefaultDesktop extends TabbedDesktop implements MenuListener, Seria
int columnNo = dp.getColumnNo(); int columnNo = dp.getColumnNo();
if(portalchildren == null || currentColumnNo != columnNo) if(portalchildren == null || currentColumnNo != columnNo)
{ {
portalchildren = new Portalchildren(); portalchildren = new Vlayout();
portalLayout.appendChild(portalchildren); portalLayout.appendChild(portalchildren);
portalchildren.setWidth(width + "%"); portalchildren.setWidth(width + "%");
portalchildren.setStyle("padding: 5px"); portalchildren.setStyle("padding: 5px");

View File

@ -61,12 +61,12 @@ import org.zkoss.zk.ui.event.EventListener;
import org.zkoss.zk.ui.event.Events; import org.zkoss.zk.ui.event.Events;
import org.zkoss.zk.ui.event.OpenEvent; import org.zkoss.zk.ui.event.OpenEvent;
import org.zkoss.zk.ui.util.Clients; import org.zkoss.zk.ui.util.Clients;
import org.zkoss.zkex.zul.Borderlayout; import org.zkoss.zul.Borderlayout;
import org.zkoss.zkex.zul.Center; import org.zkoss.zul.Center;
import org.zkoss.zkex.zul.North; import org.zkoss.zul.Hlayout;
import org.zkoss.zkex.zul.West; import org.zkoss.zul.North;
import org.zkoss.zkmax.zul.Portalchildren; import org.zkoss.zul.Vlayout;
import org.zkoss.zkmax.zul.Portallayout; import org.zkoss.zul.West;
import org.zkoss.zul.Div; import org.zkoss.zul.Div;
import org.zkoss.zul.Html; import org.zkoss.zul.Html;
import org.zkoss.zul.Panel; import org.zkoss.zul.Panel;
@ -241,14 +241,14 @@ public class NavBar2Desktop extends TabbedDesktop implements MenuListener, Seria
{ {
homeTab.getChildren().clear(); homeTab.getChildren().clear();
Portallayout portalLayout = new Portallayout(); Hlayout portalLayout = new Hlayout();
portalLayout.setWidth("100%"); portalLayout.setWidth("100%");
portalLayout.setHeight("100%"); portalLayout.setHeight("100%");
portalLayout.setStyle("position: absolute; overflow: auto"); portalLayout.setStyle("position: absolute; overflow: auto");
homeTab.appendChild(portalLayout); homeTab.appendChild(portalLayout);
// Dashboard content // Dashboard content
Portalchildren portalchildren = null; Vlayout portalchildren = null;
int currentColumnNo = 0; int currentColumnNo = 0;
String sql = "SELECT COUNT(DISTINCT COLUMNNO) " String sql = "SELECT COUNT(DISTINCT COLUMNNO) "
@ -281,7 +281,7 @@ public class NavBar2Desktop extends TabbedDesktop implements MenuListener, Seria
int columnNo = rs.getInt(X_PA_DashboardContent.COLUMNNAME_ColumnNo); int columnNo = rs.getInt(X_PA_DashboardContent.COLUMNNAME_ColumnNo);
if(portalchildren == null || currentColumnNo != columnNo) if(portalchildren == null || currentColumnNo != columnNo)
{ {
portalchildren = new Portalchildren(); portalchildren = new Vlayout();
portalLayout.appendChild(portalchildren); portalLayout.appendChild(portalchildren);
portalchildren.setWidth(width + "%"); portalchildren.setWidth(width + "%");
portalchildren.setStyle("padding: 5px"); portalchildren.setStyle("padding: 5px");

View File

@ -63,12 +63,12 @@ import org.zkoss.zk.ui.event.EventListener;
import org.zkoss.zk.ui.event.Events; import org.zkoss.zk.ui.event.Events;
import org.zkoss.zk.ui.event.OpenEvent; import org.zkoss.zk.ui.event.OpenEvent;
import org.zkoss.zk.ui.util.Clients; import org.zkoss.zk.ui.util.Clients;
import org.zkoss.zkex.zul.Borderlayout; import org.zkoss.zul.Borderlayout;
import org.zkoss.zkex.zul.Center; import org.zkoss.zul.Center;
import org.zkoss.zkex.zul.North; import org.zkoss.zul.Hlayout;
import org.zkoss.zkex.zul.West; import org.zkoss.zul.North;
import org.zkoss.zkmax.zul.Portalchildren; import org.zkoss.zul.Vlayout;
import org.zkoss.zkmax.zul.Portallayout; import org.zkoss.zul.West;
import org.zkoss.zul.Div; import org.zkoss.zul.Div;
import org.zkoss.zul.Html; import org.zkoss.zul.Html;
import org.zkoss.zul.Panel; import org.zkoss.zul.Panel;
@ -243,14 +243,14 @@ public class NavBarDesktop extends TabbedDesktop implements MenuListener, Serial
{ {
homeTab.getChildren().clear(); homeTab.getChildren().clear();
Portallayout portalLayout = new Portallayout(); Hlayout portalLayout = new Hlayout();
portalLayout.setWidth("100%"); portalLayout.setWidth("100%");
portalLayout.setHeight("100%"); portalLayout.setHeight("100%");
portalLayout.setStyle("position: absolute; overflow: auto"); portalLayout.setStyle("position: absolute; overflow: auto");
homeTab.appendChild(portalLayout); homeTab.appendChild(portalLayout);
// Dashboard content // Dashboard content
Portalchildren portalchildren = null; Vlayout portalchildren = null;
int currentColumnNo = 0; int currentColumnNo = 0;
String sql = "SELECT COUNT(DISTINCT COLUMNNO) " String sql = "SELECT COUNT(DISTINCT COLUMNNO) "
@ -284,7 +284,7 @@ public class NavBarDesktop extends TabbedDesktop implements MenuListener, Serial
int columnNo = rs.getInt(X_PA_DashboardContent.COLUMNNAME_ColumnNo); int columnNo = rs.getInt(X_PA_DashboardContent.COLUMNNAME_ColumnNo);
if(portalchildren == null || currentColumnNo != columnNo) if(portalchildren == null || currentColumnNo != columnNo)
{ {
portalchildren = new Portalchildren(); portalchildren = new Vlayout();
portalLayout.appendChild(portalchildren); portalLayout.appendChild(portalchildren);
portalchildren.setWidth(width + "%"); portalchildren.setWidth(width + "%");
portalchildren.setStyle("padding: 5px"); portalchildren.setStyle("padding: 5px");

View File

@ -58,7 +58,7 @@ public class WAccountEditor extends WEditor implements ContextMenuListener
popupMenu = new WEditorPopupMenu(false, false, true); popupMenu = new WEditorPopupMenu(false, false, true);
popupMenu.addMenuListener(this); popupMenu.addMenuListener(this);
addChangeLogMenu(popupMenu); addChangeLogMenu(popupMenu);
getComponent().setContext(popupMenu.getId()); getComponent().setContext(popupMenu.getUuid());
} }
@Override @Override

View File

@ -106,7 +106,7 @@ public class WDateEditor extends WEditor implements ContextMenuListener
popupMenu = new WEditorPopupMenu(false, false, isShowPreference()); popupMenu = new WEditorPopupMenu(false, false, isShowPreference());
popupMenu.addMenuListener(this); popupMenu.addMenuListener(this);
addChangeLogMenu(popupMenu); addChangeLogMenu(popupMenu);
getComponent().setContext(popupMenu.getId()); getComponent().setContext(popupMenu.getUuid());
} }

View File

@ -100,7 +100,7 @@ public class WDatetimeEditor extends WEditor implements ContextMenuListener
popupMenu = new WEditorPopupMenu(false, false, isShowPreference()); popupMenu = new WEditorPopupMenu(false, false, isShowPreference());
popupMenu.addMenuListener(this); popupMenu.addMenuListener(this);
addChangeLogMenu(popupMenu); addChangeLogMenu(popupMenu);
getComponent().setContext(popupMenu.getId()); getComponent().setContext(popupMenu.getUuid());
} }
public void onEvent(Event event) public void onEvent(Event event)

View File

@ -130,18 +130,10 @@ public class WFilenameEditor extends WEditor
// Show File Open Dialog // Show File Open Dialog
Media file = null; Media file = null;
try file = Fileupload.get(true);
{
file = Fileupload.get(true);
if (file == null) if (file == null)
return;
}
catch (InterruptedException e)
{
log.warning(e.getLocalizedMessage());
return; return;
}
// String fileName = System.getProperty("java.io.tmpdir") + System.getProperty("file.separator") + ; // String fileName = System.getProperty("java.io.tmpdir") + System.getProperty("file.separator") + ;
// File tempFile = new File(fileName); // File tempFile = new File(fileName);

View File

@ -87,7 +87,7 @@ public class WLocationEditor extends WEditor implements EventListener, PropertyC
popupMenu = new WEditorPopupMenu(false, false, isShowPreference()); popupMenu = new WEditorPopupMenu(false, false, isShowPreference());
popupMenu.addMenuListener(this); popupMenu.addMenuListener(this);
addChangeLogMenu(popupMenu); addChangeLogMenu(popupMenu);
getComponent().setContext(popupMenu.getId()); getComponent().setContext(popupMenu.getUuid());
} }
@Override @Override

View File

@ -114,7 +114,7 @@ public class WLocatorEditor extends WEditor implements EventListener, PropertyCh
{ {
popupMenu = new WEditorPopupMenu(true, true, isShowPreference()); popupMenu = new WEditorPopupMenu(true, true, isShowPreference());
addChangeLogMenu(popupMenu); addChangeLogMenu(popupMenu);
getComponent().setContext(popupMenu.getId()); getComponent().setContext(popupMenu.getUuid());
} }
} }

View File

@ -122,7 +122,7 @@ public class WNumberEditor extends WEditor implements ContextMenuListener
popupMenu = new WEditorPopupMenu(false, false, isShowPreference()); popupMenu = new WEditorPopupMenu(false, false, isShowPreference());
addChangeLogMenu(popupMenu); addChangeLogMenu(popupMenu);
getComponent().setContext(popupMenu.getId()); getComponent().setContext(popupMenu.getUuid());
} }
/** /**

View File

@ -73,7 +73,7 @@ public class WPAttributeEditor extends WEditor implements ContextMenuListener
// Popup // Popup
popupMenu = new WEditorPopupMenu(true, false, false); popupMenu = new WEditorPopupMenu(true, false, false);
getComponent().getTextbox().setContext(popupMenu.getId()); getComponent().getTextbox().setContext(popupMenu.getUuid());
addChangeLogMenu(popupMenu); addChangeLogMenu(popupMenu);
getComponent().getTextbox().setReadonly(true); getComponent().getTextbox().setReadonly(true);

View File

@ -162,7 +162,7 @@ public class WSearchEditor extends WEditor implements ContextMenuListener, Value
getComponent().setButtonImage("/images/PickOpen10.png"); getComponent().setButtonImage("/images/PickOpen10.png");
} }
getComponent().getTextbox().setContext(popupMenu.getId()); getComponent().getTextbox().setContext(popupMenu.getUuid());
addChangeLogMenu(popupMenu); addChangeLogMenu(popupMenu);
return; return;

View File

@ -137,7 +137,7 @@ public class WStringEditor extends WEditor implements ContextMenuListener
addTextEditorMenu(popupMenu); addTextEditorMenu(popupMenu);
addChangeLogMenu(popupMenu); addChangeLogMenu(popupMenu);
getComponent().setContext(popupMenu.getId()); getComponent().setContext(popupMenu.getUuid());
if (gridField.isAutocomplete()) { if (gridField.isAutocomplete()) {
Combobox combo = (Combobox)getComponent(); Combobox combo = (Combobox)getComponent();

View File

@ -144,7 +144,7 @@ ContextMenuListener, IZoomableEditor
{ {
popupMenu = new WEditorPopupMenu(zoom, true, isShowPreference()); popupMenu = new WEditorPopupMenu(zoom, true, isShowPreference());
addChangeLogMenu(popupMenu); addChangeLogMenu(popupMenu);
getComponent().setContext(popupMenu.getId()); getComponent().setContext(popupMenu.getUuid());
} }
} }

View File

@ -101,7 +101,7 @@ public class WTimeEditor extends WEditor implements ContextMenuListener
popupMenu = new WEditorPopupMenu(false, false, isShowPreference()); popupMenu = new WEditorPopupMenu(false, false, isShowPreference());
popupMenu.addMenuListener(this); popupMenu.addMenuListener(this);
addChangeLogMenu(popupMenu); addChangeLogMenu(popupMenu);
getComponent().setContext(popupMenu.getId()); getComponent().setContext(popupMenu.getUuid());
} }
public void onEvent(Event event) public void onEvent(Event event)

View File

@ -42,7 +42,7 @@ public class WUrlEditor extends WEditor implements ContextMenuListener
popupMenu = new WEditorPopupMenu(false, false, isShowPreference()); popupMenu = new WEditorPopupMenu(false, false, isShowPreference());
popupMenu.addMenuListener(this); popupMenu.addMenuListener(this);
addChangeLogMenu(popupMenu); addChangeLogMenu(popupMenu);
getComponent().setContext(popupMenu.getId()); getComponent().setContext(popupMenu.getUuid());
} }

View File

@ -76,7 +76,7 @@ public class WYesNoEditor extends WEditor implements ContextMenuListener
popupMenu = new WEditorPopupMenu(false, false, isShowPreference()); popupMenu = new WEditorPopupMenu(false, false, isShowPreference());
popupMenu.addMenuListener(this); popupMenu.addMenuListener(this);
addChangeLogMenu(popupMenu); addChangeLogMenu(popupMenu);
getComponent().setContext(popupMenu.getId()); getComponent().setContext(popupMenu.getUuid());
} }
public void onEvent(Event event) public void onEvent(Event event)

View File

@ -23,7 +23,7 @@ import org.zkoss.zk.ui.event.Event;
*/ */
public class ZoomEvent extends Event { public class ZoomEvent extends Event {
private static final String EVENT_NAME = "onZoom"; public final static String EVENT_NAME = "onZoom";
public ZoomEvent(Component target, Object data) { public ZoomEvent(Component target, Object data) {
super(EVENT_NAME, target, data); super(EVENT_NAME, target, data);

View File

@ -41,9 +41,9 @@ import org.compiere.util.Msg;
import org.compiere.util.ValueNamePair; import org.compiere.util.ValueNamePair;
import org.zkoss.zk.ui.event.Event; import org.zkoss.zk.ui.event.Event;
import org.zkoss.zk.ui.event.EventListener; import org.zkoss.zk.ui.event.EventListener;
import org.zkoss.zkex.zul.Borderlayout; import org.zkoss.zul.Borderlayout;
import org.zkoss.zkex.zul.Center; import org.zkoss.zul.Center;
import org.zkoss.zkex.zul.South; import org.zkoss.zul.South;
import org.zkoss.zul.Div; import org.zkoss.zul.Div;
public class WTranslationDialog extends TranslationController implements IFormController, EventListener { public class WTranslationDialog extends TranslationController implements IFormController, EventListener {

View File

@ -68,14 +68,14 @@ import org.zkoss.zk.ui.event.Event;
import org.zkoss.zk.ui.event.EventListener; import org.zkoss.zk.ui.event.EventListener;
import org.zkoss.zk.ui.event.Events; import org.zkoss.zk.ui.event.Events;
import org.zkoss.zk.ui.util.Clients; import org.zkoss.zk.ui.util.Clients;
import org.zkoss.zkex.zul.Borderlayout; import org.zkoss.zul.Borderlayout;
import org.zkoss.zkex.zul.Center; import org.zkoss.zul.Center;
import org.zkoss.zkex.zul.West; import org.zkoss.zul.West;
import org.zkoss.zul.Div; import org.zkoss.zul.Div;
import org.zkoss.zul.Group; import org.zkoss.zul.Group;
import org.zkoss.zul.Groupfoot; import org.zkoss.zul.Groupfoot;
import org.zkoss.zul.Separator; import org.zkoss.zul.Separator;
import org.zkoss.zul.SimpleTreeNode; import org.zkoss.zul.DefaultTreeNode;
import org.zkoss.zul.Space; import org.zkoss.zul.Space;
import org.zkoss.zul.Treeitem; import org.zkoss.zul.Treeitem;
@ -487,7 +487,7 @@ DataStatusListener, IADTabpanel, VetoableChangeListener
label.addEventListener(Events.ON_CLICK, new ZoomListener((IZoomableEditor) editor)); label.addEventListener(Events.ON_CLICK, new ZoomListener((IZoomableEditor) editor));
} }
label.setContext(popupMenu.getId()); label.setContext(popupMenu.getUuid());
} }
} }
} }
@ -813,11 +813,11 @@ DataStatusListener, IADTabpanel, VetoableChangeListener
} }
else if (event.getTarget() == treePanel.getTree()) { else if (event.getTarget() == treePanel.getTree()) {
Treeitem item = treePanel.getTree().getSelectedItem(); Treeitem item = treePanel.getTree().getSelectedItem();
navigateTo((SimpleTreeNode)item.getValue()); navigateTo((DefaultTreeNode)item.getValue());
} }
} }
private void navigateTo(SimpleTreeNode value) { private void navigateTo(DefaultTreeNode value) {
MTreeNode treeNode = (MTreeNode) value.getData(); MTreeNode treeNode = (MTreeNode) value.getData();
// We Have a TreeNode // We Have a TreeNode
int nodeID = treeNode.getNode_ID(); int nodeID = treeNode.getNode_ID();
@ -940,7 +940,7 @@ DataStatusListener, IADTabpanel, VetoableChangeListener
SimpleTreeModel model = (SimpleTreeModel) treePanel.getTree().getModel(); SimpleTreeModel model = (SimpleTreeModel) treePanel.getTree().getModel();
if (treePanel.getTree().getSelectedItem() != null) { if (treePanel.getTree().getSelectedItem() != null) {
SimpleTreeNode treeNode = (SimpleTreeNode) treePanel.getTree().getSelectedItem().getValue(); DefaultTreeNode treeNode = (DefaultTreeNode) treePanel.getTree().getSelectedItem().getValue();
MTreeNode data = (MTreeNode) treeNode.getData(); MTreeNode data = (MTreeNode) treeNode.getData();
if (data.getNode_ID() == recordId) { if (data.getNode_ID() == recordId) {
model.removeNode(treeNode); model.removeNode(treeNode);
@ -948,7 +948,7 @@ DataStatusListener, IADTabpanel, VetoableChangeListener
} }
} }
SimpleTreeNode treeNode = model.find(null, recordId); DefaultTreeNode treeNode = model.find(null, recordId);
if (treeNode != null) { if (treeNode != null) {
model.removeNode(treeNode); model.removeNode(treeNode);
} }
@ -962,13 +962,13 @@ DataStatusListener, IADTabpanel, VetoableChangeListener
String imageIndicator = (String)gridTab.getValue("Action"); // Menu - Action String imageIndicator = (String)gridTab.getValue("Action"); // Menu - Action
// //
SimpleTreeModel model = (SimpleTreeModel) treePanel.getTree().getModel(); SimpleTreeModel model = (SimpleTreeModel) treePanel.getTree().getModel();
SimpleTreeNode treeNode = model.getRoot(); DefaultTreeNode treeNode = model.getRoot();
MTreeNode root = (MTreeNode) treeNode.getData(); MTreeNode root = (MTreeNode) treeNode.getData();
MTreeNode node = new MTreeNode (gridTab.getRecord_ID(), 0, name, description, MTreeNode node = new MTreeNode (gridTab.getRecord_ID(), 0, name, description,
root.getNode_ID(), summary, imageIndicator, false, null); root.getNode_ID(), summary, imageIndicator, false, null);
SimpleTreeNode newNode = new SimpleTreeNode(node, new ArrayList<Object>()); DefaultTreeNode newNode = new DefaultTreeNode(node, new ArrayList<Object>());
model.addNode(newNode); model.addNode(newNode);
int[] path = model.getPath(model.getRoot(), newNode); int[] path = model.getPath(newNode);
Treeitem ti = treePanel.getTree().renderItemByPath(path); Treeitem ti = treePanel.getTree().renderItemByPath(path);
treePanel.getTree().setSelectedItem(ti); treePanel.getTree().setSelectedItem(ti);
} }
@ -978,15 +978,15 @@ DataStatusListener, IADTabpanel, VetoableChangeListener
if (recordId <= 0) return; if (recordId <= 0) return;
if (treePanel.getTree().getSelectedItem() != null) { if (treePanel.getTree().getSelectedItem() != null) {
SimpleTreeNode treeNode = (SimpleTreeNode) treePanel.getTree().getSelectedItem().getValue(); DefaultTreeNode treeNode = (DefaultTreeNode) treePanel.getTree().getSelectedItem().getValue();
MTreeNode data = (MTreeNode) treeNode.getData(); MTreeNode data = (MTreeNode) treeNode.getData();
if (data.getNode_ID() == recordId) return; if (data.getNode_ID() == recordId) return;
} }
SimpleTreeModel model = (SimpleTreeModel) treePanel.getTree().getModel(); SimpleTreeModel model = (SimpleTreeModel) treePanel.getTree().getModel();
SimpleTreeNode treeNode = model.find(null, recordId); DefaultTreeNode treeNode = model.find(null, recordId);
if (treeNode != null) { if (treeNode != null) {
int[] path = model.getPath(model.getRoot(), treeNode); int[] path = model.getPath(treeNode);
Treeitem ti = treePanel.getTree().renderItemByPath(path); Treeitem ti = treePanel.getTree().renderItemByPath(path);
treePanel.getTree().setSelectedItem(ti); treePanel.getTree().setSelectedItem(ti);
} else { } else {

View File

@ -47,12 +47,12 @@ import org.zkoss.zk.ui.event.Event;
import org.zkoss.zk.ui.event.EventListener; import org.zkoss.zk.ui.event.EventListener;
import org.zkoss.zk.ui.event.Events; import org.zkoss.zk.ui.event.Events;
import org.zkoss.zk.ui.event.KeyEvent; import org.zkoss.zk.ui.event.KeyEvent;
import org.zkoss.zkex.zul.Borderlayout; import org.zkoss.zul.Borderlayout;
import org.zkoss.zkex.zul.Center; import org.zkoss.zul.Center;
import org.zkoss.zkex.zul.East; import org.zkoss.zul.East;
import org.zkoss.zkex.zul.North; import org.zkoss.zul.North;
import org.zkoss.zkex.zul.South; import org.zkoss.zul.South;
import org.zkoss.zkex.zul.West; import org.zkoss.zul.West;
import org.zkoss.zul.Tab; import org.zkoss.zul.Tab;
/** /**

View File

@ -1850,12 +1850,8 @@ public abstract class AbstractADWindowPanel extends AbstractUIPart implements To
AD_Process_ID,table_ID, record_ID, true); AD_Process_ID,table_ID, record_ID, true);
if (dialog.isValid()) { if (dialog.isValid()) {
dialog.setPosition("center"); dialog.setPosition("center");
try {
dialog.setPage(this.getComponent().getPage()); dialog.setPage(this.getComponent().getPage());
dialog.doModal(); dialog.doModal();
}
catch (InterruptedException e) {
}
} }
} }
@ -2325,14 +2321,14 @@ public abstract class AbstractADWindowPanel extends AbstractUIPart implements To
m_uiLocked = true; m_uiLocked = true;
if (Executions.getCurrent() != null) if (Executions.getCurrent() != null)
Clients.showBusy(null, true); Clients.showBusy(null);
else else
{ {
try { try {
//acquire desktop, 2 second timeout //acquire desktop, 2 second timeout
Executions.activate(getComponent().getDesktop(), 2000); Executions.activate(getComponent().getDesktop(), 2000);
try { try {
Clients.showBusy(null, true); Clients.showBusy(null);
} catch(Error ex){ } catch(Error ex){
throw ex; throw ex;
} finally{ } finally{
@ -2364,7 +2360,7 @@ public abstract class AbstractADWindowPanel extends AbstractUIPart implements To
{ {
updateUI(pi); updateUI(pi);
} }
Clients.showBusy(null, false); Clients.clearBusy(null);
} }
else else
{ {
@ -2376,7 +2372,7 @@ public abstract class AbstractADWindowPanel extends AbstractUIPart implements To
{ {
updateUI(pi); updateUI(pi);
} }
Clients.showBusy(null, false); Clients.clearBusy(null);
} catch(Error ex){ } catch(Error ex){
throw ex; throw ex;
} finally{ } finally{

View File

@ -24,9 +24,9 @@ import org.adempiere.webui.window.AboutWindow;
import org.zkoss.zk.ui.event.Event; import org.zkoss.zk.ui.event.Event;
import org.zkoss.zk.ui.event.EventListener; import org.zkoss.zk.ui.event.EventListener;
import org.zkoss.zk.ui.event.Events; import org.zkoss.zk.ui.event.Events;
import org.zkoss.zkex.zul.Borderlayout; import org.zkoss.zul.Borderlayout;
import org.zkoss.zkex.zul.Center; import org.zkoss.zul.Center;
import org.zkoss.zkex.zul.West; import org.zkoss.zul.West;
import org.zkoss.zul.Image; import org.zkoss.zul.Image;
import org.zkoss.zul.Vbox; import org.zkoss.zul.Vbox;

View File

@ -42,10 +42,10 @@ import org.compiere.util.Env;
import org.compiere.util.Msg; import org.compiere.util.Msg;
import org.zkoss.zk.ui.event.EventListener; import org.zkoss.zk.ui.event.EventListener;
import org.zkoss.zk.ui.event.Events; import org.zkoss.zk.ui.event.Events;
import org.zkoss.zkex.zul.Borderlayout; import org.zkoss.zul.Borderlayout;
import org.zkoss.zkex.zul.Center; import org.zkoss.zul.Center;
import org.zkoss.zkex.zul.North; import org.zkoss.zul.North;
import org.zkoss.zkex.zul.South; import org.zkoss.zul.South;
import org.zkoss.zul.Div; import org.zkoss.zul.Div;
import org.zkoss.zul.Separator; import org.zkoss.zul.Separator;
import org.zkoss.zul.Vbox; import org.zkoss.zul.Vbox;

View File

@ -47,10 +47,10 @@ import org.compiere.util.Msg;
import org.zkoss.zk.ui.event.Event; import org.zkoss.zk.ui.event.Event;
import org.zkoss.zk.ui.event.EventListener; import org.zkoss.zk.ui.event.EventListener;
import org.zkoss.zk.ui.event.Events; import org.zkoss.zk.ui.event.Events;
import org.zkoss.zkex.zul.Borderlayout; import org.zkoss.zul.Borderlayout;
import org.zkoss.zkex.zul.Center; import org.zkoss.zul.Center;
import org.zkoss.zkex.zul.North; import org.zkoss.zul.North;
import org.zkoss.zkex.zul.South; import org.zkoss.zul.South;
import org.zkoss.zul.Div; import org.zkoss.zul.Div;
import org.zkoss.zul.Separator; import org.zkoss.zul.Separator;
import org.zkoss.zul.Vbox; import org.zkoss.zul.Vbox;

View File

@ -42,10 +42,10 @@ import org.compiere.util.Msg;
import org.compiere.util.Util; import org.compiere.util.Util;
import org.zkoss.zk.ui.event.EventListener; import org.zkoss.zk.ui.event.EventListener;
import org.zkoss.zk.ui.event.Events; import org.zkoss.zk.ui.event.Events;
import org.zkoss.zkex.zul.Borderlayout; import org.zkoss.zul.Borderlayout;
import org.zkoss.zkex.zul.Center; import org.zkoss.zul.Center;
import org.zkoss.zkex.zul.North; import org.zkoss.zul.North;
import org.zkoss.zkex.zul.South; import org.zkoss.zul.South;
import org.zkoss.zul.Div; import org.zkoss.zul.Div;
import org.zkoss.zul.Separator; import org.zkoss.zul.Separator;
import org.zkoss.zul.Vbox; import org.zkoss.zul.Vbox;

View File

@ -46,10 +46,10 @@ import org.compiere.util.Msg;
import org.compiere.util.Util; import org.compiere.util.Util;
import org.zkoss.zk.ui.event.EventListener; import org.zkoss.zk.ui.event.EventListener;
import org.zkoss.zk.ui.event.Events; import org.zkoss.zk.ui.event.Events;
import org.zkoss.zkex.zul.Borderlayout; import org.zkoss.zul.Borderlayout;
import org.zkoss.zkex.zul.Center; import org.zkoss.zul.Center;
import org.zkoss.zkex.zul.North; import org.zkoss.zul.North;
import org.zkoss.zkex.zul.South; import org.zkoss.zul.South;
import org.zkoss.zul.Div; import org.zkoss.zul.Div;
import org.zkoss.zul.Hbox; import org.zkoss.zul.Hbox;
import org.zkoss.zul.Separator; import org.zkoss.zul.Separator;

View File

@ -41,10 +41,10 @@ import org.compiere.util.Env;
import org.compiere.util.Msg; import org.compiere.util.Msg;
import org.compiere.util.Util; import org.compiere.util.Util;
import org.zkoss.zk.ui.event.EventListener; import org.zkoss.zk.ui.event.EventListener;
import org.zkoss.zkex.zul.Borderlayout; import org.zkoss.zul.Borderlayout;
import org.zkoss.zkex.zul.Center; import org.zkoss.zul.Center;
import org.zkoss.zkex.zul.North; import org.zkoss.zul.North;
import org.zkoss.zkex.zul.South; import org.zkoss.zul.South;
import org.zkoss.zul.Div; import org.zkoss.zul.Div;
import org.zkoss.zul.Separator; import org.zkoss.zul.Separator;
import org.zkoss.zul.Vbox; import org.zkoss.zul.Vbox;

View File

@ -46,10 +46,10 @@ import org.compiere.util.Msg;
import org.compiere.util.Util; import org.compiere.util.Util;
import org.zkoss.zk.ui.event.EventListener; import org.zkoss.zk.ui.event.EventListener;
import org.zkoss.zk.ui.event.Events; import org.zkoss.zk.ui.event.Events;
import org.zkoss.zkex.zul.Borderlayout; import org.zkoss.zul.Borderlayout;
import org.zkoss.zkex.zul.Center; import org.zkoss.zul.Center;
import org.zkoss.zkex.zul.North; import org.zkoss.zul.North;
import org.zkoss.zkex.zul.South; import org.zkoss.zul.South;
import org.zkoss.zul.Div; import org.zkoss.zul.Div;
import org.zkoss.zul.Hbox; import org.zkoss.zul.Hbox;
import org.zkoss.zul.Separator; import org.zkoss.zul.Separator;

View File

@ -48,10 +48,10 @@ import org.compiere.util.KeyNamePair;
import org.compiere.util.Msg; import org.compiere.util.Msg;
import org.compiere.util.Util; import org.compiere.util.Util;
import org.zkoss.zk.ui.WrongValueException; import org.zkoss.zk.ui.WrongValueException;
import org.zkoss.zkex.zul.Borderlayout; import org.zkoss.zul.Borderlayout;
import org.zkoss.zkex.zul.Center; import org.zkoss.zul.Center;
import org.zkoss.zkex.zul.North; import org.zkoss.zul.North;
import org.zkoss.zkex.zul.South; import org.zkoss.zul.South;
import org.zkoss.zul.Div; import org.zkoss.zul.Div;
import org.zkoss.zul.Hbox; import org.zkoss.zul.Hbox;
import org.zkoss.zul.Separator; import org.zkoss.zul.Separator;

View File

@ -47,10 +47,10 @@ import org.compiere.util.Env;
import org.compiere.util.Msg; import org.compiere.util.Msg;
import org.compiere.util.Util; import org.compiere.util.Util;
import org.zkoss.zk.ui.WrongValueException; import org.zkoss.zk.ui.WrongValueException;
import org.zkoss.zkex.zul.Borderlayout; import org.zkoss.zul.Borderlayout;
import org.zkoss.zkex.zul.Center; import org.zkoss.zul.Center;
import org.zkoss.zkex.zul.North; import org.zkoss.zul.North;
import org.zkoss.zkex.zul.South; import org.zkoss.zul.South;
import org.zkoss.zul.Div; import org.zkoss.zul.Div;
import org.zkoss.zul.Hbox; import org.zkoss.zul.Hbox;
import org.zkoss.zul.Separator; import org.zkoss.zul.Separator;

View File

@ -33,10 +33,10 @@ import org.compiere.util.KeyNamePair;
import org.compiere.util.Msg; import org.compiere.util.Msg;
import org.zkoss.zk.ui.event.Event; import org.zkoss.zk.ui.event.Event;
import org.zkoss.zk.ui.event.EventListener; import org.zkoss.zk.ui.event.EventListener;
import org.zkoss.zkex.zul.Borderlayout; import org.zkoss.zul.Borderlayout;
import org.zkoss.zkex.zul.Center; import org.zkoss.zul.Center;
import org.zkoss.zkex.zul.North; import org.zkoss.zul.North;
import org.zkoss.zkex.zul.South; import org.zkoss.zul.South;
import org.zkoss.zul.Div; import org.zkoss.zul.Div;
/** /**

View File

@ -1290,4 +1290,10 @@ public abstract class InfoPanel extends Window implements EventListener, WTableM
} }
} }
} }
@Override
public String getSortDirection(Comparator cmpr) {
return "natural";
}
} // Info } // Info

View File

@ -47,10 +47,10 @@ import org.compiere.util.Msg;
import org.compiere.util.Util; import org.compiere.util.Util;
import org.zkoss.zk.ui.event.EventListener; import org.zkoss.zk.ui.event.EventListener;
import org.zkoss.zk.ui.event.Events; import org.zkoss.zk.ui.event.Events;
import org.zkoss.zkex.zul.Borderlayout; import org.zkoss.zul.Borderlayout;
import org.zkoss.zkex.zul.Center; import org.zkoss.zul.Center;
import org.zkoss.zkex.zul.North; import org.zkoss.zul.North;
import org.zkoss.zkex.zul.South; import org.zkoss.zul.South;
import org.zkoss.zul.Div; import org.zkoss.zul.Div;
import org.zkoss.zul.Hbox; import org.zkoss.zul.Hbox;
import org.zkoss.zul.Separator; import org.zkoss.zul.Separator;

View File

@ -39,6 +39,7 @@ import java.sql.ResultSet;
import java.sql.SQLException; import java.sql.SQLException;
import java.sql.Timestamp; import java.sql.Timestamp;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Comparator;
import java.util.Vector; import java.util.Vector;
import java.util.logging.Level; import java.util.logging.Level;
@ -77,10 +78,10 @@ import org.zkoss.zk.ui.Component;
import org.zkoss.zk.ui.event.Event; import org.zkoss.zk.ui.event.Event;
import org.zkoss.zk.ui.event.EventListener; import org.zkoss.zk.ui.event.EventListener;
import org.zkoss.zk.ui.event.Events; import org.zkoss.zk.ui.event.Events;
import org.zkoss.zkex.zul.Borderlayout; import org.zkoss.zul.Borderlayout;
import org.zkoss.zkex.zul.Center; import org.zkoss.zul.Center;
import org.zkoss.zkex.zul.North; import org.zkoss.zul.North;
import org.zkoss.zkex.zul.South; import org.zkoss.zul.South;
/** /**
* Search Product and return selection * Search Product and return selection
@ -1422,5 +1423,4 @@ public class InfoProductPanel extends InfoPanel implements EventListener
return M_AttributeSet_ID; return M_AttributeSet_ID;
} }
} // InfoProduct } // InfoProduct

View File

@ -45,10 +45,10 @@ import org.zkoss.zk.ui.Component;
import org.zkoss.zk.ui.event.Event; import org.zkoss.zk.ui.event.Event;
import org.zkoss.zk.ui.event.EventListener; import org.zkoss.zk.ui.event.EventListener;
import org.zkoss.zk.ui.event.Events; import org.zkoss.zk.ui.event.Events;
import org.zkoss.zkex.zul.Borderlayout; import org.zkoss.zul.Borderlayout;
import org.zkoss.zkex.zul.Center; import org.zkoss.zul.Center;
import org.zkoss.zkex.zul.North; import org.zkoss.zul.North;
import org.zkoss.zkex.zul.South; import org.zkoss.zul.South;
/** /**
* Price History for BPartner/Product * Price History for BPartner/Product

View File

@ -434,7 +434,8 @@ public class LoginPanel extends Window implements EventListener
Locales.setThreadLocal(language.getLocale()); Locales.setThreadLocal(language.getLocale());
Clients.response("zkLocaleJavaScript", new AuScript(null, ZkFns.outLocaleJavaScript())); //TODO: Replace with zk6 api
// Clients.response("zkLocaleJavaScript", new AuScript(null, ZkFns.outLocaleJavaScript()));
String timeoutText = getUpdateTimeoutTextScript(); String timeoutText = getUpdateTimeoutTextScript();
if (!Strings.isEmpty(timeoutText)) if (!Strings.isEmpty(timeoutText))
Clients.response("zkLocaleJavaScript2", new AuScript(null, timeoutText)); Clients.response("zkLocaleJavaScript2", new AuScript(null, timeoutText));

View File

@ -36,7 +36,7 @@ import org.zkoss.zk.ui.event.EventListener;
import org.zkoss.zk.ui.event.Events; import org.zkoss.zk.ui.event.Events;
import org.zkoss.zk.ui.util.Clients; import org.zkoss.zk.ui.util.Clients;
import org.zkoss.zul.Div; import org.zkoss.zul.Div;
import org.zkoss.zul.SimpleTreeNode; import org.zkoss.zul.DefaultTreeNode;
import org.zkoss.zul.Tree; import org.zkoss.zul.Tree;
import org.zkoss.zul.Treeitem; import org.zkoss.zul.Treeitem;
import org.zkoss.zul.event.TreeDataEvent; import org.zkoss.zul.event.TreeDataEvent;
@ -141,7 +141,7 @@ public class TreeSearchPanel extends Panel implements EventListener, TreeDataLis
treeNodeItemMap.put(key, treeItem); treeNodeItemMap.put(key, treeItem);
} }
private void addTreeItem(SimpleTreeNode node) { private void addTreeItem(DefaultTreeNode node) {
Object data = node.getData(); Object data = node.getData();
if (data instanceof MTreeNode) { if (data instanceof MTreeNode) {
MTreeNode mNode = (MTreeNode) data; MTreeNode mNode = (MTreeNode) data;
@ -173,7 +173,7 @@ public class TreeSearchPanel extends Panel implements EventListener, TreeDataLis
}); });
} else { } else {
TreeUtils.traverse(tree.getModel(), new TreeNodeAction() { TreeUtils.traverse(tree.getModel(), new TreeNodeAction() {
public void run(SimpleTreeNode treeNode) { public void run(DefaultTreeNode treeNode) {
addTreeItem(treeNode); addTreeItem(treeNode);
} }
}); });
@ -193,9 +193,9 @@ public class TreeSearchPanel extends Panel implements EventListener, TreeDataLis
treeValues[i] = treeItem.getLabel(); treeValues[i] = treeItem.getLabel();
treeDescription[i] = treeItem.getTooltiptext(); treeDescription[i] = treeItem.getTooltiptext();
} }
else if (value instanceof SimpleTreeNode) else if (value instanceof DefaultTreeNode)
{ {
SimpleTreeNode sNode = (SimpleTreeNode) value; DefaultTreeNode sNode = (DefaultTreeNode) value;
MTreeNode mNode = (MTreeNode) sNode.getData(); MTreeNode mNode = (MTreeNode) sNode.getData();
treeValues[i] = mNode.getName(); treeValues[i] = mNode.getName();
treeDescription[i] = mNode.getDescription(); treeDescription[i] = mNode.getDescription();
@ -232,15 +232,15 @@ public class TreeSearchPanel extends Panel implements EventListener, TreeDataLis
} else if (node instanceof Treeitem) { } else if (node instanceof Treeitem) {
treeItem = (Treeitem) node; treeItem = (Treeitem) node;
} else { } else {
SimpleTreeNode sNode = (SimpleTreeNode) node; DefaultTreeNode sNode = (DefaultTreeNode) node;
int[] path = tree.getModel().getPath(tree.getModel().getRoot(), sNode); int[] path = tree.getModel().getPath(sNode);
treeItem = tree.renderItemByPath(path); treeItem = tree.renderItemByPath(path);
tree.setSelectedItem(treeItem); tree.setSelectedItem(treeItem);
} }
if (treeItem != null) if (treeItem != null)
{ {
select(treeItem); select(treeItem);
Clients.showBusy(Msg.getMsg(Env.getCtx(), "Loading"), true); Clients.showBusy(Msg.getMsg(Env.getCtx(), "Loading"));
Events.echoEvent("onPostSelect", this, null); Events.echoEvent("onPostSelect", this, null);
} }
} }
@ -250,7 +250,7 @@ public class TreeSearchPanel extends Panel implements EventListener, TreeDataLis
* don't call this directly, use internally for post selection event * don't call this directly, use internally for post selection event
*/ */
public void onPostSelect() { public void onPostSelect() {
Clients.showBusy(null, false); Clients.clearBusy();
Event event = null; Event event = null;
if (eventToFire.equals(Events.ON_CLICK)) if (eventToFire.equals(Events.ON_CLICK))
event = new Event(Events.ON_CLICK, tree.getSelectedItem().getTreerow()); event = new Event(Events.ON_CLICK, tree.getSelectedItem().getTreerow());

View File

@ -46,10 +46,10 @@ import org.zkoss.zk.ui.event.Event;
import org.zkoss.zk.ui.event.EventListener; import org.zkoss.zk.ui.event.EventListener;
import org.zkoss.zk.ui.event.Events; import org.zkoss.zk.ui.event.Events;
import org.zkoss.zk.ui.util.Clients; import org.zkoss.zk.ui.util.Clients;
import org.zkoss.zkex.zul.Borderlayout; import org.zkoss.zul.Borderlayout;
import org.zkoss.zkex.zul.Center; import org.zkoss.zul.Center;
import org.zkoss.zkex.zul.North; import org.zkoss.zul.North;
import org.zkoss.zkex.zul.South; import org.zkoss.zul.South;
import org.zkoss.zul.Div; import org.zkoss.zul.Div;
import org.zkoss.zul.Filedownload; import org.zkoss.zul.Filedownload;
import org.zkoss.zul.Fileupload; import org.zkoss.zul.Fileupload;
@ -513,25 +513,18 @@ public class WAttachment extends Window implements EventListener
Media media = null; Media media = null;
try media = Fileupload.get(true);
{
media = Fileupload.get(true);
if (media != null) if (media != null)
{
// pdfViewer.setContent(media);
;
}
else
{
preview.setVisible(true);
preview.invalidate();
return;
}
}
catch (InterruptedException e)
{ {
log.log(Level.WARNING, e.getLocalizedMessage(), e); // pdfViewer.setContent(media);
;
}
else
{
preview.setVisible(true);
preview.invalidate();
return;
} }
String fileName = media.getName(); String fileName = media.getName();

View File

@ -136,7 +136,6 @@ public class WSchedule extends Panel implements EventListener
dayBand.setIntervalPixels(100); dayBand.setIntervalPixels(100);
dayBand.setSyncWith(hourBand.getId()); dayBand.setSyncWith(hourBand.getId());
dayBand.setTimeZone(TimeZone.getDefault()); dayBand.setTimeZone(TimeZone.getDefault());
dayBand.setShowEventText(false);
// listening band scroll event // listening band scroll event
dayBand.addEventListener("onBandScroll", this); dayBand.addEventListener("onBandScroll", this);
@ -149,7 +148,6 @@ public class WSchedule extends Panel implements EventListener
mthBand.setIntervalPixels(150); mthBand.setIntervalPixels(150);
mthBand.setSyncWith(dayBand.getId()); mthBand.setSyncWith(dayBand.getId());
mthBand.setTimeZone(TimeZone.getDefault()); mthBand.setTimeZone(TimeZone.getDefault());
mthBand.setShowEventText(false);
} }
/** /**

View File

@ -23,8 +23,8 @@ import org.zkoss.zk.ui.Component;
import org.zkoss.zk.ui.event.Event; import org.zkoss.zk.ui.event.Event;
import org.zkoss.zk.ui.event.EventListener; import org.zkoss.zk.ui.event.EventListener;
import org.zkoss.zk.ui.event.Events; import org.zkoss.zk.ui.event.Events;
import org.zkoss.zkex.zul.Borderlayout; import org.zkoss.zul.Borderlayout;
import org.zkoss.zkex.zul.Center; import org.zkoss.zul.Center;
/** /**
* *

View File

@ -359,7 +359,7 @@ public class InvoicePrint extends SvrProcess
File outFile = File.createTempFile("InvoicePrint", ".pdf"); File outFile = File.createTempFile("InvoicePrint", ".pdf");
AEnv.mergePdf(pdfList, outFile); AEnv.mergePdf(pdfList, outFile);
Clients.showBusy(null, false); Clients.showBusy(null, null);
Window win = new SimplePDFViewer(this.getName(), new FileInputStream(outFile)); Window win = new SimplePDFViewer(this.getName(), new FileInputStream(outFile));
win.setAttribute(Window.MODE_KEY, Window.MODE_HIGHLIGHTED); win.setAttribute(Window.MODE_KEY, Window.MODE_HIGHLIGHTED);
SessionManager.getAppDesktop().showWindow(win, "center"); SessionManager.getAppDesktop().showWindow(win, "center");
@ -367,7 +367,7 @@ public class InvoicePrint extends SvrProcess
log.log(Level.SEVERE, e.getLocalizedMessage(), e); log.log(Level.SEVERE, e.getLocalizedMessage(), e);
} }
} else if (pdfList.size() > 0) { } else if (pdfList.size() > 0) {
Clients.showBusy(null, false); Clients.clearBusy(null);
try { try {
Window win = new SimplePDFViewer(this.getName(), new FileInputStream(pdfList.get(0))); Window win = new SimplePDFViewer(this.getName(), new FileInputStream(pdfList.get(0)));
win.setAttribute(Window.MODE_KEY, Window.MODE_HIGHLIGHTED); win.setAttribute(Window.MODE_KEY, Window.MODE_HIGHLIGHTED);

View File

@ -13,7 +13,7 @@
*****************************************************************************/ *****************************************************************************/
package org.adempiere.webui.util; package org.adempiere.webui.util;
import org.zkoss.zul.SimpleTreeNode; import org.zkoss.zul.DefaultTreeNode;
/** /**
* *
@ -26,5 +26,5 @@ public interface TreeNodeAction {
* *
* @param treeNode * @param treeNode
*/ */
public void run(SimpleTreeNode treeNode); public void run(DefaultTreeNode treeNode);
} }

View File

@ -15,7 +15,7 @@ package org.adempiere.webui.util;
import java.util.List; import java.util.List;
import org.zkoss.zul.SimpleTreeNode; import org.zkoss.zul.DefaultTreeNode;
import org.zkoss.zul.Tree; import org.zkoss.zul.Tree;
import org.zkoss.zul.TreeModel; import org.zkoss.zul.TreeModel;
import org.zkoss.zul.Treechildren; import org.zkoss.zul.Treechildren;
@ -120,8 +120,8 @@ public class TreeUtils {
int count = model.getChildCount(parent); int count = model.getChildCount(parent);
for(int i = 0; i < count; i++) { for(int i = 0; i < count; i++) {
Object child = model.getChild(parent, i); Object child = model.getChild(parent, i);
if (child instanceof SimpleTreeNode) { if (child instanceof DefaultTreeNode) {
action.run((SimpleTreeNode) child); action.run((DefaultTreeNode) child);
} }
traverse(model, child, action); traverse(model, child, action);
} }

View File

@ -82,10 +82,10 @@ import org.zkoss.zk.ui.event.Event;
import org.zkoss.zk.ui.event.EventListener; import org.zkoss.zk.ui.event.EventListener;
import org.zkoss.zk.ui.event.Events; import org.zkoss.zk.ui.event.Events;
import org.zkoss.zk.ui.util.Clients; import org.zkoss.zk.ui.util.Clients;
import org.zkoss.zkex.zul.Borderlayout; import org.zkoss.zul.Borderlayout;
import org.zkoss.zkex.zul.Center; import org.zkoss.zul.Center;
import org.zkoss.zkex.zul.North; import org.zkoss.zul.North;
import org.zkoss.zkex.zul.South; import org.zkoss.zul.South;
import org.zkoss.zul.Comboitem; import org.zkoss.zul.Comboitem;
import org.zkoss.zul.Hbox; import org.zkoss.zul.Hbox;

View File

@ -56,10 +56,10 @@ import org.zkoss.zk.ui.Executions;
import org.zkoss.zk.ui.event.Event; import org.zkoss.zk.ui.event.Event;
import org.zkoss.zk.ui.event.EventListener; import org.zkoss.zk.ui.event.EventListener;
import org.zkoss.zk.ui.event.Events; import org.zkoss.zk.ui.event.Events;
import org.zkoss.zkex.zul.Borderlayout; import org.zkoss.zul.Borderlayout;
import org.zkoss.zkex.zul.Center; import org.zkoss.zul.Center;
import org.zkoss.zkex.zul.North; import org.zkoss.zul.North;
import org.zkoss.zkex.zul.South; import org.zkoss.zul.South;
import org.zkoss.zul.Caption; import org.zkoss.zul.Caption;
import org.zkoss.zul.Div; import org.zkoss.zul.Div;
import org.zkoss.zul.Groupbox; import org.zkoss.zul.Groupbox;

View File

@ -55,6 +55,7 @@ import org.zkoss.zk.ui.event.Event;
import org.zkoss.zk.ui.event.EventListener; import org.zkoss.zk.ui.event.EventListener;
import org.zkoss.zk.ui.event.Events; import org.zkoss.zk.ui.event.Events;
import org.zkoss.zul.Div; import org.zkoss.zul.Div;
import org.zkoss.zul.Listitem;
import org.zkoss.zul.Timebox; import org.zkoss.zul.Timebox;
/** /**
@ -222,7 +223,7 @@ public class WAssignmentDialog extends Window implements EventListener
// Set Resource // Set Resource
int S_Resource_ID = m_mAssignment.getS_Resource_ID(); int S_Resource_ID = m_mAssignment.getS_Resource_ID();
for (ListItem item : fResource.getItems()) { for (Listitem item : fResource.getItems()) {
if ( (Integer)item.getValue() == S_Resource_ID) { if ( (Integer)item.getValue() == S_Resource_ID) {
fResource.setSelectedItem(item); fResource.setSelectedItem(item);
break; break;

View File

@ -37,9 +37,9 @@ import org.compiere.util.*;
import org.zkoss.zk.ui.Component; import org.zkoss.zk.ui.Component;
import org.zkoss.zk.ui.event.Event; import org.zkoss.zk.ui.event.Event;
import org.zkoss.zk.ui.event.EventListener; import org.zkoss.zk.ui.event.EventListener;
import org.zkoss.zkex.zul.Borderlayout; import org.zkoss.zul.Borderlayout;
import org.zkoss.zkex.zul.Center; import org.zkoss.zul.Center;
import org.zkoss.zkex.zul.South; import org.zkoss.zul.South;
import org.zkoss.zul.Detail; import org.zkoss.zul.Detail;
import org.zkoss.zul.Div; import org.zkoss.zul.Div;
import org.zkoss.zul.Space; import org.zkoss.zul.Space;

View File

@ -46,9 +46,9 @@ import org.compiere.util.Env;
import org.compiere.util.Msg; import org.compiere.util.Msg;
import org.zkoss.zk.ui.event.Event; import org.zkoss.zk.ui.event.Event;
import org.zkoss.zk.ui.event.EventListener; import org.zkoss.zk.ui.event.EventListener;
import org.zkoss.zkex.zul.Borderlayout; import org.zkoss.zul.Borderlayout;
import org.zkoss.zkex.zul.Center; import org.zkoss.zul.Center;
import org.zkoss.zkex.zul.South; import org.zkoss.zul.South;
import org.zkoss.zul.Div; import org.zkoss.zul.Div;
import org.zkoss.zul.Separator; import org.zkoss.zul.Separator;

View File

@ -46,9 +46,9 @@ import org.compiere.util.NamePair;
import org.zkoss.zk.ui.event.Event; import org.zkoss.zk.ui.event.Event;
import org.zkoss.zk.ui.event.EventListener; import org.zkoss.zk.ui.event.EventListener;
import org.zkoss.zk.ui.event.Events; import org.zkoss.zk.ui.event.Events;
import org.zkoss.zkex.zul.Borderlayout; import org.zkoss.zul.Borderlayout;
import org.zkoss.zkex.zul.Center; import org.zkoss.zul.Center;
import org.zkoss.zkex.zul.South; import org.zkoss.zul.South;
import org.zkoss.zul.Listhead; import org.zkoss.zul.Listhead;
import org.zkoss.zul.Listheader; import org.zkoss.zul.Listheader;
import org.zkoss.zul.Menuitem; import org.zkoss.zul.Menuitem;

View File

@ -34,10 +34,10 @@ import org.zkoss.util.media.Media;
import org.zkoss.zk.ui.event.Event; import org.zkoss.zk.ui.event.Event;
import org.zkoss.zk.ui.event.EventListener; import org.zkoss.zk.ui.event.EventListener;
import org.zkoss.zk.ui.event.Events; import org.zkoss.zk.ui.event.Events;
import org.zkoss.zkex.zul.Borderlayout; import org.zkoss.zul.Borderlayout;
import org.zkoss.zkex.zul.Center; import org.zkoss.zul.Center;
import org.zkoss.zkex.zul.North; import org.zkoss.zul.North;
import org.zkoss.zkex.zul.South; import org.zkoss.zul.South;
import org.zkoss.zul.Fileupload; import org.zkoss.zul.Fileupload;
import org.zkoss.zul.Image; import org.zkoss.zul.Image;
import org.zkoss.zul.Separator; import org.zkoss.zul.Separator;
@ -194,18 +194,10 @@ public class WImageDialog extends Window implements EventListener
// Show File Open Dialog // Show File Open Dialog
Media imageFile = null; Media imageFile = null;
try imageFile = Fileupload.get();
{
imageFile = Fileupload.get(); if (imageFile == null)
if (imageFile == null)
return;
}
catch (InterruptedException e)
{
log.warning(e.getLocalizedMessage());
return; return;
}
String fileName = imageFile.getName(); String fileName = imageFile.getName();

Some files were not shown because too many files have changed in this diff Show More