Merge 6183-6210 from branches/adempiere341
This commit is contained in:
parent
7c64bf9942
commit
8885aa8bb7
|
@ -29,6 +29,7 @@ import org.adempiere.webui.apps.AEnv;
|
|||
import org.adempiere.webui.apps.ProcessDialog;
|
||||
import org.adempiere.webui.apps.graph.WPAPanel;
|
||||
import org.adempiere.webui.component.Button;
|
||||
import org.adempiere.webui.component.DesktopTabpanel;
|
||||
import org.adempiere.webui.component.Tabpanel;
|
||||
import org.adempiere.webui.component.ToolBarButton;
|
||||
import org.adempiere.webui.component.Window;
|
||||
|
@ -173,7 +174,7 @@ public class Desktop extends AbstractUIPart implements MenuListener, Serializabl
|
|||
vbCol1.appendChild(gbxFav);
|
||||
Caption caption = new Caption("Favourites");
|
||||
// Elaine 2008/07/24
|
||||
Image img = new Image("/images/Delete24.gif");
|
||||
Image img = new Image("/images/Delete24.png");
|
||||
caption.appendChild(img);
|
||||
img.setAlign("right");
|
||||
img.setDroppable("deleteFav");
|
||||
|
@ -285,7 +286,7 @@ public class Desktop extends AbstractUIPart implements MenuListener, Serializabl
|
|||
vbox.appendChild(btnNotice);
|
||||
btnNotice.setLabel("Notice : 0");
|
||||
btnNotice.setTooltiptext("Notice");
|
||||
btnNotice.setImage("/images/GetMail16.gif");
|
||||
btnNotice.setImage("/images/GetMail16.png");
|
||||
int AD_Menu_ID = DB.getSQLValue(null, "SELECT AD_Menu_ID FROM AD_Menu WHERE Name = 'Notice' AND IsSummary = 'N'");
|
||||
btnNotice.setName(String.valueOf(AD_Menu_ID));
|
||||
btnNotice.addEventListener(Events.ON_CLICK, this);
|
||||
|
@ -294,7 +295,7 @@ public class Desktop extends AbstractUIPart implements MenuListener, Serializabl
|
|||
vbox.appendChild(btnRequest);
|
||||
btnRequest.setLabel("Request : 0");
|
||||
btnRequest.setTooltiptext("Request");
|
||||
btnRequest.setImage("/images/Request16.gif");
|
||||
btnRequest.setImage("/images/Request16.png");
|
||||
AD_Menu_ID = DB.getSQLValue(null, "SELECT AD_Menu_ID FROM AD_Menu WHERE Name = 'Request' AND IsSummary = 'N'");
|
||||
btnRequest.setName(String.valueOf(AD_Menu_ID));
|
||||
btnRequest.addEventListener(Events.ON_CLICK, this);
|
||||
|
@ -303,7 +304,7 @@ public class Desktop extends AbstractUIPart implements MenuListener, Serializabl
|
|||
vbox.appendChild(btnWorkflow);
|
||||
btnWorkflow.setLabel("Workflow Activities : 0");
|
||||
btnWorkflow.setTooltiptext("Workflow Activities");
|
||||
btnWorkflow.setImage("/images/Assignment16.gif");
|
||||
btnWorkflow.setImage("/images/Assignment16.png");
|
||||
AD_Menu_ID = DB.getSQLValue(null, "SELECT AD_Menu_ID FROM AD_Menu WHERE Name = 'Workflow Activities' AND IsSummary = 'N'");
|
||||
btnWorkflow.setName(String.valueOf(AD_Menu_ID));
|
||||
btnWorkflow.addEventListener(Events.ON_CLICK, this);
|
||||
|
@ -522,7 +523,9 @@ public class Desktop extends AbstractUIPart implements MenuListener, Serializabl
|
|||
{
|
||||
Tabpanel tabPanel = new Tabpanel();
|
||||
window.setParent(tabPanel);
|
||||
windowContainer.addWindow(tabPanel, window.getTitle(), true);
|
||||
String title = window.getTitle();
|
||||
window.setTitle(null);
|
||||
windowContainer.addWindow(tabPanel, title, true);
|
||||
}
|
||||
|
||||
public void onEvent(Event event)
|
||||
|
@ -719,7 +722,7 @@ public class Desktop extends AbstractUIPart implements MenuListener, Serializabl
|
|||
{
|
||||
ADWindow adWindow = new ADWindow(Env.getCtx(), menu.getAD_Window_ID());
|
||||
|
||||
Tabpanel tabPanel = new Tabpanel();
|
||||
DesktopTabpanel tabPanel = new DesktopTabpanel();
|
||||
adWindow.createPart(tabPanel);
|
||||
windowContainer.addWindow(tabPanel, adWindow.getTitle(), true);
|
||||
}
|
||||
|
@ -741,7 +744,7 @@ public class Desktop extends AbstractUIPart implements MenuListener, Serializabl
|
|||
{
|
||||
ADForm form = ADForm.openForm(menu.getAD_Form_ID());
|
||||
|
||||
Tabpanel tabPanel = new Tabpanel();
|
||||
DesktopTabpanel tabPanel = new DesktopTabpanel();
|
||||
form.setParent(tabPanel);
|
||||
//do not show window title when open as tab
|
||||
form.setTitle(null);
|
||||
|
@ -796,7 +799,7 @@ public class Desktop extends AbstractUIPart implements MenuListener, Serializabl
|
|||
{
|
||||
ADWindow wnd = new ADWindow(Env.getCtx(), AD_Window_ID, query);
|
||||
|
||||
Tabpanel tabPanel = new Tabpanel();
|
||||
DesktopTabpanel tabPanel = new DesktopTabpanel();
|
||||
wnd.createPart(tabPanel);
|
||||
windowContainer.addWindow(tabPanel, wnd.getTitle(), true);
|
||||
}
|
||||
|
|
|
@ -0,0 +1,35 @@
|
|||
/******************************************************************************
|
||||
* Copyright (C) 2008 Low Heng Sin *
|
||||
* This program is free software; you can redistribute it and/or modify it *
|
||||
* under the terms version 2 of the GNU General Public License as published *
|
||||
* by the Free Software Foundation. This program is distributed in the hope *
|
||||
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* See the GNU General Public License for more details. *
|
||||
* You should have received a copy of the GNU General Public License along *
|
||||
* with this program; if not, write to the Free Software Foundation, Inc., *
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||
*****************************************************************************/
|
||||
package org.adempiere.webui;
|
||||
|
||||
import java.lang.reflect.Method;
|
||||
|
||||
import org.adempiere.webui.session.ServerContext;
|
||||
|
||||
import net.sf.cglib.proxy.InvocationHandler;
|
||||
|
||||
/**
|
||||
* Intercaptor for Server context properties that delegate to the threadlocal instance
|
||||
* @author Low Heng Sin
|
||||
*
|
||||
*/
|
||||
public class ServerContextCallback implements InvocationHandler {
|
||||
|
||||
public Object invoke(Object proxy, Method method, Object[] args)
|
||||
throws Throwable {
|
||||
ServerContext context = ServerContext.getCurrentInstance();
|
||||
Method m = context.getClass().getMethod(method.getName(), method.getParameterTypes());
|
||||
return m.invoke(context, args);
|
||||
}
|
||||
|
||||
}
|
|
@ -17,7 +17,7 @@ import javax.servlet.http.HttpServletResponse;
|
|||
|
||||
import org.adempiere.webui.component.ZkCssHelper;
|
||||
import org.adempiere.webui.session.SessionContextListener;
|
||||
import org.adempiere.webui.session.WebContext;
|
||||
import org.adempiere.webui.session.ServerContext;
|
||||
import org.compiere.model.MAssignmentSlot;
|
||||
import org.compiere.model.ScheduleUtil;
|
||||
import org.compiere.util.Env;
|
||||
|
@ -31,11 +31,11 @@ public class TimelineEventFeed extends HttpServlet {
|
|||
protected void doGet(HttpServletRequest req, HttpServletResponse resp)
|
||||
throws ServletException, IOException {
|
||||
|
||||
WebContext ctx = (WebContext)req.getSession().getAttribute(SessionContextListener.SESSION_CTX);
|
||||
ServerContext ctx = (ServerContext)req.getSession().getAttribute(SessionContextListener.SESSION_CTX);
|
||||
if (ctx == null) {
|
||||
return;
|
||||
} else {
|
||||
WebContext.setCurrentInstance(ctx);
|
||||
ServerContext.setCurrentInstance(ctx);
|
||||
}
|
||||
|
||||
int resourceId = 0;
|
||||
|
|
|
@ -142,7 +142,7 @@ public class ValuePreference extends Window implements EventListener
|
|||
/** The Name of the Editor */
|
||||
public static final String NAME = "ValuePreference";
|
||||
/** The Menu Icon */
|
||||
private static String ICON_URL = "images/VPreference16.gif";
|
||||
private static String ICON_URL = "images/VPreference16.png";
|
||||
/** Logger */
|
||||
private static CLogger log = CLogger.getCLogger(ValuePreference.class);
|
||||
|
||||
|
|
|
@ -83,7 +83,7 @@ public class WRequest implements EventListener
|
|||
private void getRequests (Component invoker)
|
||||
{
|
||||
m_new = new Menuitem(Msg.getMsg(Env.getCtx(), "RequestNew"));
|
||||
m_new.setImage("/images/New16.gif");
|
||||
m_new.setImage("/images/New16.png");
|
||||
m_new.addEventListener(Events.ON_CLICK, this);
|
||||
m_popup.appendChild(m_new);
|
||||
//
|
||||
|
|
|
@ -16,13 +16,10 @@
|
|||
*****************************************************************************/
|
||||
package org.adempiere.webui;
|
||||
|
||||
import java.awt.Image;
|
||||
import java.util.Properties;
|
||||
|
||||
import javax.swing.ImageIcon;
|
||||
import net.sf.cglib.proxy.Enhancer;
|
||||
|
||||
import org.adempiere.webui.session.SessionManager;
|
||||
import org.adempiere.webui.session.WebContext;
|
||||
import org.compiere.util.ContextProvider;
|
||||
|
||||
/**
|
||||
|
@ -32,27 +29,20 @@ import org.compiere.util.ContextProvider;
|
|||
*/
|
||||
public class ZkContextProvider implements ContextProvider {
|
||||
|
||||
private final ServerContextCallback callback = new ServerContextCallback();
|
||||
private final Properties context = (Properties) Enhancer.create(Properties.class, callback);
|
||||
|
||||
/**
|
||||
* Get server context proxy
|
||||
*/
|
||||
public Properties getContext() {
|
||||
return WebContext.getCurrentInstance();
|
||||
return context;
|
||||
}
|
||||
|
||||
/**
|
||||
* Show url at zk desktop
|
||||
*/
|
||||
public void showURL(String url) {
|
||||
SessionManager.getAppDesktop().showURL(url,true);
|
||||
}
|
||||
|
||||
public Image getImage (String fileNameInImageDir)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
public ImageIcon getImageIcon (String fileNameInImageDir)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
public ImageIcon getImageIcon2 (String fileName)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -449,7 +449,7 @@ public class WAcctViewer extends Window implements EventListener
|
|||
displayPanel.appendChild(boxSort3);
|
||||
displayPanel.appendChild(boxSort4);
|
||||
|
||||
//"images/InfoAccount16.gif"
|
||||
//"images/InfoAccount16.png"
|
||||
|
||||
Groupbox groupDisplay = new Groupbox();
|
||||
Caption capDisplay = new Caption("Display");
|
||||
|
@ -483,11 +483,11 @@ public class WAcctViewer extends Window implements EventListener
|
|||
forcePost.setTooltiptext(Msg.getMsg(Env.getCtx(), "ForceInfo"));
|
||||
forcePost.setVisible(false);
|
||||
|
||||
bQuery.setImage("/images/Refresh16.gif");
|
||||
bQuery.setImage("/images/Refresh16.png");
|
||||
bQuery.setTooltiptext(Msg.getMsg(Env.getCtx(), "Refresh"));
|
||||
bQuery.addEventListener(Events.ON_CLICK, this);
|
||||
|
||||
bPrint.setImage("/images/Print16.gif");
|
||||
bPrint.setImage("/images/Print16.png");
|
||||
bPrint.setTooltiptext(Msg.getMsg(Env.getCtx(), "Print"));
|
||||
bPrint.addEventListener(Events.ON_CLICK, this);
|
||||
|
||||
|
@ -600,7 +600,7 @@ public class WAcctViewer extends Window implements EventListener
|
|||
m_data.fillTable(selTable);
|
||||
selTable.addEventListener(Events.ON_SELECT, this);
|
||||
|
||||
selRecord.setImage("/images/Find16.gif");
|
||||
selRecord.setImage("/images/Find16.png");
|
||||
selRecord.addEventListener(Events.ON_CLICK, this);
|
||||
selRecord.setLabel("");
|
||||
|
||||
|
@ -613,7 +613,7 @@ public class WAcctViewer extends Window implements EventListener
|
|||
selAcct.setName("Account_ID");
|
||||
selAcct.addEventListener(Events.ON_CLICK, this);
|
||||
selAcct.setLabel("");
|
||||
selAcct.setImage("/images/Find16.gif");
|
||||
selAcct.setImage("/images/Find16.png");
|
||||
|
||||
statusLine.setValue(" " + Msg.getMsg(Env.getCtx(), "ViewerOptions"));
|
||||
|
||||
|
@ -807,7 +807,7 @@ public class WAcctViewer extends Window implements EventListener
|
|||
labels[selectionIndex].setVisible(true);
|
||||
buttons[selectionIndex].setName(columnName); // actionCommand
|
||||
buttons[selectionIndex].addEventListener(Events.ON_CLICK, this);
|
||||
buttons[selectionIndex].setImage("/images/Find16.gif");
|
||||
buttons[selectionIndex].setImage("/images/Find16.png");
|
||||
buttons[selectionIndex].setLabel("");
|
||||
buttons[selectionIndex].setVisible(true);
|
||||
selectionIndex++;
|
||||
|
|
|
@ -21,7 +21,6 @@ import java.io.InvalidClassException;
|
|||
import java.io.NotSerializableException;
|
||||
import java.net.URI;
|
||||
import java.net.URISyntaxException;
|
||||
import java.net.URL;
|
||||
import java.rmi.RemoteException;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
|
@ -32,7 +31,6 @@ import java.util.logging.Level;
|
|||
import org.adempiere.webui.component.Window;
|
||||
import org.adempiere.webui.session.SessionManager;
|
||||
import org.adempiere.webui.window.FDialog;
|
||||
import org.compiere.Adempiere;
|
||||
import org.compiere.apps.ALogin;
|
||||
import org.compiere.db.CConnection;
|
||||
import org.compiere.interfaces.Server;
|
||||
|
@ -73,21 +71,18 @@ public final class AEnv
|
|||
*/
|
||||
public static void positionCenterScreen(Window window)
|
||||
{
|
||||
// positionScreen (window, SwingConstants.CENTER);
|
||||
showCenterScreen(window);
|
||||
} // positionCenterScreen
|
||||
|
||||
/**
|
||||
* Show in the center of the screen.
|
||||
* (pack, set location and set visibility)
|
||||
* @param window Window to position
|
||||
* @param position SwingConstants
|
||||
* @param position
|
||||
*/
|
||||
public static void showScreen(Window window, int position)
|
||||
public static void showScreen(Window window, String position)
|
||||
{
|
||||
/* positionScreen(window, position);
|
||||
window.setVisible(true);
|
||||
window.toFront();
|
||||
*/
|
||||
SessionManager.getAppDesktop().showWindow(window, position);
|
||||
} // showScreen
|
||||
|
||||
/**
|
||||
|
@ -98,154 +93,10 @@ public final class AEnv
|
|||
*/
|
||||
public static void showCenterWindow(Window parent, Window window)
|
||||
{
|
||||
/*
|
||||
positionCenterWindow(parent, window);
|
||||
window.setVisible(true);
|
||||
window.toFront();
|
||||
*/
|
||||
parent.appendChild(window);
|
||||
showScreen(window, "parent,center");
|
||||
} // showCenterWindow
|
||||
|
||||
/**
|
||||
* Perform action command for common menu items.
|
||||
* Created in AMenu.createMenu(), APanel.createMenu(), FormFrame.createMenu()
|
||||
* @param actionCommand known action command
|
||||
* @param WindowNo window no
|
||||
* @param c Container parent
|
||||
* @return true if actionCommand was found and performed
|
||||
*/
|
||||
/* public static boolean actionPerformed (String actionCommand, int WindowNo, Container c)
|
||||
{
|
||||
|
||||
MRole role = MRole.getDefault();
|
||||
// File Menu ------------------------
|
||||
if (actionCommand.equals("PrintScreen"))
|
||||
{
|
||||
PrintScreenPainter.printScreen (Env.getFrame(c));
|
||||
}
|
||||
else if (actionCommand.equals("ScreenShot"))
|
||||
{
|
||||
ScreenShot.createJPEG(Env.getFrame(c), null);
|
||||
}
|
||||
// else if (actionCommand.equals("Report"))
|
||||
// {
|
||||
// AEnv.showCenterScreen (new ProcessStart());
|
||||
// }
|
||||
else if (actionCommand.equals("Exit"))
|
||||
{
|
||||
if (ADialog.ask(WindowNo, c, "ExitApplication?"))
|
||||
Env.exitEnv(0);
|
||||
}
|
||||
else if (actionCommand.equals("Logout"))
|
||||
{
|
||||
AMenu aMenu = (AMenu)Env.getWindow(0);
|
||||
aMenu.logout();
|
||||
}
|
||||
|
||||
// View Menu ------------------------
|
||||
else if (actionCommand.equals("InfoProduct") && AEnv.canAccessInfo("PRODUCT"))
|
||||
{
|
||||
org.compiere.apps.search.Info.showProduct (Env.getFrame(c), WindowNo);
|
||||
}
|
||||
else if (actionCommand.equals("InfoBPartner") && AEnv.canAccessInfo("BPARTNER"))
|
||||
{
|
||||
org.compiere.apps.search.Info.showBPartner (Env.getFrame(c), WindowNo);
|
||||
}
|
||||
else if (actionCommand.equals("InfoAsset") && AEnv.canAccessInfo("ASSET"))
|
||||
{
|
||||
org.compiere.apps.search.Info.showAsset (Env.getFrame(c), WindowNo);
|
||||
}
|
||||
else if (actionCommand.equals("InfoAccount") &&
|
||||
MRole.getDefault().isShowAcct() &&
|
||||
AEnv.canAccessInfo("ACCOUNT"))
|
||||
{
|
||||
new org.compiere.acct.AcctViewer();
|
||||
}
|
||||
else if (actionCommand.equals("InfoSchedule") && AEnv.canAccessInfo("SCHEDULE"))
|
||||
{
|
||||
new org.compiere.apps.search.InfoSchedule (Env.getFrame(c), null, false);
|
||||
}
|
||||
else if (actionCommand.equals("InfoOrder") && AEnv.canAccessInfo("ORDER"))
|
||||
{
|
||||
org.compiere.apps.search.Info.showOrder (Env.getFrame(c), WindowNo, "");
|
||||
}
|
||||
else if (actionCommand.equals("InfoInvoice") && AEnv.canAccessInfo("INVOICE"))
|
||||
{
|
||||
org.compiere.apps.search.Info.showInvoice (Env.getFrame(c), WindowNo, "");
|
||||
}
|
||||
else if (actionCommand.equals("InfoInOut") && AEnv.canAccessInfo("INOUT"))
|
||||
{
|
||||
org.compiere.apps.search.Info.showInOut (Env.getFrame(c), WindowNo, "");
|
||||
}
|
||||
else if (actionCommand.equals("InfoPayment") && AEnv.canAccessInfo("PAYMENT"))
|
||||
{
|
||||
org.compiere.apps.search.Info.showPayment (Env.getFrame(c), WindowNo, "");
|
||||
}
|
||||
else if (actionCommand.equals("InfoCashLine") && AEnv.canAccessInfo("CASHJOURNAL"))
|
||||
{
|
||||
org.compiere.apps.search.Info.showCashLine (Env.getFrame(c), WindowNo, "");
|
||||
}
|
||||
else if (actionCommand.equals("InfoAssignment") && AEnv.canAccessInfo("RESOURCE"))
|
||||
{
|
||||
org.compiere.apps.search.Info.showAssignment (Env.getFrame(c), WindowNo, "");
|
||||
}
|
||||
|
||||
// Go Menu ------------------------
|
||||
else if (actionCommand.equals("WorkFlow"))
|
||||
{
|
||||
startWorkflowProcess(0,0);
|
||||
}
|
||||
else if (actionCommand.equals("Home"))
|
||||
{
|
||||
Env.getWindow(0).toFront();
|
||||
}
|
||||
|
||||
// Tools Menu ------------------------
|
||||
else if (actionCommand.equals("Calculator"))
|
||||
{
|
||||
Calculator calc = new org.compiere.grid.ed.Calculator(Env.getFrame(c));
|
||||
calc.setDisposeOnEqual(false);
|
||||
AEnv.showCenterScreen (calc);
|
||||
}
|
||||
else if (actionCommand.equals("Calendar"))
|
||||
{
|
||||
AEnv.showCenterScreen (new org.compiere.grid.ed.Calendar(Env.getFrame(c)));
|
||||
}
|
||||
else if (actionCommand.equals("Editor"))
|
||||
{
|
||||
AEnv.showCenterScreen (new org.compiere.grid.ed.Editor(Env.getFrame(c)));
|
||||
}
|
||||
else if (actionCommand.equals("Script"))
|
||||
{
|
||||
new ScriptEditor();
|
||||
}
|
||||
else if (actionCommand.equals("Preference"))
|
||||
{
|
||||
if (role.isShowPreference()) {
|
||||
AEnv.showCenterScreen(new Preference (Env.getFrame(c), WindowNo));
|
||||
}
|
||||
}
|
||||
|
||||
// Help Menu ------------------------
|
||||
else if (actionCommand.equals("Online"))
|
||||
{
|
||||
Env.startBrowser(org.compiere.Adempiere.getOnlineHelpURL());
|
||||
}
|
||||
else if (actionCommand.equals("EMailSupport"))
|
||||
{
|
||||
ADialog.createSupportEMail(Env.getFrame(c), Env.getFrame(c).getTitle(), "\n\n");
|
||||
}
|
||||
else if (actionCommand.equals("About"))
|
||||
{
|
||||
AEnv.showCenterScreen(new AboutBox(Env.getFrame(c)));
|
||||
}
|
||||
else
|
||||
return false;
|
||||
//
|
||||
return true;
|
||||
|
||||
} // actionPerformed
|
||||
*/
|
||||
|
||||
/**
|
||||
* Get Mnemonic character from text.
|
||||
* @param text text with '&'
|
||||
|
@ -551,7 +402,7 @@ public final class AEnv
|
|||
{
|
||||
// Remote Context is called by value, not reference
|
||||
// Add Window properties to context
|
||||
Enumeration keyEnum = mWindowVO.ctx.keys();
|
||||
Enumeration<Object> keyEnum = mWindowVO.ctx.keys();
|
||||
while (keyEnum.hasMoreElements())
|
||||
{
|
||||
String key = (String)keyEnum.nextElement();
|
||||
|
@ -823,7 +674,7 @@ public final class AEnv
|
|||
/**
|
||||
* Get ImageIcon.
|
||||
*
|
||||
* @param fileNameInImageDir full file name in imgaes folder (e.g. Bean16.gif)
|
||||
* @param fileNameInImageDir full file name in imgaes folder (e.g. Bean16.png)
|
||||
* @return image
|
||||
*/
|
||||
public static URI getImage(String fileNameInImageDir)
|
||||
|
@ -840,39 +691,4 @@ public final class AEnv
|
|||
}
|
||||
return uri;
|
||||
} // getImageIcon
|
||||
|
||||
/**
|
||||
* Get ImageIcon. This method different from getImageIcon
|
||||
* where the fileName parameter is without extension. The
|
||||
* method will first try .gif and then .png if .gif does not
|
||||
* exists.
|
||||
*
|
||||
* @param fileName file name in imgaes folder without the extension(e.g. Bean16)
|
||||
* @return image
|
||||
*/
|
||||
public static URI getImage2 (String fileName)
|
||||
{
|
||||
String relativePath;
|
||||
URI uri = null;
|
||||
URL absoluteUrl = null;
|
||||
final String imageDir = "images/";
|
||||
|
||||
relativePath = imageDir + fileName + ".png";
|
||||
uri = URI.create("/" + relativePath);
|
||||
absoluteUrl = Adempiere.class.getResource(relativePath);
|
||||
if (absoluteUrl == null)
|
||||
{
|
||||
relativePath = imageDir + fileName + ".gif";
|
||||
uri = URI.create("/" + relativePath);
|
||||
absoluteUrl = Adempiere.class.getResource(relativePath);
|
||||
if (absoluteUrl == null)
|
||||
{
|
||||
log.log(Level.WARNING, "GIF/PNG Not found: " + fileName);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
return uri;
|
||||
} // getImageIcon2
|
||||
|
||||
} // AEnv
|
||||
|
|
|
@ -106,14 +106,14 @@ public class ProcessDialog extends Window implements EventListener//, ASyncProce
|
|||
Hbox hbox = new Hbox();
|
||||
String label = Msg.getMsg(Env.getCtx(), "Ok");
|
||||
bOK = new Button(label.replaceAll("&", ""));
|
||||
bOK.setImage("/images/Ok16.gif");
|
||||
bOK.setImage("/images/Ok16.png");
|
||||
bOK.setName("ok");
|
||||
bOK.addEventListener(Events.ON_CLICK, this);
|
||||
hbox.appendChild(bOK);
|
||||
|
||||
label = Msg.getMsg(Env.getCtx(), "Cancel");
|
||||
Button btn = new Button(label.replaceAll("&", ""));
|
||||
btn.setImage("/images/Cancel16.gif");
|
||||
btn.setImage("/images/Cancel16.png");
|
||||
btn.setName("cancel");
|
||||
btn.addEventListener(Events.ON_CLICK, this);
|
||||
|
||||
|
|
|
@ -25,6 +25,7 @@ import java.util.ArrayList;
|
|||
import java.util.logging.Level;
|
||||
|
||||
import org.adempiere.webui.component.Grid;
|
||||
import org.adempiere.webui.component.GridFactory;
|
||||
import org.adempiere.webui.component.Panel;
|
||||
import org.adempiere.webui.component.Row;
|
||||
import org.adempiere.webui.component.Rows;
|
||||
|
@ -72,7 +73,7 @@ implements ValueChangeListener, IProcessParameter
|
|||
} // ProcessParameterPanel
|
||||
|
||||
private void initComponent() {
|
||||
centerPanel = new Grid();
|
||||
centerPanel = GridFactory.newGridLayout();
|
||||
this.appendChild(centerPanel);
|
||||
}
|
||||
|
||||
|
@ -233,7 +234,7 @@ implements ValueChangeListener, IProcessParameter
|
|||
|
||||
// The Editor
|
||||
WEditor wEditor = WebEditorFactory.getEditor(mField, false);
|
||||
wEditor.addValueChangeListner(this);
|
||||
wEditor.addValueChangeListener(this);
|
||||
// MField => VEditor - New Field value to be updated to editor
|
||||
mField.addPropertyChangeListener(wEditor);
|
||||
// Set Default
|
||||
|
@ -422,13 +423,6 @@ implements ValueChangeListener, IProcessParameter
|
|||
public void valueChange(ValueChangeEvent evt)
|
||||
{
|
||||
String value = evt.getNewValue() == null ? "" : evt.getNewValue().toString();
|
||||
|
||||
if (evt.getSource() instanceof WEditor)
|
||||
{
|
||||
WEditor comp = (WEditor)(evt.getSource());
|
||||
comp.setValue(value);
|
||||
|
||||
}
|
||||
Env.setContext(Env.getCtx(), m_WindowNo, evt.getPropertyName(), value);
|
||||
|
||||
}
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -28,6 +28,7 @@ import java.util.logging.Level;
|
|||
|
||||
import org.adempiere.webui.component.Button;
|
||||
import org.adempiere.webui.component.Checkbox;
|
||||
import org.adempiere.webui.component.ConfirmPanel;
|
||||
import org.adempiere.webui.component.Datebox;
|
||||
import org.adempiere.webui.component.Grid;
|
||||
import org.adempiere.webui.component.Label;
|
||||
|
@ -41,7 +42,6 @@ import org.adempiere.webui.component.Tabpanel;
|
|||
import org.adempiere.webui.component.Tabpanels;
|
||||
import org.adempiere.webui.component.Tabs;
|
||||
import org.adempiere.webui.component.Textbox;
|
||||
import org.adempiere.webui.component.WConfirmPanel;
|
||||
import org.adempiere.webui.editor.WSearchEditor;
|
||||
import org.adempiere.webui.event.ValueChangeEvent;
|
||||
import org.adempiere.webui.event.ValueChangeListener;
|
||||
|
@ -78,9 +78,6 @@ public class WArchiveViewer extends ADForm implements EventListener, ValueChange
|
|||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** Window No */
|
||||
private int m_WindowNo = 0;
|
||||
|
||||
/** The Archives */
|
||||
private MArchive[] m_archives = new MArchive[0];
|
||||
|
||||
|
@ -131,7 +128,7 @@ public class WArchiveViewer extends ADForm implements EventListener, ValueChange
|
|||
private Textbox descriptionField = new Textbox();
|
||||
private Label helpLabel = new Label(Msg.translate(Env.getCtx(), "Help"));
|
||||
private Textbox helpField = new Textbox();
|
||||
private WConfirmPanel confirmPanel = new WConfirmPanel(true);
|
||||
private ConfirmPanel confirmPanel = new ConfirmPanel(true);
|
||||
private Button updateArchive = new Button();
|
||||
|
||||
private Tabbox tabbox = new Tabbox();
|
||||
|
@ -143,7 +140,6 @@ public class WArchiveViewer extends ADForm implements EventListener, ValueChange
|
|||
|
||||
public WArchiveViewer()
|
||||
{
|
||||
init(super.m_windowNo);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -151,10 +147,9 @@ public class WArchiveViewer extends ADForm implements EventListener, ValueChange
|
|||
* @param WindowNo window
|
||||
*/
|
||||
|
||||
public void init (int WindowNo)
|
||||
protected void initForm()
|
||||
{
|
||||
log.info("");
|
||||
m_WindowNo = WindowNo;
|
||||
|
||||
try
|
||||
{
|
||||
|
@ -236,7 +231,7 @@ public class WArchiveViewer extends ADForm implements EventListener, ValueChange
|
|||
|
||||
bPartnerField = new WSearchEditor(lookup, Msg.translate(
|
||||
Env.getCtx(), "C_BPartner_ID"), "", true, false, true);
|
||||
bPartnerField.addValueChangeListner(this);
|
||||
bPartnerField.addValueChangeListener(this);
|
||||
} // dynInit
|
||||
|
||||
private void reportViewer(byte[] data)
|
||||
|
@ -268,19 +263,19 @@ public class WArchiveViewer extends ADForm implements EventListener, ValueChange
|
|||
createdByQField.setMold("select");
|
||||
createdByQField.setRows(1);
|
||||
|
||||
updateArchive.setImage("/images/Ok24.gif");
|
||||
updateArchive.setImage("/images/Ok24.png");
|
||||
updateArchive.setTooltiptext("Save Archive");
|
||||
updateArchive.addEventListener(Events.ON_CLICK, this);
|
||||
|
||||
bRefresh.setImage("/images/Refresh24.gif");
|
||||
bRefresh.setImage("/images/Refresh24.png");
|
||||
bRefresh.setTooltiptext("Refresh");
|
||||
bRefresh.addEventListener(Events.ON_CLICK, this);
|
||||
|
||||
bBack.setImage("/images/Parent24.gif");
|
||||
bBack.setImage("/images/Parent24.png");
|
||||
bBack.setTooltiptext("Back");
|
||||
bBack.addEventListener(Events.ON_CLICK, this);
|
||||
|
||||
bNext.setImage("/images/Detail24.gif");
|
||||
bNext.setImage("/images/Detail24.png");
|
||||
bNext.setTooltiptext("Next");
|
||||
bNext.addEventListener(Events.ON_CLICK, this);
|
||||
|
||||
|
@ -506,7 +501,7 @@ public class WArchiveViewer extends ADForm implements EventListener, ValueChange
|
|||
tabs.appendChild(tabView);
|
||||
tabpanels.appendChild(tabViewPanel);
|
||||
|
||||
confirmPanel.addEventListener(this);
|
||||
confirmPanel.addActionListener(this);
|
||||
updateQDisplay();
|
||||
|
||||
iframe.setId("reportFrame");
|
||||
|
@ -528,9 +523,9 @@ public class WArchiveViewer extends ADForm implements EventListener, ValueChange
|
|||
|
||||
if (e.getTarget() == updateArchive)
|
||||
cmd_updateArchive();
|
||||
else if (e.getName().equals(WConfirmPanel.A_CANCEL))
|
||||
else if (e.getTarget().getId().equals(ConfirmPanel.A_CANCEL))
|
||||
SessionManager.getAppDesktop().removeWindow();
|
||||
else if (e.getName().equals(WConfirmPanel.A_OK))
|
||||
else if (e.getTarget().getId().equals(ConfirmPanel.A_OK))
|
||||
{
|
||||
if (tabbox.getSelectedIndex() == 1)
|
||||
SessionManager.getAppDesktop().removeWindow();
|
||||
|
|
|
@ -35,7 +35,7 @@ import org.adempiere.webui.component.Tabbox;
|
|||
import org.adempiere.webui.component.Tabpanel;
|
||||
import org.adempiere.webui.component.Tabpanels;
|
||||
import org.adempiere.webui.component.Tabs;
|
||||
import org.adempiere.webui.component.WConfirmPanel;
|
||||
import org.adempiere.webui.component.ConfirmPanel;
|
||||
import org.adempiere.webui.panel.ADForm;
|
||||
import org.adempiere.webui.window.FDialog;
|
||||
import org.compiere.model.MAttribute;
|
||||
|
@ -73,10 +73,8 @@ public class WAttributeGrid extends ADForm implements EventListener
|
|||
* @param WindowNo
|
||||
* @param frame
|
||||
*/
|
||||
public void init(int adFormId, String name)
|
||||
protected void initForm()
|
||||
{
|
||||
super.init(adFormId, name);
|
||||
|
||||
m_attributes = MAttribute.getOfClient(Env.getCtx(), true, true);
|
||||
KeyNamePair[] vector = new KeyNamePair[m_attributes.length+1];
|
||||
vector[0] = new KeyNamePair(0, "");
|
||||
|
@ -192,7 +190,7 @@ public class WAttributeGrid extends ADForm implements EventListener
|
|||
this.appendChild(tabbox);
|
||||
tabbox.addEventListener(Events.ON_SELECT, this);
|
||||
this.appendChild(confirmPanel);
|
||||
confirmPanel.addEventListener(this);
|
||||
confirmPanel.addActionListener(this);
|
||||
} // init
|
||||
|
||||
/** Window No */
|
||||
|
@ -236,7 +234,7 @@ public class WAttributeGrid extends ADForm implements EventListener
|
|||
private Listbox pickPriceList = new Listbox();
|
||||
private Label labelWarehouse = new Label(Msg.getElement(Env.getCtx(), "M_Warehouse_ID"));
|
||||
private Listbox pickWarehouse = new Listbox();
|
||||
private WConfirmPanel confirmPanel = new WConfirmPanel(true);
|
||||
private ConfirmPanel confirmPanel = new ConfirmPanel(true);
|
||||
//
|
||||
private Grid gridView = new Grid();
|
||||
// private CPanel gridPanel = new CPanel(new BorderLayout());
|
||||
|
@ -316,14 +314,14 @@ public class WAttributeGrid extends ADForm implements EventListener
|
|||
}
|
||||
else if(e.getTarget() == modeCombo)
|
||||
createGrid();
|
||||
else if (e.getName().equals(WConfirmPanel.A_OK))
|
||||
else if (e.getTarget().getId().equals(ConfirmPanel.A_OK))
|
||||
{
|
||||
if (tabbox.getSelectedIndex() == 0)
|
||||
createGrid();
|
||||
else
|
||||
gridOK();
|
||||
}
|
||||
else if (e.getName().equals(WConfirmPanel.A_CANCEL))
|
||||
else if (e.getTarget().getId().equals(ConfirmPanel.A_CANCEL))
|
||||
onClose();
|
||||
} // actionPerformed
|
||||
|
||||
|
@ -370,7 +368,7 @@ public class WAttributeGrid extends ADForm implements EventListener
|
|||
|
||||
if (attr1.equals(attr2))
|
||||
{
|
||||
FDialog.warn(m_windowNo, "Same Attribute Selected", getTitle());
|
||||
FDialog.warn(m_WindowNo, "Same Attribute Selected", getTitle());
|
||||
log.warning("Same Attribute Selected");
|
||||
tabbox.setSelectedIndex(0);
|
||||
return;
|
||||
|
|
|
@ -67,9 +67,6 @@ public class WBOMDrop extends ADForm implements EventListener
|
|||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** Window No */
|
||||
private int m_WindowNo = 0;
|
||||
|
||||
/** Product to create BOMs from */
|
||||
private MProduct m_product;
|
||||
|
||||
|
@ -109,20 +106,16 @@ public class WBOMDrop extends ADForm implements EventListener
|
|||
private Groupbox grpSelectProd = new Groupbox();
|
||||
|
||||
public WBOMDrop()
|
||||
{
|
||||
init(super.m_windowNo);
|
||||
}
|
||||
{}
|
||||
|
||||
/**
|
||||
* Initialize Panel
|
||||
* @param WindowNo window
|
||||
* @param frame parent frame
|
||||
*/
|
||||
|
||||
public void init (int WindowNo)
|
||||
protected void initForm()
|
||||
{
|
||||
log.info("");
|
||||
m_WindowNo = WindowNo;
|
||||
|
||||
try
|
||||
{
|
||||
|
|
|
@ -38,7 +38,7 @@ import org.adempiere.webui.component.Panel;
|
|||
import org.adempiere.webui.component.Row;
|
||||
import org.adempiere.webui.component.Rows;
|
||||
import org.adempiere.webui.component.Textbox;
|
||||
import org.adempiere.webui.component.WConfirmPanel;
|
||||
import org.adempiere.webui.component.ConfirmPanel;
|
||||
import org.adempiere.webui.component.WListbox;
|
||||
import org.adempiere.webui.panel.ADForm;
|
||||
import org.adempiere.webui.session.SessionManager;
|
||||
|
@ -121,7 +121,7 @@ public class WCharge extends ADForm implements EventListener
|
|||
private WListbox m_tblData = new WListbox();
|
||||
|
||||
/** confirmation panel. */
|
||||
private WConfirmPanel m_pnlConfirm = new WConfirmPanel();
|
||||
private ConfirmPanel m_pnlConfirm = new ConfirmPanel();
|
||||
/** Confirmation Grid. */
|
||||
private Grid m_grdConfirm = new Grid();
|
||||
|
||||
|
@ -201,9 +201,8 @@ public class WCharge extends ADForm implements EventListener
|
|||
* @param adFormId The Adempiere identifier for the form
|
||||
* @param name The name of the form
|
||||
*/
|
||||
public void init(int adFormId, String name)
|
||||
protected void initForm()
|
||||
{
|
||||
super.init(adFormId, name);
|
||||
log.info("");
|
||||
try
|
||||
{
|
||||
|
@ -508,7 +507,7 @@ public class WCharge extends ADForm implements EventListener
|
|||
{
|
||||
log.info(event.getName());
|
||||
//
|
||||
if (event.getName().equals(WConfirmPanel.A_OK) || m_elementId == 0)
|
||||
if (event.getTarget().getId().equals(ConfirmPanel.A_OK) || m_elementId == 0)
|
||||
{
|
||||
close();
|
||||
}
|
||||
|
@ -556,17 +555,17 @@ public class WCharge extends ADForm implements EventListener
|
|||
int elementValueId = createElementValue (value, name, m_chbIsExpense.isChecked());
|
||||
if (elementValueId == 0)
|
||||
{
|
||||
FDialog.error(m_windowNo, this, "ChargeNotCreated", name);
|
||||
FDialog.error(m_WindowNo, this, "ChargeNotCreated", name);
|
||||
return;
|
||||
}
|
||||
// Create Charge
|
||||
int chargeId = createCharge(name, elementValueId);
|
||||
if (chargeId == 0)
|
||||
{
|
||||
FDialog.error(m_windowNo, this, "ChargeNotCreated", name);
|
||||
FDialog.error(m_WindowNo, this, "ChargeNotCreated", name);
|
||||
return;
|
||||
}
|
||||
FDialog.info(m_windowNo, this, "ChargeCreated", name);
|
||||
FDialog.info(m_WindowNo, this, "ChargeCreated", name);
|
||||
} // createNew
|
||||
|
||||
|
||||
|
@ -787,11 +786,11 @@ public class WCharge extends ADForm implements EventListener
|
|||
}
|
||||
if (listCreated.length() > 0)
|
||||
{
|
||||
FDialog.info(m_windowNo, this, "ChargeCreated", listCreated.toString());
|
||||
FDialog.info(m_WindowNo, this, "ChargeCreated", listCreated.toString());
|
||||
}
|
||||
if (listRejected.length() > 0)
|
||||
{
|
||||
FDialog.error(m_windowNo, this, "ChargeNotCreated", listRejected.toString());
|
||||
FDialog.error(m_WindowNo, this, "ChargeNotCreated", listRejected.toString());
|
||||
}
|
||||
|
||||
return;
|
||||
|
@ -887,7 +886,7 @@ public class WCharge extends ADForm implements EventListener
|
|||
{
|
||||
Rows rows = new Rows();
|
||||
Row row = new Row();
|
||||
m_pnlConfirm.addEventListener(this);
|
||||
m_pnlConfirm.addActionListener(this);
|
||||
row.appendChild(m_pnlConfirm);
|
||||
rows.appendChild(row);
|
||||
m_grdConfirm.appendChild(rows);
|
||||
|
|
|
@ -23,7 +23,6 @@ import java.math.*;
|
|||
|
||||
import org.adempiere.webui.apps.AEnv;
|
||||
import org.adempiere.webui.component.Button;
|
||||
import org.adempiere.webui.component.ButtonFactory;
|
||||
import org.adempiere.webui.component.Checkbox;
|
||||
import org.adempiere.webui.component.ConfirmPanel;
|
||||
import org.adempiere.webui.component.Grid;
|
||||
|
@ -35,6 +34,7 @@ import org.adempiere.webui.component.ListboxFactory;
|
|||
import org.adempiere.webui.component.Panel;
|
||||
import org.adempiere.webui.component.Row;
|
||||
import org.adempiere.webui.component.Rows;
|
||||
import org.adempiere.webui.component.WAppsAction;
|
||||
import org.adempiere.webui.component.WListbox;
|
||||
import org.adempiere.webui.component.WStatusBar;
|
||||
import org.adempiere.webui.component.Window;
|
||||
|
@ -42,7 +42,6 @@ import org.adempiere.webui.editor.WEditor;
|
|||
import org.adempiere.webui.editor.WLocatorEditor;
|
||||
import org.adempiere.webui.editor.WSearchEditor;
|
||||
import org.adempiere.webui.editor.WStringEditor;
|
||||
import org.adempiere.webui.editor.WTableDirEditor;
|
||||
import org.adempiere.webui.event.WTableModelEvent;
|
||||
import org.adempiere.webui.event.WTableModelListener;
|
||||
import org.compiere.model.*;
|
||||
|
@ -231,7 +230,7 @@ public abstract class WCreateFrom extends Window
|
|||
parameterLayout.appendChild(north);
|
||||
north.appendChild(parameterBankPanel);
|
||||
|
||||
parameterLayout.setHeight("100px");
|
||||
parameterLayout.setHeight("110px");
|
||||
parameterLayout.setWidth("100%");
|
||||
|
||||
parameterBankPanel.appendChild(parameterBankLayout);
|
||||
|
@ -282,13 +281,11 @@ public abstract class WCreateFrom extends Window
|
|||
//
|
||||
//
|
||||
// @Trifon
|
||||
// AppsAction selectAllAction = new AppsAction (SELECT_ALL, KeyStroke.getKeyStroke(KeyEvent.VK_A, java.awt.event.InputEvent.ALT_MASK), null);
|
||||
WAppsAction selectAllAction = new WAppsAction (SELECT_ALL, null, null);
|
||||
|
||||
Button selectAllButton = ButtonFactory.createButton(SELECT_ALL, null);
|
||||
Button selectAllButton = selectAllAction.getButton();
|
||||
confirmPanel.addComponentsLeft(selectAllButton);
|
||||
selectAllButton.addActionListener(this);
|
||||
// selectAllButton.setToolTipText(Msg.getMsg(Env.getCtx(), SELECT_ALL_TOOLTIP));
|
||||
confirmPanel.addButton(selectAllButton);
|
||||
//
|
||||
South south = new South();
|
||||
contentPane.appendChild(south);
|
||||
|
@ -498,7 +495,7 @@ public abstract class WCreateFrom extends Window
|
|||
log.config("C_Order_ID=" + C_Order_ID);
|
||||
p_order = new MOrder (Env.getCtx(), C_Order_ID, null); // save
|
||||
|
||||
Vector<Vector> data = new Vector<Vector>();
|
||||
Vector<Vector<Object>> data = new Vector<Vector<Object>>();
|
||||
StringBuffer sql = new StringBuffer("SELECT "
|
||||
+ "l.QtyOrdered-SUM(COALESCE(m.Qty,0))," // 1
|
||||
+ "CASE WHEN l.QtyOrdered=0 THEN 0 ELSE l.QtyEntered/l.QtyOrdered END," // 2
|
||||
|
@ -564,7 +561,7 @@ public abstract class WCreateFrom extends Window
|
|||
* Load Order/Invoice/Shipment data into Table
|
||||
* @param data data
|
||||
*/
|
||||
protected void loadTableOIS (Vector data)
|
||||
protected void loadTableOIS (Vector<Vector<Object>> data)
|
||||
{
|
||||
// Header Info
|
||||
Vector<String> columnNames = new Vector<String>(7);
|
||||
|
|
|
@ -78,7 +78,7 @@ public class WCreateFromInvoice extends WCreateFrom implements ValueChangeListen
|
|||
}
|
||||
|
||||
initBPartner(true);
|
||||
bPartnerField.addValueChangeListner(this);
|
||||
bPartnerField.addValueChangeListener(this);
|
||||
return true;
|
||||
} // dynInit
|
||||
|
||||
|
|
|
@ -114,7 +114,7 @@ public class WCreateFromShipment extends WCreateFrom implements ValueChangeListe
|
|||
locatorField = new WLocatorEditor ("M_Locator_ID", true, false, true, locator, p_WindowNo);
|
||||
|
||||
initBPartner(false);
|
||||
bPartnerField.addValueChangeListner(this);
|
||||
bPartnerField.addValueChangeListener(this);
|
||||
|
||||
locatorLabel.setMandatory(true);
|
||||
return true;
|
||||
|
|
|
@ -78,7 +78,7 @@ public class WCreateFromStatement extends WCreateFrom implements ValueChangeList
|
|||
MLookup lookup = MLookupFactory.get (Env.getCtx(), p_WindowNo, 0, AD_Column_ID, DisplayType.TableDir);
|
||||
WTableDirEditor editor = new WTableDirEditor ("C_BankAccount_ID", true, false, true, lookup);
|
||||
bankAccountField = editor.getComponent();
|
||||
editor.addValueChangeListner(this);
|
||||
editor.addValueChangeListener(this);
|
||||
// Set Default
|
||||
int C_BankAccount_ID = Env.getContextAsInt(Env.getCtx(), p_WindowNo, "C_BankAccount_ID");
|
||||
bankAccountField.setValue(new Integer(C_BankAccount_ID));
|
||||
|
|
|
@ -76,9 +76,6 @@ public class WFileImport extends ADForm implements EventListener
|
|||
/** Logger */
|
||||
private static CLogger log = CLogger.getCLogger(WFileImport.class);
|
||||
|
||||
/** Window No */
|
||||
private int m_WindowNo = 0;
|
||||
|
||||
private int m_record = -1;
|
||||
|
||||
private Listbox pickFormat = new Listbox();
|
||||
|
@ -115,18 +112,15 @@ public class WFileImport extends ADForm implements EventListener
|
|||
|
||||
public WFileImport()
|
||||
{
|
||||
init(super.m_windowNo);
|
||||
}
|
||||
|
||||
/**
|
||||
* Initialize Panel
|
||||
* @param WindowNo window
|
||||
*/
|
||||
|
||||
public void init (int WindowNo)
|
||||
protected void initForm()
|
||||
{
|
||||
log.info("");
|
||||
m_WindowNo = WindowNo;
|
||||
try
|
||||
{
|
||||
jbInit();
|
||||
|
|
|
@ -125,11 +125,9 @@ public class WInOutGen extends ADForm implements EventListener, ValueChangeListe
|
|||
|
||||
public WInOutGen()
|
||||
{
|
||||
init();
|
||||
initComponents();
|
||||
}
|
||||
|
||||
private void init()
|
||||
protected void initForm()
|
||||
{
|
||||
separator = new Separator();
|
||||
separator.setHeight("5px");
|
||||
|
@ -159,11 +157,11 @@ public class WInOutGen extends ADForm implements EventListener, ValueChangeListe
|
|||
lstSelect.getModel().addTableModelListener(this);
|
||||
|
||||
btnCancel = new Button();
|
||||
btnCancel.setImage("/images/Cancel24.gif");
|
||||
btnCancel.setImage("/images/Cancel24.png");
|
||||
btnCancel.addEventListener(Events.ON_CLICK, this);
|
||||
|
||||
btnOk = new Button();
|
||||
btnOk.setImage("/images/Ok24.gif");
|
||||
btnOk.setImage("/images/Ok24.png");
|
||||
btnOk.addEventListener(Events.ON_CLICK, this);
|
||||
|
||||
lblGenerate = new Label();
|
||||
|
@ -182,6 +180,8 @@ public class WInOutGen extends ADForm implements EventListener, ValueChangeListe
|
|||
|
||||
populateWarehouse();
|
||||
showBusinessPartner();
|
||||
|
||||
initComponents();
|
||||
}
|
||||
|
||||
private void initComponents()
|
||||
|
@ -320,26 +320,26 @@ public class WInOutGen extends ADForm implements EventListener, ValueChangeListe
|
|||
{
|
||||
final int AD_Column_ID = 2223;
|
||||
|
||||
MLookup lookupBP = MLookupFactory.get(Env.getCtx(), super.m_windowNo,
|
||||
MLookup lookupBP = MLookupFactory.get(Env.getCtx(), m_WindowNo,
|
||||
0, AD_Column_ID, DisplayType.TableDir);
|
||||
|
||||
warehouseSearch = new WTableDirEditor(lookupBP, Msg.translate(
|
||||
Env.getCtx(), "M_Warehouse_ID"), "", true, false, true);
|
||||
|
||||
warehouseSearch.addValueChangeListner(this);
|
||||
warehouseSearch.addValueChangeListener(this);
|
||||
}
|
||||
|
||||
private void showBusinessPartner()
|
||||
{
|
||||
final int AD_BPartner_ID = 3499;
|
||||
|
||||
MLookup lookupBP = MLookupFactory.get(Env.getCtx(), super.m_windowNo,
|
||||
MLookup lookupBP = MLookupFactory.get(Env.getCtx(), m_WindowNo,
|
||||
0, AD_BPartner_ID, DisplayType.Search);
|
||||
|
||||
bPartnerSearch = new WSearchEditor(lookupBP, Msg.translate(
|
||||
Env.getCtx(), "C_BPartner_ID"), "", true, false, true);
|
||||
|
||||
bPartnerSearch.addValueChangeListner(this);
|
||||
bPartnerSearch.addValueChangeListener(this);
|
||||
}
|
||||
|
||||
|
||||
|
@ -565,7 +565,7 @@ public class WInOutGen extends ADForm implements EventListener, ValueChangeListe
|
|||
}
|
||||
|
||||
// Execute Process
|
||||
ProcessCtl worker = new ProcessCtl(null, super.m_windowNo, pi, trx);
|
||||
ProcessCtl worker = new ProcessCtl(null, m_WindowNo, pi, trx);
|
||||
worker.start(); // complete tasks in unlockUI / generateShipments_complete
|
||||
|
||||
lstSelect.clearTable();
|
||||
|
|
|
@ -127,11 +127,9 @@ public class WInvoiceGen extends ADForm implements EventListener, ValueChangeLis
|
|||
|
||||
public WInvoiceGen()
|
||||
{
|
||||
init();
|
||||
initComponents();
|
||||
}
|
||||
|
||||
private void init()
|
||||
protected void initForm()
|
||||
{
|
||||
separator = new Separator();
|
||||
separator.setHeight("5px");
|
||||
|
@ -161,11 +159,11 @@ public class WInvoiceGen extends ADForm implements EventListener, ValueChangeLis
|
|||
lstSelect.getModel().addTableModelListener(this);
|
||||
|
||||
btnCancel = new Button();
|
||||
btnCancel.setImage("/images/Cancel24.gif");
|
||||
btnCancel.setImage("/images/Cancel24.png");
|
||||
btnCancel.addEventListener(Events.ON_CLICK, this);
|
||||
|
||||
btnOk = new Button();
|
||||
btnOk.setImage("/images/Ok24.gif");
|
||||
btnOk.setImage("/images/Ok24.png");
|
||||
btnOk.addEventListener(Events.ON_CLICK, this);
|
||||
|
||||
lblGenerate = new Label();
|
||||
|
@ -184,6 +182,8 @@ public class WInvoiceGen extends ADForm implements EventListener, ValueChangeLis
|
|||
|
||||
populateOrganisation();
|
||||
showBusinessPartner();
|
||||
|
||||
initComponents();
|
||||
}
|
||||
|
||||
private void initComponents()
|
||||
|
@ -328,26 +328,26 @@ public class WInvoiceGen extends ADForm implements EventListener, ValueChangeLis
|
|||
{
|
||||
final int AD_Column_ID = 2163;
|
||||
|
||||
MLookup lookupBP = MLookupFactory.get(Env.getCtx(), super.m_windowNo,
|
||||
MLookup lookupBP = MLookupFactory.get(Env.getCtx(), m_WindowNo,
|
||||
0, AD_Column_ID, DisplayType.TableDir);
|
||||
|
||||
organizationSearch = new WTableDirEditor(lookupBP, Msg.translate(
|
||||
Env.getCtx(), "AD_Org_ID"), "", true, false, true);
|
||||
|
||||
organizationSearch.addValueChangeListner(this);
|
||||
organizationSearch.addValueChangeListener(this);
|
||||
}
|
||||
|
||||
private void showBusinessPartner()
|
||||
{
|
||||
final int AD_Column_ID = 3499;
|
||||
|
||||
MLookup lookupBP = MLookupFactory.get(Env.getCtx(), super.m_windowNo,
|
||||
MLookup lookupBP = MLookupFactory.get(Env.getCtx(), m_WindowNo,
|
||||
0, AD_Column_ID, DisplayType.Search);
|
||||
|
||||
bPartnerSearch = new WSearchEditor(lookupBP, Msg.translate(
|
||||
Env.getCtx(), "C_BPartner_ID"), "", true, false, true);
|
||||
|
||||
bPartnerSearch.addValueChangeListner(this);
|
||||
bPartnerSearch.addValueChangeListener(this);
|
||||
}
|
||||
|
||||
|
||||
|
@ -572,7 +572,7 @@ public class WInvoiceGen extends ADForm implements EventListener, ValueChangeLis
|
|||
|
||||
// Execute Process
|
||||
|
||||
ProcessCtl worker = new ProcessCtl(null, super.m_windowNo, pi, trx);
|
||||
ProcessCtl worker = new ProcessCtl(null, m_WindowNo, pi, trx);
|
||||
worker.start();
|
||||
|
||||
lstSelect.clearTable();
|
||||
|
|
|
@ -163,11 +163,9 @@ public class WMatch extends ADForm implements EventListener, ValueChangeListener
|
|||
|
||||
public WMatch()
|
||||
{
|
||||
init();
|
||||
initComponents();
|
||||
}
|
||||
|
||||
private void init()
|
||||
protected void initForm()
|
||||
{
|
||||
try
|
||||
{
|
||||
|
@ -202,11 +200,11 @@ public class WMatch extends ADForm implements EventListener, ValueChangeListener
|
|||
lstReceipt.setWidth("700px");
|
||||
|
||||
cmdSearch = new Button();
|
||||
cmdSearch.setImage("/images/FindX24.gif");
|
||||
cmdSearch.setImage("/images/FindX24.png");
|
||||
cmdSearch.addEventListener(Events.ON_CLICK, this);
|
||||
|
||||
cmdProcess = new Button();
|
||||
cmdProcess.setImage("/images/Process24.gif");
|
||||
cmdProcess.setImage("/images/Process24.png");
|
||||
cmdProcess.addEventListener(Events.ON_CLICK, this);
|
||||
|
||||
dateFrom = new Datebox();
|
||||
|
@ -269,6 +267,8 @@ public class WMatch extends ADForm implements EventListener, ValueChangeListener
|
|||
xMatchedToTable.setHeight("150px");
|
||||
xMatchedToTable.getModel().addTableModelListener(this);
|
||||
xMatchedToTable.addEventListener(Events.ON_SELECT, this);
|
||||
|
||||
initComponents();
|
||||
}
|
||||
|
||||
private void initComponents()
|
||||
|
@ -439,26 +439,26 @@ public class WMatch extends ADForm implements EventListener, ValueChangeListener
|
|||
{
|
||||
final int AD_Column_ID = 3499;
|
||||
|
||||
MLookup lookupBP = MLookupFactory.get(Env.getCtx(), super.m_windowNo,
|
||||
MLookup lookupBP = MLookupFactory.get(Env.getCtx(), m_WindowNo,
|
||||
0, AD_Column_ID, DisplayType.Search);
|
||||
|
||||
bPartnerSearch = new WSearchEditor(lookupBP, Msg.translate(
|
||||
Env.getCtx(), "C_BPartner_ID"), "", true, false, true);
|
||||
|
||||
bPartnerSearch.addValueChangeListner(this);
|
||||
bPartnerSearch.addValueChangeListener(this);
|
||||
}
|
||||
|
||||
private void showProduct()
|
||||
{
|
||||
final int AD_Column_ID = 3840;
|
||||
|
||||
MLookup lookupP = MLookupFactory.get(Env.getCtx(), super.m_windowNo,
|
||||
MLookup lookupP = MLookupFactory.get(Env.getCtx(), m_WindowNo,
|
||||
0, AD_Column_ID, DisplayType.Search);
|
||||
|
||||
productSearch = new WSearchEditor(lookupP, Msg.translate(
|
||||
Env.getCtx(), "M_Product_ID"), "", true, false, true);
|
||||
|
||||
productSearch.addValueChangeListner(this);
|
||||
productSearch.addValueChangeListener(this);
|
||||
}
|
||||
|
||||
private void prepareTable()
|
||||
|
|
|
@ -28,7 +28,7 @@ import org.adempiere.webui.component.Grid;
|
|||
import org.adempiere.webui.component.Label;
|
||||
import org.adempiere.webui.component.Row;
|
||||
import org.adempiere.webui.component.Rows;
|
||||
import org.adempiere.webui.component.WConfirmPanel;
|
||||
import org.adempiere.webui.component.ConfirmPanel;
|
||||
import org.adempiere.webui.editor.WEditor;
|
||||
import org.adempiere.webui.editor.WSearchEditor;
|
||||
import org.adempiere.webui.editor.WTableDirEditor;
|
||||
|
@ -70,7 +70,7 @@ public class WMerge extends ADForm implements EventListener, ValueChangeListener
|
|||
private Row row;
|
||||
|
||||
/** Confirmation panel containing Ok and Cancel button. */
|
||||
private WConfirmPanel m_pnlConfirm;
|
||||
private ConfirmPanel m_pnlConfirm;
|
||||
|
||||
private WEditor[] from = new WEditor[4];
|
||||
private WEditor[] to = new WEditor[4];
|
||||
|
@ -113,26 +113,25 @@ public class WMerge extends ADForm implements EventListener, ValueChangeListener
|
|||
|
||||
public WMerge()
|
||||
{
|
||||
init();
|
||||
initComponents();
|
||||
}
|
||||
|
||||
public void init()
|
||||
protected void initForm()
|
||||
{
|
||||
grdAll = new Grid();
|
||||
grdAll.setWidth("700px");
|
||||
|
||||
/*btnCancel = new Button();
|
||||
btnCancel.setImage("/images/Cancel24.gif");
|
||||
btnCancel.setImage("/images/Cancel24.png");
|
||||
btnCancel.addEventListener(Events.ON_CLICK, this);
|
||||
|
||||
btnOk = new Button();
|
||||
btnOk.setImage("/images/Ok24.gif");
|
||||
btnOk.setImage("/images/Ok24.png");
|
||||
btnOk.addEventListener(Events.ON_CLICK, this);*/
|
||||
|
||||
m_pnlConfirm = new WConfirmPanel(true);
|
||||
m_pnlConfirm.addEventListener(this);
|
||||
m_pnlConfirm = new ConfirmPanel(true);
|
||||
m_pnlConfirm.addActionListener(this);
|
||||
|
||||
initComponents();
|
||||
}
|
||||
|
||||
public void initComponents()
|
||||
|
@ -169,36 +168,36 @@ public class WMerge extends ADForm implements EventListener, ValueChangeListener
|
|||
|
||||
private void components()
|
||||
{
|
||||
MLookup lookup = MLookupFactory.get(Env.getCtx(), super.m_windowNo,
|
||||
MLookup lookup = MLookupFactory.get(Env.getCtx(), m_WindowNo,
|
||||
0, AD_Column_ID[0], DisplayType.TableDir);
|
||||
|
||||
from[0] = new WTableDirEditor(lookup, Msg.translate(
|
||||
Env.getCtx(), text[0]), "from", true, false, true);
|
||||
|
||||
from[0].addValueChangeListner(this);
|
||||
from[0].addValueChangeListener(this);
|
||||
|
||||
to[0] = new WTableDirEditor(lookup, Msg.translate(
|
||||
Env.getCtx(), text[0]), "to", true, false, true);
|
||||
|
||||
to[0].addValueChangeListner(this);
|
||||
to[0].addValueChangeListener(this);
|
||||
|
||||
|
||||
// Search Editors
|
||||
|
||||
for (int i = 1; i < AD_Column_ID.length; i++)
|
||||
{
|
||||
lookup = MLookupFactory.get(Env.getCtx(), super.m_windowNo,
|
||||
lookup = MLookupFactory.get(Env.getCtx(), m_WindowNo,
|
||||
0, AD_Column_ID[i], DisplayType.Search);
|
||||
|
||||
from[i] = new WSearchEditor(lookup, Msg.translate(
|
||||
Env.getCtx(), text[i]), "from", true, false, true);
|
||||
|
||||
from[i].addValueChangeListner(this);
|
||||
from[i].addValueChangeListener(this);
|
||||
|
||||
to[i] = new WSearchEditor(lookup, Msg.translate(
|
||||
Env.getCtx(), text[i]), "to", true, false, true);
|
||||
|
||||
to[i].addValueChangeListner(this);
|
||||
to[i].addValueChangeListener(this);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -539,11 +538,11 @@ public class WMerge extends ADForm implements EventListener, ValueChangeListener
|
|||
|
||||
if (success)
|
||||
{
|
||||
FDialog.info (super.m_windowNo, this, msg);
|
||||
FDialog.info (m_WindowNo, this, msg);
|
||||
}
|
||||
else
|
||||
{
|
||||
FDialog.error(super.m_windowNo, this, "MergeError", m_errorLog.toString());
|
||||
FDialog.error(m_WindowNo, this, "MergeError", m_errorLog.toString());
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -558,12 +557,12 @@ public class WMerge extends ADForm implements EventListener, ValueChangeListener
|
|||
{
|
||||
if (event != null)
|
||||
{
|
||||
if (event.getName().equals(WConfirmPanel.A_CANCEL))
|
||||
if (event.getTarget().getId().equals(ConfirmPanel.A_CANCEL))
|
||||
{
|
||||
SessionManager.getAppDesktop().removeWindow();
|
||||
return;
|
||||
}
|
||||
else if (event.getName().equals(WConfirmPanel.A_OK))
|
||||
else if (event.getTarget().getId().equals(ConfirmPanel.A_OK))
|
||||
{
|
||||
process();
|
||||
}
|
||||
|
|
|
@ -60,8 +60,6 @@ import org.zkoss.zul.Hbox;
|
|||
|
||||
public class WPayPrint extends ADForm implements EventListener
|
||||
{
|
||||
/** Window No */
|
||||
private int m_WindowNo = 0;
|
||||
|
||||
/** Used Bank Account */
|
||||
private int m_C_BankAccount_ID = -1;
|
||||
|
@ -100,13 +98,11 @@ public class WPayPrint extends ADForm implements EventListener
|
|||
|
||||
public WPayPrint()
|
||||
{
|
||||
init(super.m_windowNo);
|
||||
}
|
||||
|
||||
public void init (int WindowNo)
|
||||
protected void initForm()
|
||||
{
|
||||
log.info("");
|
||||
m_WindowNo = WindowNo;
|
||||
|
||||
try
|
||||
{
|
||||
|
@ -137,9 +133,9 @@ public class WPayPrint extends ADForm implements EventListener
|
|||
fPaymentRule.setRows(1);
|
||||
fPaymentRule.setMold("select");
|
||||
|
||||
bCancel.setImage("/images/Cancel24.gif");
|
||||
bPrint.setImage("/images/Print24.gif");
|
||||
bExport.setImage("/images/ExportX24.gif");
|
||||
bCancel.setImage("/images/Cancel24.png");
|
||||
bPrint.setImage("/images/Print24.png");
|
||||
bExport.setImage("/images/ExportX24.png");
|
||||
|
||||
bPrint.addEventListener(Events.ON_CLICK, this);
|
||||
bExport.addEventListener(Events.ON_CLICK, this);
|
||||
|
@ -626,7 +622,7 @@ public class WPayPrint extends ADForm implements EventListener
|
|||
{
|
||||
MPaySelectionCheck check = m_checks[i];
|
||||
// ReportCtrl will check BankAccountDoc for PrintFormat
|
||||
boolean ok = ReportCtl.startDocumentPrint(ReportEngine.CHECK, check.get_ID(), null, super.m_windowNo, directPrint);
|
||||
boolean ok = ReportCtl.startDocumentPrint(ReportEngine.CHECK, check.get_ID(), null, m_WindowNo, directPrint);
|
||||
if (!somethingPrinted && ok)
|
||||
somethingPrinted = true;
|
||||
}
|
||||
|
@ -650,7 +646,7 @@ public class WPayPrint extends ADForm implements EventListener
|
|||
for (int i = 0; i < m_checks.length; i++)
|
||||
{
|
||||
MPaySelectionCheck check = m_checks[i];
|
||||
ReportCtl.startDocumentPrint(ReportEngine.REMITTANCE, check.get_ID(), null, super.m_windowNo, directPrint);
|
||||
ReportCtl.startDocumentPrint(ReportEngine.REMITTANCE, check.get_ID(), null, m_WindowNo, directPrint);
|
||||
}
|
||||
} // remittance
|
||||
|
||||
|
|
|
@ -123,14 +123,13 @@ public class WPaySelect extends ADForm implements EventListener, WTableModelList
|
|||
*/
|
||||
public WPaySelect()
|
||||
{
|
||||
init();
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
*/
|
||||
private void init()
|
||||
protected void initForm()
|
||||
{
|
||||
dataTable = new WListbox();
|
||||
dataTable.setWidth("700px");
|
||||
|
@ -181,11 +180,11 @@ public class WPaySelect extends ADForm implements EventListener, WTableModelList
|
|||
lstPaymentRule.addEventListener(Events.ON_SELECT, this);
|
||||
|
||||
refresh = new Button();
|
||||
refresh.setImage("/images/Refresh24.gif");
|
||||
refresh.setImage("/images/Refresh24.png");
|
||||
refresh.addEventListener(Events.ON_CLICK, this);
|
||||
|
||||
btnProcess = new Button();
|
||||
btnProcess.setImage("/images/Process24.gif");
|
||||
btnProcess.setImage("/images/Process24.png");
|
||||
btnProcess.setEnabled(false);
|
||||
btnProcess.addEventListener(Events.ON_CLICK, this);
|
||||
|
||||
|
@ -277,7 +276,7 @@ public class WPaySelect extends ADForm implements EventListener, WTableModelList
|
|||
|
||||
if (!m_ps.save())
|
||||
{
|
||||
FDialog.error(super.m_windowNo, this, "SaveError", Msg.translate(Env.getCtx(), "C_PaySelection_ID"));
|
||||
FDialog.error(m_WindowNo, this, "SaveError", Msg.translate(Env.getCtx(), "C_PaySelection_ID"));
|
||||
m_ps = null;
|
||||
return;
|
||||
}
|
||||
|
@ -315,7 +314,7 @@ public class WPaySelect extends ADForm implements EventListener, WTableModelList
|
|||
|
||||
if (!psl.save(trxName))
|
||||
{
|
||||
FDialog.error(this.m_windowNo, this, "SaveError", Msg.translate(Env.getCtx(), "C_PaySelectionLine_ID"));
|
||||
FDialog.error(m_WindowNo, this, "SaveError", Msg.translate(Env.getCtx(), "C_PaySelectionLine_ID"));
|
||||
return;
|
||||
}
|
||||
log.fine("C_Invoice_ID=" + C_Invoice_ID
|
||||
|
@ -325,13 +324,13 @@ public class WPaySelect extends ADForm implements EventListener, WTableModelList
|
|||
|
||||
// Ask to Post it
|
||||
|
||||
if (!FDialog.ask(this.m_windowNo, this, "(" + m_ps.getName() + ")"))
|
||||
if (!FDialog.ask(m_WindowNo, this, "(" + m_ps.getName() + ")"))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
ProcessModalDialog msg = new ProcessModalDialog(
|
||||
this, "Payment Selection Manual", null, this.m_windowNo, adProcessId,
|
||||
this, "Payment Selection Manual", null, m_WindowNo, adProcessId,
|
||||
X_C_PaySelection.Table_ID, m_ps.getC_PaySelection_ID(), true);
|
||||
|
||||
if (msg.isValid())
|
||||
|
|
|
@ -535,9 +535,9 @@ public class WPayment extends Window implements EventListener
|
|||
|
||||
Hbox boxButtons = new Hbox();
|
||||
|
||||
btnCancel.setImage("/images/Cancel24.gif");
|
||||
btnCancel.setImage("/images/Cancel24.png");
|
||||
btnCancel.addEventListener(Events.ON_CLICK, this);
|
||||
btnOk.setImage("/images/Ok24.gif");
|
||||
btnOk.setImage("/images/Ok24.png");
|
||||
btnOk.addEventListener(Events.ON_CLICK, this);
|
||||
|
||||
boxButtons.appendChild(btnCancel);
|
||||
|
|
|
@ -73,11 +73,8 @@ public class WSQLProcess extends ADForm implements EventListener
|
|||
super();
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.adempiere.webui.panel.ADForm#init(int, java.lang.String)
|
||||
*/
|
||||
public void init(int adFormId, String name)
|
||||
@Override
|
||||
protected void initForm()
|
||||
{
|
||||
Row rwTop = new Row();
|
||||
Row rwBottom = new Row();
|
||||
|
@ -87,8 +84,6 @@ public class WSQLProcess extends ADForm implements EventListener
|
|||
final int noStatementRows = 3;
|
||||
final int noResultRows = 20;
|
||||
|
||||
super.init(adFormId, name);
|
||||
|
||||
m_grdMain.setWidth("80%");
|
||||
|
||||
// create the top row of components
|
||||
|
@ -133,7 +128,7 @@ public class WSQLProcess extends ADForm implements EventListener
|
|||
{
|
||||
Button btnProcess = new Button();
|
||||
|
||||
btnProcess.setImage("/images/Process24.gif");
|
||||
btnProcess.setImage("/images/Process24.png");
|
||||
btnProcess.setName(Msg.getMsg(Env.getCtx(), "Process"));
|
||||
|
||||
return btnProcess;
|
||||
|
|
|
@ -77,9 +77,6 @@ public class WTrxMaterial extends ADForm implements EventListener, ValueChangeLi
|
|||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** Window No */
|
||||
private int m_WindowNo = 0;
|
||||
|
||||
/** FormFrame */
|
||||
//private FormFrame m_frame;
|
||||
|
||||
|
@ -119,7 +116,6 @@ public class WTrxMaterial extends ADForm implements EventListener, ValueChangeLi
|
|||
|
||||
public WTrxMaterial()
|
||||
{
|
||||
init(super.m_windowNo);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -128,10 +124,9 @@ public class WTrxMaterial extends ADForm implements EventListener, ValueChangeLi
|
|||
* @param frame frame
|
||||
*/
|
||||
|
||||
public void init (int WindowNo)
|
||||
protected void initForm()
|
||||
{
|
||||
log.info("");
|
||||
m_WindowNo = WindowNo;
|
||||
|
||||
try
|
||||
{
|
||||
|
@ -253,22 +248,22 @@ public class WTrxMaterial extends ADForm implements EventListener, ValueChangeLi
|
|||
|
||||
MLookup orgLookup = MLookupFactory.get (ctx, m_WindowNo, 0, 3660, DisplayType.TableDir);
|
||||
orgField = new WTableDirEditor(orgLookup, "AD_Org_ID", "", false, false, true);
|
||||
orgField.addValueChangeListner(this);
|
||||
orgField.addValueChangeListener(this);
|
||||
|
||||
// Locator
|
||||
MLocatorLookup locatorLookup = new MLocatorLookup(ctx, m_WindowNo);
|
||||
locatorField = new WLocatorEditor ("M_Locator_ID", false, false, true, locatorLookup, m_windowNo);
|
||||
locatorField.addValueChangeListner(this);
|
||||
locatorField = new WLocatorEditor ("M_Locator_ID", false, false, true, locatorLookup, m_WindowNo);
|
||||
locatorField.addValueChangeListener(this);
|
||||
|
||||
// Product
|
||||
MLookup productLookup = MLookupFactory.get (ctx, m_WindowNo, 0, 3668, DisplayType.Search);
|
||||
productField = new WSearchEditor(productLookup, "M_Product_ID", "", false, false, true);
|
||||
productField.addValueChangeListner(this);
|
||||
productField.addValueChangeListener(this);
|
||||
|
||||
// Movement Type
|
||||
MLookup mtypeLookup = MLookupFactory.get (ctx, m_WindowNo, 0, 3666, DisplayType.List);
|
||||
mtypeField = new WTableDirEditor(mtypeLookup, "MovementType", "", false, false, true);
|
||||
mtypeField.addValueChangeListner(this);
|
||||
mtypeField.addValueChangeListener(this);
|
||||
|
||||
// Dates
|
||||
dateFField = new Datebox();//"DateFrom", false, false, true, DisplayType.Date, Msg.getMsg(Env.getCtx(), "DateFrom"));
|
||||
|
@ -360,7 +355,7 @@ public class WTrxMaterial extends ADForm implements EventListener, ValueChangeLi
|
|||
{
|
||||
if (gridfields[j].isLookup())
|
||||
{
|
||||
MLookup lookup = MLookupFactory.get(Env.getCtx(), super.m_windowNo,
|
||||
MLookup lookup = MLookupFactory.get(Env.getCtx(), m_WindowNo,
|
||||
0, gridfields[j].getAD_Column_ID(), gridfields[j].getDisplayType());
|
||||
|
||||
NamePair namepair = lookup.get(obj);
|
||||
|
|
|
@ -75,7 +75,7 @@ public class WPerformanceIndicator extends Panel implements EventListener
|
|||
private static DecimalFormat s_format = DisplayType.getNumberFormat(DisplayType.Integer);
|
||||
|
||||
Menupopup popupMenu = new Menupopup();
|
||||
private Menuitem mRefresh = new Menuitem(Msg.getMsg(Env.getCtx(), "Refresh"), "/images/Refresh16.gif");
|
||||
private Menuitem mRefresh = new Menuitem(Msg.getMsg(Env.getCtx(), "Refresh"), "/images/Refresh16.png");
|
||||
|
||||
//Insert Pie Graph Kinamo (pelgrim)
|
||||
// private static Color colorOK = Color.magenta;
|
||||
|
|
|
@ -96,20 +96,18 @@ public class WWFActivity extends ADForm implements EventListener
|
|||
super();
|
||||
}
|
||||
|
||||
public void init(int adFormId, String name)
|
||||
protected void initForm()
|
||||
{
|
||||
super.init(adFormId, name);
|
||||
|
||||
loadActivities();
|
||||
|
||||
fAnswerList.setMold("select");
|
||||
|
||||
bPrevious.setImage("/images/Previous16.gif");
|
||||
bNext.setImage("/images/Next16.gif");
|
||||
bZoom.setImage("/images/Zoom16.gif");
|
||||
bOK.setImage("/images/Ok24.gif");
|
||||
bPrevious.setImage("/images/Previous16.png");
|
||||
bNext.setImage("/images/Next16.png");
|
||||
bZoom.setImage("/images/Zoom16.png");
|
||||
bOK.setImage("/images/Ok24.png");
|
||||
|
||||
MLookup lookup = MLookupFactory.get(Env.getCtx(), super.m_windowNo,
|
||||
MLookup lookup = MLookupFactory.get(Env.getCtx(), m_WindowNo,
|
||||
0, 10443, DisplayType.Search);
|
||||
fForward = new WSearchEditor(lookup, Msg.translate(
|
||||
Env.getCtx(), "AD_User_ID"), "", true, false, true);
|
||||
|
@ -388,7 +386,7 @@ public class WWFActivity extends ADForm implements EventListener
|
|||
fTextMsg.setValue ("");
|
||||
fAnswerText.setVisible(false);
|
||||
fAnswerList.setVisible(false);
|
||||
fAnswerButton.setImage("/images/mWindow.gif");
|
||||
fAnswerButton.setImage("/images/mWindow.png");
|
||||
fAnswerButton.setVisible(false);
|
||||
fTextMsg.setReadonly(m_activities.length == 0);
|
||||
// fTextMsg.setReadWrite(m_activities.length != 0);
|
||||
|
|
|
@ -1,3 +1,15 @@
|
|||
/******************************************************************************
|
||||
* Copyright (C) 2008 Low Heng Sin *
|
||||
* This program is free software; you can redistribute it and/or modify it *
|
||||
* under the terms version 2 of the GNU General Public License as published *
|
||||
* by the Free Software Foundation. This program is distributed in the hope *
|
||||
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* See the GNU General Public License for more details. *
|
||||
* You should have received a copy of the GNU General Public License along *
|
||||
* with this program; if not, write to the Free Software Foundation, Inc., *
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||
*****************************************************************************/
|
||||
package org.adempiere.webui.component;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
|
|
@ -1,3 +1,15 @@
|
|||
/******************************************************************************
|
||||
* Copyright (C) 2008 Low Heng Sin *
|
||||
* This program is free software; you can redistribute it and/or modify it *
|
||||
* under the terms version 2 of the GNU General Public License as published *
|
||||
* by the Free Software Foundation. This program is distributed in the hope *
|
||||
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* See the GNU General Public License for more details. *
|
||||
* You should have received a copy of the GNU General Public License along *
|
||||
* with this program; if not, write to the Free Software Foundation, Inc., *
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||
*****************************************************************************/
|
||||
package org.adempiere.webui.component;
|
||||
|
||||
import java.util.List;
|
||||
|
|
|
@ -1,22 +0,0 @@
|
|||
package org.adempiere.webui.component;
|
||||
|
||||
import org.compiere.util.Env;
|
||||
import org.compiere.util.Msg;
|
||||
|
||||
public class ButtonFactory {
|
||||
|
||||
public static Button createButton(String action, String label) {
|
||||
Button button = new Button();
|
||||
button.setId(action);
|
||||
button.setImage("images/" + action + "16.gif");
|
||||
if (label == null) {
|
||||
label = Msg.getMsg(Env.getCtx(), action);
|
||||
if (label != null && !label.equals(action)) {
|
||||
label = label.replaceAll("[&]", "");
|
||||
button.setLabel(label);
|
||||
}
|
||||
}
|
||||
|
||||
return button;
|
||||
}
|
||||
}
|
|
@ -86,130 +86,130 @@ public class CWindowToolbar extends FToolbar implements EventListener
|
|||
|
||||
btnIgnore = new ToolBarButton();
|
||||
btnIgnore.setName("btnIgnore");
|
||||
btnIgnore.setImage("/images/Ignore16.gif");
|
||||
btnIgnore.setImage("/images/Ignore16.png");
|
||||
btnIgnore.setTooltiptext(Msg.getMsg(Env.getCtx(),"Ignore"));
|
||||
// --
|
||||
btnHelp = new ToolBarButton("");
|
||||
btnHelp.setName("btnHelp");
|
||||
btnHelp.setImage("/images/Help24.gif");
|
||||
btnHelp.setImage("/images/Help24.png");
|
||||
btnHelp.setTooltiptext(Msg.getMsg(Env.getCtx(),"Help"));
|
||||
|
||||
btnNew = new ToolBarButton("");
|
||||
btnNew.setName("btnNew");
|
||||
btnNew.setImage("/images/New24.gif");
|
||||
btnNew.setImage("/images/New24.png");
|
||||
btnNew.setTooltiptext(Msg.getMsg(Env.getCtx(),"New"));
|
||||
|
||||
btnDelete = new ToolBarButton("");
|
||||
btnDelete.setName("btnDelete");
|
||||
btnDelete.setImage("/images/Delete24.gif");
|
||||
btnDelete.setImage("/images/Delete24.png");
|
||||
btnDelete.setTooltiptext(Msg.getMsg(Env.getCtx(),"Delete"));
|
||||
|
||||
btnSave = new ToolBarButton("");
|
||||
btnSave.setName("btnSave");
|
||||
btnSave.setImage("/images/Save24.gif");
|
||||
btnSave.setImage("/images/Save24.png");
|
||||
btnSave.setTooltiptext(Msg.getMsg(Env.getCtx(),"Save"));
|
||||
// --
|
||||
btnRefresh = new ToolBarButton("");
|
||||
btnRefresh.setName("btnRefresh");
|
||||
btnRefresh.setImage("/images/Refresh24.gif");
|
||||
btnRefresh.setImage("/images/Refresh24.png");
|
||||
btnRefresh.setTooltiptext(Msg.getMsg(Env.getCtx(),"Refresh"));
|
||||
|
||||
btnFind = new ToolBarButton("");
|
||||
btnFind.setName("btnFind");
|
||||
btnFind.setImage("/images/Find24.gif");
|
||||
btnFind.setImage("/images/Find24.png");
|
||||
btnFind.setTooltiptext(Msg.getMsg(Env.getCtx(),"Find"));
|
||||
|
||||
btnAttachment = new ToolBarButton("");
|
||||
btnAttachment.setName("btnAttachment");
|
||||
btnAttachment.setImage("/images/Attachment24.gif");
|
||||
btnAttachment.setImage("/images/Attachment24.png");
|
||||
btnAttachment.setTooltiptext(Msg.getMsg(Env.getCtx(),"Attachment"));
|
||||
// --
|
||||
|
||||
btnGridToggle = new ToolBarButton("");
|
||||
btnGridToggle.setName("btnGridToggle");
|
||||
btnGridToggle.setImage("/images/Multi24.gif");
|
||||
btnGridToggle.setImage("/images/Multi24.png");
|
||||
btnGridToggle.setTooltiptext(Msg.getMsg(Env.getCtx(),"Multi"));
|
||||
|
||||
btnHistoryRecords = new ToolBarButton("");
|
||||
btnHistoryRecords.setName("btnHistoryRecords");
|
||||
btnHistoryRecords.setImage("/images/HistoryX24.gif");
|
||||
btnHistoryRecords.setImage("/images/HistoryX24.png");
|
||||
btnHistoryRecords.setTooltiptext(Msg.getMsg(Env.getCtx(),"History"));
|
||||
|
||||
btnMenu = new ToolBarButton("");
|
||||
btnMenu.setName("btnHome");
|
||||
btnMenu.setImage("/images/Home24.gif");
|
||||
btnMenu.setImage("/images/Home24.png");
|
||||
btnMenu.setTooltiptext(Msg.getMsg(Env.getCtx(),"Home"));
|
||||
|
||||
btnParentRecord = new ToolBarButton("");
|
||||
btnParentRecord.setName("btnParentRecord");
|
||||
btnParentRecord.setImage("/images/Parent24.gif");
|
||||
btnParentRecord.setImage("/images/Parent24.png");
|
||||
btnParentRecord.setTooltiptext(Msg.getMsg(Env.getCtx(),"Parent"));
|
||||
|
||||
btnDetailRecord = new ToolBarButton("");
|
||||
btnDetailRecord.setName("btnDetailRecord");
|
||||
btnDetailRecord.setImage("/images/Detail24.gif");
|
||||
btnDetailRecord.setImage("/images/Detail24.png");
|
||||
btnDetailRecord.setTooltiptext(Msg.getMsg(Env.getCtx(),"Detail"));
|
||||
// --
|
||||
btnFirst = new ToolBarButton("");
|
||||
btnFirst.setName("btnFirst");
|
||||
btnFirst.setImage("/images/First24.gif");
|
||||
btnFirst.setImage("/images/First24.png");
|
||||
btnFirst.setTooltiptext(Msg.getMsg(Env.getCtx(),"First"));
|
||||
|
||||
btnPrevious = new ToolBarButton("");
|
||||
btnPrevious.setName("btnPrevious");
|
||||
btnPrevious.setImage("/images/Previous24.gif");
|
||||
btnPrevious.setImage("/images/Previous24.png");
|
||||
btnPrevious.setTooltiptext(Msg.getMsg(Env.getCtx(),"Previous"));
|
||||
|
||||
btnNext = new ToolBarButton("");
|
||||
btnNext.setName("btnNext");
|
||||
btnNext.setImage("/images/Next24.gif");
|
||||
btnNext.setImage("/images/Next24.png");
|
||||
btnNext.setTooltiptext(Msg.getMsg(Env.getCtx(),"Next"));
|
||||
|
||||
btnLast = new ToolBarButton("");
|
||||
btnLast.setName("btnLast");
|
||||
btnLast.setImage("/images/Last24.gif");
|
||||
btnLast.setImage("/images/Last24.png");
|
||||
btnLast.setTooltiptext(Msg.getMsg(Env.getCtx(),"Last"));
|
||||
|
||||
// --
|
||||
btnReport = new ToolBarButton("");
|
||||
btnReport.setName("btnReport");
|
||||
btnReport.setImage("/images/Report24.gif");
|
||||
btnReport.setImage("/images/Report24.png");
|
||||
btnReport.setTooltiptext(Msg.getMsg(Env.getCtx(),"Report"));
|
||||
|
||||
btnArchive = new ToolBarButton("");
|
||||
btnArchive.setName("btnArchive");
|
||||
btnArchive.setImage("/images/Archive24.gif");
|
||||
btnArchive.setImage("/images/Archive24.png");
|
||||
btnArchive.setTooltiptext(Msg.getMsg(Env.getCtx(),"Archive"));
|
||||
|
||||
btnPrint = new ToolBarButton("");
|
||||
btnPrint.setName("btnPrint");
|
||||
btnPrint.setImage("/images/Print24.gif");
|
||||
btnPrint.setImage("/images/Print24.png");
|
||||
btnPrint.setTooltiptext(Msg.getMsg(Env.getCtx(),"Print"));
|
||||
|
||||
// --
|
||||
btnZoomAcross = new ToolBarButton("");
|
||||
btnZoomAcross.setName("btnZoomAcross");
|
||||
btnZoomAcross.setImage("/images/ZoomAcross24.gif");
|
||||
btnZoomAcross.setImage("/images/ZoomAcross24.png");
|
||||
btnZoomAcross.setTooltiptext(Msg.getMsg(Env.getCtx(),"ZoomAcross"));
|
||||
|
||||
btnActiveWorkflows = new ToolBarButton("");
|
||||
btnActiveWorkflows.setName("btnActiveWorkflows");
|
||||
btnActiveWorkflows.setImage("/images/WorkFlow24.gif");
|
||||
btnActiveWorkflows.setImage("/images/WorkFlow24.png");
|
||||
btnActiveWorkflows.setTooltiptext(Msg.getMsg(Env.getCtx(),"WorkFlow"));
|
||||
|
||||
btnRequests = new ToolBarButton("");
|
||||
btnRequests.setName("btnRequests");
|
||||
btnRequests.setImage("/images/Request24.gif");
|
||||
btnRequests.setImage("/images/Request24.png");
|
||||
btnRequests.setTooltiptext(Msg.getMsg(Env.getCtx(),"Request"));
|
||||
|
||||
btnProductInfo = new ToolBarButton("");
|
||||
btnProductInfo.setName("btnProductInfo");
|
||||
btnProductInfo.setImage("/images/Product24.gif");
|
||||
btnProductInfo.setImage("/images/Product24.png");
|
||||
btnProductInfo.setTooltiptext(Msg.getMsg(Env.getCtx(),"InfoProduct"));
|
||||
|
||||
// btnExit = new ToolBarButton("");
|
||||
// btnExit.setName("btnExit");
|
||||
// btnExit.setImage("/images/End24.gif");
|
||||
// btnExit.setImage("/images/End24.png");
|
||||
|
||||
this.appendChild(btnIgnore);
|
||||
addSeparator();
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
/******************************************************************************
|
||||
* Product: Posterita Ajax UI *
|
||||
* Copyright (C) 2007 Posterita Ltd. All Rights Reserved. *
|
||||
* Copyright (C) 2008 Low Heng Sin *
|
||||
* This program is free software; you can redistribute it and/or modify it *
|
||||
* under the terms version 2 of the GNU General Public License as published *
|
||||
* by the Free Software Foundation. This program is distributed in the hope *
|
||||
|
@ -10,9 +9,6 @@
|
|||
* You should have received a copy of the GNU General Public License along *
|
||||
* with this program; if not, write to the Free Software Foundation, Inc., *
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||
* For the text or an alternative of this public license, you may reach us *
|
||||
* Posterita Ltd., 3, Draper Avenue, Quatre Bornes, Mauritius *
|
||||
* or via info@posterita.org or http://www.posterita.org/ *
|
||||
*****************************************************************************/
|
||||
|
||||
package org.adempiere.webui.component;
|
||||
|
@ -21,7 +17,9 @@ import org.zkoss.zk.ui.event.EventListener;
|
|||
import org.zkoss.zul.Hbox;
|
||||
|
||||
/**
|
||||
* URL Box
|
||||
*
|
||||
* @author Low Heng Sin
|
||||
*
|
||||
*/
|
||||
public class Combinationbox extends Hbox
|
||||
{
|
||||
|
|
|
@ -22,6 +22,7 @@ import java.util.Iterator;
|
|||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.adempiere.webui.LayoutUtils;
|
||||
import org.zkoss.zk.ui.event.EventListener;
|
||||
import org.zkoss.zk.ui.event.Events;
|
||||
import org.zkoss.zul.Hbox;
|
||||
|
@ -37,9 +38,35 @@ public final class ConfirmPanel extends Hbox
|
|||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public static final String A_OK = "Ok";
|
||||
/** Action String OK. */
|
||||
public static final String A_OK = "Ok";
|
||||
/** Action String Cancel. */
|
||||
public static final String A_CANCEL = "Cancel";
|
||||
/** Action String Refresh. */
|
||||
public static final String A_REFRESH = "Refresh";
|
||||
/** Action String Reset. */
|
||||
public static final String A_RESET = "Reset";
|
||||
/** Action String Customize. */
|
||||
public static final String A_CUSTOMIZE = "Customize";
|
||||
/** Action String History. */
|
||||
public static final String A_HISTORY = "History";
|
||||
/** Action String Zoom. */
|
||||
public static final String A_ZOOM = "Zoom";
|
||||
|
||||
public static final String A_CANCEL = "Cancel";
|
||||
/** Action String Process. */
|
||||
public static final String A_PROCESS = "Process";
|
||||
/** Action String Print. */
|
||||
public static final String A_PRINT = "Print";
|
||||
/** Action String Export. */
|
||||
public static final String A_EXPORT = "Export";
|
||||
/** Action String Help. */
|
||||
public static final String A_HELP = "Help";
|
||||
/** Action String Delete. */
|
||||
public static final String A_DELETE = "Delete";
|
||||
/** Action String PAttribute. */
|
||||
public static final String A_PATTRIBUTE = "PAttribute";
|
||||
/** Action String New. */
|
||||
public static final String A_NEW = "New";
|
||||
|
||||
private Map<String, Button> buttonMap = new HashMap<String, Button>();
|
||||
|
||||
|
@ -71,7 +98,9 @@ public final class ConfirmPanel extends Hbox
|
|||
Button button = new Button();
|
||||
button.setName("btn"+name);
|
||||
button.setId(name);
|
||||
button.setSrc("images/"+name+"24.gif");
|
||||
button.setSrc("images/"+name+"24.png");
|
||||
|
||||
LayoutUtils.addSclass("action-button", button);
|
||||
|
||||
buttonMap.put(name, button);
|
||||
|
||||
|
@ -96,29 +125,29 @@ public final class ConfirmPanel extends Hbox
|
|||
{
|
||||
init();
|
||||
|
||||
setVisible("Cancel", withCancelButton);
|
||||
addComponentsRight(createButton("Ok"));
|
||||
addComponentsRight(createButton("Cancel"));
|
||||
setVisible(A_CANCEL, withCancelButton);
|
||||
addComponentsRight(createButton(A_OK));
|
||||
addComponentsRight(createButton(A_CANCEL));
|
||||
|
||||
if (withRefreshButton)
|
||||
{
|
||||
addComponentsLeft(createButton("Refresh"));
|
||||
addComponentsLeft(createButton(A_REFRESH));
|
||||
}
|
||||
if (withResetButton)
|
||||
{
|
||||
addComponentsLeft(createButton("Reset"));
|
||||
addComponentsLeft(createButton(A_RESET));
|
||||
}
|
||||
if (withCustomizeButton)
|
||||
{
|
||||
addComponentsLeft(createButton("Customize"));
|
||||
addComponentsLeft(createButton(A_CUSTOMIZE));
|
||||
}
|
||||
if (withHistoryButton)
|
||||
{
|
||||
addComponentsLeft(createButton("History"));
|
||||
addComponentsLeft(createButton(A_HISTORY));
|
||||
}
|
||||
if (withZoomButton)
|
||||
{
|
||||
addComponentsLeft(createButton("Zoom"));
|
||||
addComponentsLeft(createButton(A_ZOOM));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -178,6 +207,8 @@ public final class ConfirmPanel extends Hbox
|
|||
*/
|
||||
public void addComponentsLeft(Button button)
|
||||
{
|
||||
if (!buttonMap.containsKey(button.getId()))
|
||||
buttonMap.put(button.getId(), button);
|
||||
pnlBtnLeft.appendChild(button);
|
||||
}
|
||||
|
||||
|
@ -187,6 +218,8 @@ public final class ConfirmPanel extends Hbox
|
|||
*/
|
||||
public void addComponentsRight(Button button)
|
||||
{
|
||||
if (!buttonMap.containsKey(button.getId()))
|
||||
buttonMap.put(button.getId(), button);
|
||||
pnlBtnRight.appendChild(button);
|
||||
}
|
||||
|
||||
|
@ -380,7 +413,7 @@ public final class ConfirmPanel extends Hbox
|
|||
* @return Button
|
||||
*/
|
||||
public Button getOKButton() {
|
||||
return getButton("Ok");
|
||||
return getButton(A_OK);
|
||||
}
|
||||
|
||||
} // ConfirmPanel
|
||||
|
|
|
@ -0,0 +1,29 @@
|
|||
/******************************************************************************
|
||||
* Copyright (C) 2008 Low Heng Sin *
|
||||
* This program is free software; you can redistribute it and/or modify it *
|
||||
* under the terms version 2 of the GNU General Public License as published *
|
||||
* by the Free Software Foundation. This program is distributed in the hope *
|
||||
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* See the GNU General Public License for more details. *
|
||||
* You should have received a copy of the GNU General Public License along *
|
||||
* with this program; if not, write to the Free Software Foundation, Inc., *
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||
*****************************************************************************/
|
||||
package org.adempiere.webui.component;
|
||||
|
||||
import org.zkoss.zk.ui.IdSpace;
|
||||
|
||||
/**
|
||||
* Tabpanel use by desktop to host AD Window, implements IdSpace to avoid Id conflict
|
||||
* @author Low Heng Sin
|
||||
*
|
||||
*/
|
||||
public class DesktopTabpanel extends Tabpanel implements IdSpace {
|
||||
|
||||
/**
|
||||
* generated serail version id
|
||||
*/
|
||||
private static final long serialVersionUID = -7142048018260264752L;
|
||||
|
||||
}
|
|
@ -1,7 +1,28 @@
|
|||
/******************************************************************************
|
||||
* Copyright (C) 2008 Low Heng Sin *
|
||||
* This program is free software; you can redistribute it and/or modify it *
|
||||
* under the terms version 2 of the GNU General Public License as published *
|
||||
* by the Free Software Foundation. This program is distributed in the hope *
|
||||
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* See the GNU General Public License for more details. *
|
||||
* You should have received a copy of the GNU General Public License along *
|
||||
* with this program; if not, write to the Free Software Foundation, Inc., *
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||
*****************************************************************************/
|
||||
package org.adempiere.webui.component;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Low Heng Sin
|
||||
*
|
||||
*/
|
||||
public class GridFactory {
|
||||
|
||||
/**
|
||||
* New instance of grid for form layout
|
||||
* @return Grid
|
||||
*/
|
||||
public static Grid newGridLayout() {
|
||||
Grid grid = new Grid();
|
||||
grid.makeNoStrip();
|
||||
|
|
|
@ -37,6 +37,11 @@ import org.zkoss.zul.ListitemRenderer;
|
|||
import org.zkoss.zul.Paging;
|
||||
import org.zkoss.zul.event.ZulEvents;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Low Heng Sin
|
||||
*
|
||||
*/
|
||||
public class GridPanel extends Borderlayout implements EventListener
|
||||
{
|
||||
private static final int MIN_COLUMN_WIDTH = 100;
|
||||
|
|
|
@ -41,7 +41,7 @@ public class Label extends org.zkoss.zul.Label
|
|||
|
||||
public Label(String value)
|
||||
{
|
||||
super(value);
|
||||
super(value != null ? value.replaceAll("[&]", "") : null);
|
||||
}
|
||||
|
||||
public boolean isMandatory() {
|
||||
|
@ -59,7 +59,7 @@ public class Label extends org.zkoss.zul.Label
|
|||
|
||||
@Override
|
||||
public void setValue(String value) {
|
||||
super.setValue(value);
|
||||
super.setValue(value != null ? value.replaceAll("[&]", "") : null);
|
||||
setupMandatoryDecorator();
|
||||
}
|
||||
|
||||
|
|
|
@ -1,13 +1,38 @@
|
|||
/******************************************************************************
|
||||
* Copyright (C) 2008 Low Heng Sin *
|
||||
* This program is free software; you can redistribute it and/or modify it *
|
||||
* under the terms version 2 of the GNU General Public License as published *
|
||||
* by the Free Software Foundation. This program is distributed in the hope *
|
||||
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* See the GNU General Public License for more details. *
|
||||
* You should have received a copy of the GNU General Public License along *
|
||||
* with this program; if not, write to the Free Software Foundation, Inc., *
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||
*****************************************************************************/
|
||||
package org.adempiere.webui.component;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Low Heng Sin
|
||||
*
|
||||
*/
|
||||
public class ListboxFactory {
|
||||
|
||||
/**
|
||||
* Create new listbox instance that is in combo mode
|
||||
* @return Listbox
|
||||
*/
|
||||
public static Listbox newDropdownListbox() {
|
||||
Listbox listbox = new Listbox();
|
||||
listbox.setMold("select");
|
||||
return listbox;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create new data table instance for use in custom form.
|
||||
* @return WListbox
|
||||
*/
|
||||
public static WListbox newDataTable() {
|
||||
WListbox dataTable = new WListbox();
|
||||
dataTable.setWidth("100%");
|
||||
|
|
|
@ -101,19 +101,19 @@ public class Messagebox extends Window implements EventListener
|
|||
lblMsg.setValue(msg);
|
||||
|
||||
btnOk.setLabel("OK");
|
||||
btnOk.setImage("/images/Ok24.gif");
|
||||
btnOk.setImage("/images/Ok24.png");
|
||||
btnOk.addEventListener(Events.ON_CLICK, this);
|
||||
|
||||
btnCancel.setLabel("Cancel");
|
||||
btnCancel.setImage("/images/Cancel24.gif");
|
||||
btnCancel.setImage("/images/Cancel24.png");
|
||||
btnCancel.addEventListener(Events.ON_CLICK, this);
|
||||
|
||||
btnYes.setLabel("Yes");
|
||||
btnYes.setImage("/images/Ok24.gif");
|
||||
btnYes.setImage("/images/Ok24.png");
|
||||
btnYes.addEventListener(Events.ON_CLICK, this);
|
||||
|
||||
btnNo.setLabel("No");
|
||||
btnNo.setImage("/images/Cancel24.gif");
|
||||
btnNo.setImage("/images/Cancel24.png");
|
||||
btnNo.addEventListener(Events.ON_CLICK, this);
|
||||
|
||||
btnAbort.setLabel("Abort");
|
||||
|
@ -125,7 +125,7 @@ public class Messagebox extends Window implements EventListener
|
|||
btnRetry.addEventListener(Events.ON_CLICK, this);
|
||||
|
||||
btnIgnore.setLabel("Ignore");
|
||||
btnIgnore.setImage("/images/Ignore24.gif");
|
||||
btnIgnore.setImage("/images/Ignore24.png");
|
||||
btnIgnore.addEventListener(Events.ON_CLICK, this);
|
||||
|
||||
Panel pnlMessage = new Panel();
|
||||
|
|
|
@ -50,7 +50,7 @@ public class NumberBox extends Bandbox
|
|||
|
||||
private void init()
|
||||
{
|
||||
this.setImage("/images/Calculator16.gif");
|
||||
this.setImage("/images/Calculator16.png");
|
||||
this.setAction("onKeyPress : return calc.validate('" +
|
||||
this.getId() + "'," + integral + ", event);");
|
||||
this.appendChild(getBandPopup());
|
||||
|
|
|
@ -52,4 +52,9 @@ public class ToolBarButton extends org.zkoss.zul.Toolbarbutton
|
|||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setTooltiptext(String tooltiptext) {
|
||||
super.setTooltiptext(tooltiptext != null ? tooltiptext.replaceAll("[&]", "") : null);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -17,28 +17,23 @@
|
|||
|
||||
package org.adempiere.webui.component;
|
||||
|
||||
import java.awt.Dimension;
|
||||
import java.io.IOException;
|
||||
import java.net.URI;
|
||||
|
||||
import org.adempiere.webui.LayoutUtils;
|
||||
import org.adempiere.webui.apps.AEnv;
|
||||
import org.compiere.util.Env;
|
||||
import org.compiere.util.Msg;
|
||||
import org.zkoss.zk.ui.event.Event;
|
||||
import org.zkoss.zk.ui.event.EventListener;
|
||||
import org.zkoss.zk.ui.event.Events;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Application Action.
|
||||
* Creates Action with MenuItem and Button, delegate execution of action to an attached ActionListener instance
|
||||
* Creates Action with Button
|
||||
* The ActionCommand is translated for display
|
||||
* If translated text contains &, the next character is the Mnemonic
|
||||
*
|
||||
* @author Andrew Kimball
|
||||
*/
|
||||
public class WAppsAction implements EventListener
|
||||
public class WAppsAction
|
||||
{
|
||||
/**
|
||||
*
|
||||
|
@ -88,7 +83,6 @@ public class WAppsAction implements EventListener
|
|||
int pos = newToolTipText.indexOf('&');
|
||||
if (pos != -1 && newToolTipText.length() > pos) // We have a nemonic - creates ALT-_
|
||||
{
|
||||
// TODO create mnemonic
|
||||
Character ch = new Character(newToolTipText.toLowerCase().charAt(pos + 1));
|
||||
if (ch != ' ')
|
||||
{
|
||||
|
@ -100,38 +94,31 @@ public class WAppsAction implements EventListener
|
|||
}
|
||||
}
|
||||
//
|
||||
//Image small = getImage(action, true);
|
||||
URI large = getImage(action, false);
|
||||
//Image largePressed = null;
|
||||
|
||||
// Attributes
|
||||
|
||||
m_button = new Button();
|
||||
|
||||
m_button.setTooltiptext(newToolTipText); // Display
|
||||
|
||||
// Create Button
|
||||
|
||||
m_button.setName(action);
|
||||
// Correcting Action items
|
||||
m_button = new Button();
|
||||
m_button.setTooltiptext(newToolTipText); // Display
|
||||
m_button.setName("btn" + action);
|
||||
m_button.setId(action);
|
||||
|
||||
//Image only if image is available
|
||||
if (large != null)
|
||||
{
|
||||
m_button.setImage(large.getPath());
|
||||
//m_button.setImage("/images/Cancel16.gif");
|
||||
m_button.setLabel(null);
|
||||
}
|
||||
m_button.setWidth(Integer.toString(Double.valueOf(BUTTON_SIZE.getWidth()).intValue()));
|
||||
m_button.setHeight(Integer.toString(Double.valueOf(BUTTON_SIZE.getHeight()).intValue()));
|
||||
else
|
||||
{
|
||||
m_button.setLabel(newToolTipText);
|
||||
}
|
||||
LayoutUtils.addSclass("action-button", m_button);
|
||||
} // Action
|
||||
|
||||
/** Button Size */
|
||||
public static final Dimension BUTTON_SIZE = new Dimension(28,28);
|
||||
/** CButton or CToggelButton */
|
||||
|
||||
private Button m_button;
|
||||
|
||||
private String m_action = null;
|
||||
private String m_accelerator = null;
|
||||
private EventListener m_delegate = null;
|
||||
|
||||
/**
|
||||
* Get Icon with name action
|
||||
|
@ -142,7 +129,7 @@ public class WAppsAction implements EventListener
|
|||
private URI getImage(String name, boolean small) throws IOException
|
||||
{
|
||||
String fullName = name + (small ? "16" : "24");
|
||||
URI uri = AEnv.getImage2(fullName);
|
||||
URI uri = AEnv.getImage(fullName + ".png");
|
||||
return uri;
|
||||
} // getIcon
|
||||
|
||||
|
@ -165,44 +152,6 @@ public class WAppsAction implements EventListener
|
|||
} // getButton
|
||||
|
||||
|
||||
/**
|
||||
* Set Delegate to receive the actionPerformed calls
|
||||
* @param listener listener
|
||||
* @throws IllegalArgumentException if the listener is not a window. This
|
||||
* exception can be ignored as events will still be fired for button presses.
|
||||
*/
|
||||
public void setDelegate(EventListener listener) throws IllegalArgumentException
|
||||
{
|
||||
m_button.addEventListener(Events.ON_CLICK, this);
|
||||
m_delegate = listener;
|
||||
|
||||
if (listener instanceof Window)
|
||||
{
|
||||
((Window) listener).setCtrlKeys(this.m_accelerator);
|
||||
((Window) listener).addEventListener(Events.ON_CTRL_KEY, this);
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new IllegalArgumentException("Functionality has been restricted. "
|
||||
+ " as a result of the listener not being a Window. "
|
||||
+ "Consequently, it is unable to respond to keystrokes");
|
||||
}
|
||||
|
||||
return;
|
||||
} // setDelegate
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.zkoss.zk.ui.event.EventListener#onEvent(org.zkoss.zk.ui.event.Event)
|
||||
*/
|
||||
public void onEvent(Event event) throws Exception
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
Event newEvent = new Event(this.m_action, event.getTarget());
|
||||
m_delegate.onEvent(newEvent);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
public String getCtrlKeys()
|
||||
{
|
||||
return this.m_accelerator;
|
||||
|
|
|
@ -1,652 +0,0 @@
|
|||
/******************************************************************************
|
||||
* Product: Posterita Ajax UI *
|
||||
* Copyright (C) 2007 Posterita Ltd. All Rights Reserved. *
|
||||
* This program is free software; you can redistribute it and/or modify it *
|
||||
* under the terms version 2 of the GNU General Public License as published *
|
||||
* by the Free Software Foundation. This program is distributed in the hope *
|
||||
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* See the GNU General Public License for more details. *
|
||||
* You should have received a copy of the GNU General Public License along *
|
||||
* with this program; if not, write to the Free Software Foundation, Inc., *
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||
* For the text or an alternative of this public license, you may reach us *
|
||||
* Posterita Ltd., 3, Draper Avenue, Quatre Bornes, Mauritius *
|
||||
* or via info@posterita.org or http://www.posterita.org/ *
|
||||
*****************************************************************************/
|
||||
|
||||
package org.adempiere.webui.component;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.logging.Level;
|
||||
|
||||
import org.compiere.util.CLogger;
|
||||
import org.compiere.util.Env;
|
||||
import org.compiere.util.Msg;
|
||||
import org.zkoss.zk.ui.event.Event;
|
||||
import org.zkoss.zk.ui.event.EventListener;
|
||||
import org.zkoss.zk.ui.event.Events;
|
||||
|
||||
/**
|
||||
* @author Andrew Kimball
|
||||
*
|
||||
*/
|
||||
public class WConfirmPanel extends Panel implements EventListener
|
||||
{
|
||||
/** Action String OK. */
|
||||
public static final String A_OK = "Ok";
|
||||
/** Action String Cancel. */
|
||||
public static final String A_CANCEL = "Cancel";
|
||||
/** Action String Refresh. */
|
||||
public static final String A_REFRESH = "Refresh";
|
||||
/** Action String Reset. */
|
||||
public static final String A_RESET = "Reset";
|
||||
/** Action String Customize. */
|
||||
public static final String A_CUSTOMIZE = "Customize";
|
||||
/** Action String History. */
|
||||
public static final String A_HISTORY = "History";
|
||||
/** Action String Zoom. */
|
||||
public static final String A_ZOOM = "Zoom";
|
||||
|
||||
/** Action String Process. */
|
||||
public static final String A_PROCESS = "Process";
|
||||
/** Action String Print. */
|
||||
public static final String A_PRINT = "Print";
|
||||
/** Action String Export. */
|
||||
public static final String A_EXPORT = "Export";
|
||||
/** Action String Help. */
|
||||
public static final String A_HELP = "Help";
|
||||
/** Action String Delete. */
|
||||
public static final String A_DELETE = "Delete";
|
||||
/** Action String PAttribute. */
|
||||
public static final String A_PATTRIBUTE = "PAttribute";
|
||||
/** Action String New. */
|
||||
public static final String A_NEW = "New";
|
||||
|
||||
/** Logger. */
|
||||
private static CLogger log = CLogger.getCLogger(WConfirmPanel.class);
|
||||
|
||||
|
||||
/** Cancel action. */
|
||||
private WAppsAction m_actionCancel;
|
||||
private WAppsAction m_actionOk;
|
||||
|
||||
private WAppsAction m_actionRefresh;
|
||||
private WAppsAction m_actionReset;
|
||||
private WAppsAction m_actionCustomize;
|
||||
private WAppsAction m_actionHistory;
|
||||
private WAppsAction m_actionZoom;
|
||||
|
||||
/**
|
||||
* Create Confirmation Panel with OK Button.
|
||||
*/
|
||||
public WConfirmPanel()
|
||||
{
|
||||
this (false, false, false, false, false, false, true);
|
||||
} // ConfirmPanel
|
||||
|
||||
|
||||
/**
|
||||
* Create Confirmation Panel with OK and Cancel Button.
|
||||
* @param withCancelButton with cancel
|
||||
*/
|
||||
public WConfirmPanel(boolean withCancelButton)
|
||||
{
|
||||
this(withCancelButton, false, false, false, false, false, true);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create Confirmation Panel with different buttons.
|
||||
* @param withCancelButton with cancel
|
||||
* @param withRefreshButton with refresh
|
||||
* @param withResetButton with reset
|
||||
* @param withCustomizeButton with customize
|
||||
* @param withHistoryButton with history
|
||||
* @param withZoomButton with zoom
|
||||
* @param withText with tool tip text
|
||||
*/
|
||||
public WConfirmPanel(boolean withCancelButton,
|
||||
boolean withRefreshButton,
|
||||
boolean withResetButton,
|
||||
boolean withCustomizeButton,
|
||||
boolean withHistoryButton,
|
||||
boolean withZoomButton,
|
||||
boolean withText)
|
||||
{
|
||||
Panel pnlOkCancel = new Panel();
|
||||
Button button;
|
||||
|
||||
try
|
||||
{
|
||||
|
||||
this.setAlign("right");
|
||||
|
||||
// Cancel
|
||||
m_actionCancel = createCancelButton(withText);
|
||||
Button btnCancel = m_actionCancel.getButton();
|
||||
setCancelVisible(btnCancel, withCancelButton);
|
||||
pnlOkCancel.appendChild(btnCancel);
|
||||
|
||||
// OK
|
||||
m_actionOk = createOKButton(withText);
|
||||
Button btnOk = m_actionOk.getButton();
|
||||
pnlOkCancel.appendChild(btnOk);
|
||||
|
||||
this.appendChild(pnlOkCancel);
|
||||
|
||||
//
|
||||
if (withRefreshButton)
|
||||
{
|
||||
m_actionRefresh = createRefreshButton(withText);
|
||||
Button btnRefresh = m_actionRefresh.getButton();
|
||||
this.appendChild(btnRefresh);
|
||||
}
|
||||
if (withResetButton)
|
||||
{
|
||||
m_actionReset = createResetButton(withText);
|
||||
Button btnReset = m_actionReset.getButton();
|
||||
this.appendChild(btnReset);
|
||||
}
|
||||
if (withCustomizeButton)
|
||||
{
|
||||
m_actionCustomize = createCustomizeButton(withText);
|
||||
Button btnCustomize = m_actionCustomize.getButton();
|
||||
this.appendChild(btnCustomize);
|
||||
}
|
||||
if (withHistoryButton)
|
||||
{
|
||||
m_actionHistory = createHistoryButton(withText);
|
||||
Button btnHistory = m_actionHistory.getButton();
|
||||
this.appendChild(btnHistory);
|
||||
}
|
||||
if (withZoomButton)
|
||||
{
|
||||
m_actionZoom = createZoomButton(withText);
|
||||
Button btnZoom = m_actionZoom.getButton();
|
||||
this.appendChild(btnZoom);
|
||||
}
|
||||
}
|
||||
catch(Exception exception)
|
||||
{
|
||||
log.log(Level.WARNING, "Failed to correctly create Confirmation Panel:"
|
||||
+ exception.getMessage());
|
||||
}
|
||||
} // ConfirmPanel
|
||||
|
||||
/**
|
||||
* Create OK Button with Standard text.
|
||||
* @param withText with text
|
||||
* @return OK Button
|
||||
*/
|
||||
public static final WAppsAction createOKButton (boolean withText) throws IOException
|
||||
{
|
||||
if (withText)
|
||||
{
|
||||
return createOKButton(Msg.getMsg(Env.getCtx(), A_OK));
|
||||
}
|
||||
return createOKButton("");
|
||||
} // createOKButton
|
||||
|
||||
/**
|
||||
* Create OK Button with label text and F4 Shortcut.
|
||||
* @param text text
|
||||
* @return OK Button
|
||||
*/
|
||||
public static final WAppsAction createOKButton (String text) throws IOException
|
||||
{
|
||||
final String specialKey = "#f2";
|
||||
WAppsAction aa = new WAppsAction(A_OK, specialKey, text);
|
||||
return aa;
|
||||
} // createOKButton
|
||||
|
||||
/**
|
||||
* Create Cancel Button wlth label text and register ESC as KeyStroke.
|
||||
* @param text text
|
||||
* @return Cancel Button
|
||||
*/
|
||||
public static final WAppsAction createCancelButton(String text) throws IOException
|
||||
{
|
||||
WAppsAction aa = new WAppsAction(A_CANCEL, null, text);
|
||||
return aa;
|
||||
} // createCancelButton
|
||||
|
||||
/**
|
||||
* Create Cancel Button wlth Standard text.
|
||||
* @param withText with text
|
||||
* @return Button
|
||||
*/
|
||||
public static final WAppsAction createCancelButton(boolean withText) throws IOException
|
||||
{
|
||||
if (withText)
|
||||
{
|
||||
return createCancelButton(Msg.getMsg(Env.getCtx(), A_CANCEL));
|
||||
}
|
||||
return createCancelButton("");
|
||||
} // createCancelButton
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Create Refresh Button wlth label text and F5.
|
||||
* @param text text
|
||||
* @return button
|
||||
*/
|
||||
public static final WAppsAction createRefreshButton (String text) throws IOException
|
||||
{
|
||||
final String specialKey = "#f5";
|
||||
|
||||
WAppsAction aa = new WAppsAction(A_REFRESH, specialKey, text);
|
||||
|
||||
return aa;
|
||||
} // createRefreshButton
|
||||
|
||||
/**
|
||||
* Create Refresh Button wlth Standard text.
|
||||
* @param withText with text
|
||||
* @return Button
|
||||
*/
|
||||
public static final WAppsAction createRefreshButton (boolean withText) throws IOException
|
||||
{
|
||||
if (withText)
|
||||
{
|
||||
return createRefreshButton(Msg.getMsg(Env.getCtx(), A_REFRESH));
|
||||
}
|
||||
return createRefreshButton("");
|
||||
} // createRefreshButton
|
||||
|
||||
|
||||
/**
|
||||
* Create Reset Button wlth label text.
|
||||
* @param text text
|
||||
* @return button
|
||||
*/
|
||||
public static final WAppsAction createResetButton (String text) throws IOException
|
||||
{
|
||||
WAppsAction aa = new WAppsAction(A_RESET, null, text);
|
||||
|
||||
return aa;
|
||||
} // createResetButton
|
||||
|
||||
/**
|
||||
* Create Reset Button wlth Standard text.
|
||||
* @param withText with text
|
||||
* @return Button
|
||||
*/
|
||||
public static final WAppsAction createResetButton (boolean withText) throws IOException
|
||||
{
|
||||
if (withText)
|
||||
{
|
||||
return createResetButton(Msg.getMsg(Env.getCtx(), A_RESET));
|
||||
}
|
||||
return createResetButton(null);
|
||||
} // createRefreshButton
|
||||
|
||||
/**
|
||||
* Create Customize Button wlth label text.
|
||||
* @param text text
|
||||
* @return button
|
||||
*/
|
||||
public static final WAppsAction createCustomizeButton (String text) throws IOException
|
||||
{
|
||||
WAppsAction aa = new WAppsAction(A_CUSTOMIZE, null, text);
|
||||
|
||||
return aa;
|
||||
// Env.getImageIcon("Preference24.gif"));
|
||||
} // createCustomizeButton
|
||||
|
||||
/**
|
||||
* Create Customize Button wlth Standard text.
|
||||
* @param withText with text
|
||||
* @return aa
|
||||
*/
|
||||
public static final WAppsAction createCustomizeButton (boolean withText) throws IOException
|
||||
{
|
||||
if (withText)
|
||||
{
|
||||
return createCustomizeButton(Msg.getMsg(Env.getCtx(), A_CUSTOMIZE));
|
||||
}
|
||||
return createCustomizeButton(null);
|
||||
} // createCustomizeButton
|
||||
|
||||
|
||||
/**
|
||||
* Create History Button wlth label text.
|
||||
* @param text text
|
||||
* @return aa
|
||||
*/
|
||||
public static final WAppsAction createHistoryButton (String text) throws IOException
|
||||
{
|
||||
final String specialKey = "#f9";
|
||||
WAppsAction aa = new WAppsAction(A_HISTORY, specialKey, text);
|
||||
|
||||
return aa;
|
||||
} // createHistoryButton
|
||||
|
||||
/**
|
||||
* Create History Button wlth Standard text.
|
||||
* @param withText with text
|
||||
* @return aa
|
||||
*/
|
||||
public static final WAppsAction createHistoryButton (boolean withText) throws IOException
|
||||
{
|
||||
if (withText)
|
||||
{
|
||||
return createHistoryButton(Msg.getMsg(Env.getCtx(), A_HISTORY));
|
||||
}
|
||||
return createHistoryButton(null);
|
||||
} // createHistoryButton
|
||||
|
||||
|
||||
/**
|
||||
* Create Zoom Button wlth label text.
|
||||
* @param text text
|
||||
* @return aa
|
||||
*/
|
||||
public static final WAppsAction createZoomButton (String text) throws IOException
|
||||
{
|
||||
WAppsAction aa = new WAppsAction(A_ZOOM, null, text);
|
||||
|
||||
return aa;
|
||||
} // createZoomButton
|
||||
|
||||
/**
|
||||
* Create Zoom Button wlth Standard text.
|
||||
* @param withText with text
|
||||
* @return aa
|
||||
*/
|
||||
public static final WAppsAction createZoomButton (boolean withText) throws IOException
|
||||
{
|
||||
if (withText)
|
||||
{
|
||||
return createZoomButton(Msg.getMsg(Env.getCtx(), A_ZOOM));
|
||||
}
|
||||
return createZoomButton(null);
|
||||
} // createZoomButton
|
||||
|
||||
|
||||
/**
|
||||
* Create Process Button wlth label text Shift-F4.
|
||||
* @param text text
|
||||
* @return aa
|
||||
*/
|
||||
public static final WAppsAction createProcessButton (String text) throws IOException
|
||||
{
|
||||
// Shift-F4
|
||||
final String specialKey = "$#f4";
|
||||
WAppsAction aa = new WAppsAction(A_PROCESS, specialKey, text);
|
||||
|
||||
return aa;
|
||||
} // createProcessButton
|
||||
|
||||
/**
|
||||
* Create Process Button wlth Standard text.
|
||||
* @param withText with text
|
||||
* @return aa
|
||||
*/
|
||||
public static final WAppsAction createProcessButton (boolean withText) throws IOException
|
||||
{
|
||||
if (withText)
|
||||
{
|
||||
return createProcessButton(Msg.getMsg(Env.getCtx(), A_PROCESS));
|
||||
}
|
||||
return createProcessButton(null);
|
||||
} // createProcessButton
|
||||
|
||||
|
||||
/**
|
||||
* Create Print Button wlth label text.
|
||||
* @param text text
|
||||
* @return aa
|
||||
*/
|
||||
public static final WAppsAction createPrintButton (String text) throws IOException
|
||||
{
|
||||
final String specialKey = "#f12";
|
||||
WAppsAction aa = new WAppsAction(A_PRINT, specialKey, text);
|
||||
|
||||
return aa;
|
||||
} // createPrintButton
|
||||
|
||||
/**
|
||||
* Create Print Button wlth Standard text.
|
||||
* @param withText with text
|
||||
* @return aa
|
||||
*/
|
||||
public static final WAppsAction createPrintButton (boolean withText) throws IOException
|
||||
{
|
||||
if (withText)
|
||||
{
|
||||
return createPrintButton(Msg.getMsg(Env.getCtx(), A_PRINT));
|
||||
}
|
||||
return createPrintButton(null);
|
||||
} // createPrintButton
|
||||
|
||||
|
||||
/**
|
||||
* Create Help Button wlth label text.
|
||||
* @param text text
|
||||
* @return aa
|
||||
*/
|
||||
public static final WAppsAction createHelpButton (String text) throws IOException
|
||||
{
|
||||
final String specialKey = "#f1";
|
||||
WAppsAction aa = new WAppsAction(A_HELP, specialKey, text);
|
||||
|
||||
return aa;
|
||||
} // createHelpButton
|
||||
|
||||
/**
|
||||
* Create Help Button wlth Standard text.
|
||||
* @param withText with text
|
||||
* @return aa
|
||||
*/
|
||||
public static final WAppsAction createHelpButton (boolean withText) throws IOException
|
||||
{
|
||||
if (withText)
|
||||
{
|
||||
return createHelpButton(Msg.getMsg(Env.getCtx(), A_HELP));
|
||||
}
|
||||
return createHelpButton(null);
|
||||
} // createHelpButton
|
||||
|
||||
|
||||
/**
|
||||
* Create Export Button wlth label text.
|
||||
* @param text text
|
||||
* @return aa
|
||||
*/
|
||||
public static final WAppsAction createExportButton (String text) throws IOException
|
||||
{
|
||||
WAppsAction aa = new WAppsAction(A_EXPORT, null, text);
|
||||
|
||||
return aa;
|
||||
} // createExportButton
|
||||
|
||||
/**
|
||||
* Create Export Button wlth Standard text.
|
||||
* @param withText with text
|
||||
* @return aa
|
||||
*/
|
||||
public static final WAppsAction createExportButton (boolean withText) throws IOException
|
||||
{
|
||||
if (withText)
|
||||
{
|
||||
return createExportButton(Msg.getMsg(Env.getCtx(), A_EXPORT));
|
||||
}
|
||||
return createExportButton(null);
|
||||
} // createExportButton
|
||||
|
||||
|
||||
/************************
|
||||
* Create Delete Button with label text - F3.
|
||||
* @param text text
|
||||
* @return Delete Button
|
||||
*/
|
||||
public static final WAppsAction createDeleteButton (String text) throws IOException
|
||||
{
|
||||
final String specialKey = "#f3";
|
||||
WAppsAction aa = new WAppsAction(A_DELETE, specialKey, text);
|
||||
|
||||
return aa;
|
||||
} // createDeleteButton
|
||||
|
||||
/**
|
||||
* Create Delete Button with Standard text.
|
||||
* @param withText with text
|
||||
* @return Delete Button
|
||||
*/
|
||||
public static final WAppsAction createDeleteButton (boolean withText) throws IOException
|
||||
{
|
||||
if (withText)
|
||||
{
|
||||
return createDeleteButton(Msg.getMsg(Env.getCtx(), A_DELETE));
|
||||
}
|
||||
return createDeleteButton(null);
|
||||
} // createDeleteButton
|
||||
|
||||
|
||||
/************************
|
||||
* Create Product Attribute Button with Standard text.
|
||||
* @param withText with text
|
||||
* @return Product Attribute Button
|
||||
*/
|
||||
public static final WAppsAction createPAttributeButton (boolean withText) throws IOException
|
||||
{
|
||||
if (withText)
|
||||
{
|
||||
return createPAttributeButton(Msg.getMsg(Env.getCtx(), A_PATTRIBUTE));
|
||||
}
|
||||
return createPAttributeButton(null);
|
||||
} // createPAttributeButton
|
||||
|
||||
/**
|
||||
* Create Product Attribute Button with label text.
|
||||
* @param text text
|
||||
* @return Product Attribute Button
|
||||
*/
|
||||
public static final WAppsAction createPAttributeButton (String text) throws IOException
|
||||
{
|
||||
WAppsAction aa = new WAppsAction(A_PATTRIBUTE, null, text);
|
||||
|
||||
return aa;
|
||||
} // createPAttributeButton
|
||||
|
||||
|
||||
/**
|
||||
* Create New Button with Standard text.
|
||||
* @param withText with text
|
||||
* @return New Button
|
||||
*/
|
||||
public static final WAppsAction createNewButton (boolean withText) throws IOException
|
||||
{
|
||||
if (withText)
|
||||
{
|
||||
return createNewButton(Msg.getMsg(Env.getCtx(), A_NEW));
|
||||
}
|
||||
return createNewButton(null);
|
||||
} // createNewButton
|
||||
|
||||
/**
|
||||
* Create New Button with label text - F2.
|
||||
* @param text text
|
||||
* @return Product Attribute Button
|
||||
*/
|
||||
public static final WAppsAction createNewButton (String text) throws IOException
|
||||
{
|
||||
final String specialKey = "#f2";
|
||||
WAppsAction aa = new WAppsAction(A_NEW, specialKey, text);
|
||||
|
||||
return aa;
|
||||
} // createNewButton
|
||||
|
||||
/**
|
||||
* Show Cancel button.
|
||||
* @param value trie for visible
|
||||
*/
|
||||
public void setCancelVisible (Button button, boolean value)
|
||||
{
|
||||
button.setVisible(value);
|
||||
button.setEnabled(value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Add Event Listener.
|
||||
* <code>
|
||||
* if (e.getActionCommand().equals(ConfirmPanel.A_OK))
|
||||
* </code>
|
||||
* In order to respond to keystrokes, the <code>EventListener</code>
|
||||
* should be a <code>Window</code>. If the listener is not a window
|
||||
* the panel will only respond to <code>onClick</code> events.
|
||||
*
|
||||
* @param listener the event listener
|
||||
*/
|
||||
public void addEventListener(EventListener listener)
|
||||
{
|
||||
String ctrlKeys = "";
|
||||
try
|
||||
{
|
||||
m_actionOk.setDelegate(listener);
|
||||
ctrlKeys += m_actionOk.getCtrlKeys();
|
||||
m_actionCancel.setDelegate(listener);
|
||||
ctrlKeys += m_actionCancel.getCtrlKeys();
|
||||
//
|
||||
if (m_actionRefresh != null)
|
||||
{
|
||||
m_actionRefresh.setDelegate(listener);
|
||||
ctrlKeys += m_actionRefresh.getCtrlKeys();
|
||||
}
|
||||
if (m_actionReset != null)
|
||||
{
|
||||
m_actionReset.setDelegate(listener);
|
||||
ctrlKeys += m_actionReset.getCtrlKeys();
|
||||
}
|
||||
if (m_actionCustomize != null)
|
||||
{
|
||||
m_actionCustomize.setDelegate(listener);
|
||||
ctrlKeys += m_actionCustomize.getCtrlKeys();
|
||||
}
|
||||
if (m_actionHistory != null)
|
||||
{
|
||||
m_actionHistory.setDelegate(listener);
|
||||
ctrlKeys += m_actionHistory.getCtrlKeys();
|
||||
}
|
||||
if (m_actionZoom != null)
|
||||
{
|
||||
m_actionZoom.setDelegate(listener);
|
||||
ctrlKeys += m_actionZoom.getCtrlKeys();
|
||||
}
|
||||
}
|
||||
catch (IllegalArgumentException exception)
|
||||
{
|
||||
log.warning(exception.getMessage());
|
||||
}
|
||||
|
||||
// Set OK as default Button
|
||||
// and Cancel as cancel button
|
||||
if (listener instanceof Window)
|
||||
{
|
||||
((Window) listener).addEventListener(Events.ON_CANCEL, m_actionCancel);
|
||||
((Window) listener).addEventListener(Events.ON_OK, m_actionOk);
|
||||
// TODO enable Ctrl Keys
|
||||
//((Window) listener).setCtrlKeys(ctrlKeys);
|
||||
//((Window) listener).addEventListener(Events.ON_CTRL_KEY, this);
|
||||
}
|
||||
else
|
||||
{
|
||||
log.warning("Functionality of the Confirmation Panel has been restricted. "
|
||||
+ " as a result of the specified listener not being a Window. "
|
||||
+ "Consequently, it is unable to respond to keystrokes");
|
||||
}
|
||||
} // addActionListener
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.zkoss.zk.ui.event.EventListener#onEvent(org.zkoss.zk.ui.event.Event)
|
||||
*/
|
||||
public void onEvent(Event event) throws Exception
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
|
@ -130,7 +130,6 @@ public class WStatusBar extends Grid implements EventListener
|
|||
*/ }
|
||||
statusLine.setValue(mt_text);
|
||||
//
|
||||
Thread.yield();
|
||||
} // setStatusLine
|
||||
|
||||
/**
|
||||
|
|
|
@ -48,7 +48,7 @@ public class WAccountEditor extends WEditor
|
|||
public WAccountEditor(GridField gridField)
|
||||
{
|
||||
super(new Combinationbox(), gridField);
|
||||
getComponent().setButtonImage("/images/Account16.gif");
|
||||
getComponent().setButtonImage("/images/Account16.png");
|
||||
|
||||
m_mAccount = new MAccountLookup (gridField.getVO().ctx, gridField.getWindowNo());
|
||||
}
|
||||
|
|
|
@ -38,7 +38,7 @@ public class WAssignmentEditor extends WEditor {
|
|||
|
||||
private void initComponents() {
|
||||
getComponent().getTextBox().setReadonly(true);
|
||||
getComponent().setButtonImage("images/Assignment10.gif");
|
||||
getComponent().setButtonImage("images/Assignment10.png");
|
||||
getComponent().addEventListener(Events.ON_CLICK, this);
|
||||
}
|
||||
|
||||
|
|
|
@ -107,28 +107,28 @@ public class WButtonEditor extends WEditor
|
|||
{
|
||||
readReference(195);
|
||||
// this.setForeground(Color.blue);
|
||||
getComponent().setImage("/images/Payment16.gif"); // 29*14
|
||||
getComponent().setImage("/images/Payment16.png"); // 29*14
|
||||
}
|
||||
else if (columnName.equals("DocAction"))
|
||||
{
|
||||
readReference(135);
|
||||
// this.setForeground(Color.blue);
|
||||
getComponent().setImage("/images/Process16.gif"); // 16*16
|
||||
getComponent().setImage("/images/Process16.png"); // 16*16
|
||||
}
|
||||
else if (columnName.equals("CreateFrom"))
|
||||
{
|
||||
getComponent().setImage("/images/Copy16.gif"); // 16*16
|
||||
getComponent().setImage("/images/Copy16.png"); // 16*16
|
||||
}
|
||||
else if (columnName.equals("Record_ID"))
|
||||
{
|
||||
getComponent().setImage("/images/Zoom16.gif"); // 16*16
|
||||
getComponent().setImage("/images/Zoom16.png"); // 16*16
|
||||
getComponent().setLabel(Msg.getMsg(Env.getCtx(), "ZoomDocument"));
|
||||
}
|
||||
else if (columnName.equals("Posted"))
|
||||
{
|
||||
readReference(234);
|
||||
// this.setForeground(Color.magenta);
|
||||
getComponent().setImage("/images/InfoAccount16.gif"); // 16*16
|
||||
getComponent().setImage("/images/InfoAccount16.png"); // 16*16
|
||||
}
|
||||
|
||||
if (gridField.getColumnName().endsWith("_ID") && !gridField.getColumnName().equals("Record_ID"))
|
||||
|
|
|
@ -65,6 +65,11 @@ public abstract class WEditor implements EventListener, PropertyChangeListener
|
|||
|
||||
private String columnName;
|
||||
|
||||
/**
|
||||
*
|
||||
* @param comp
|
||||
* @param gridField
|
||||
*/
|
||||
public WEditor(Component comp, GridField gridField)
|
||||
{
|
||||
if (comp == null)
|
||||
|
@ -246,16 +251,26 @@ public abstract class WEditor implements EventListener, PropertyChangeListener
|
|||
return component;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param gridTab
|
||||
*/
|
||||
public void setGridTab(GridTab gridTab)
|
||||
{
|
||||
this.gridTab = gridTab;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return popup menu instance ( if available )
|
||||
*/
|
||||
public WEditorPopupMenu getPopupMenu()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param evt
|
||||
*/
|
||||
public void propertyChange(PropertyChangeEvent evt)
|
||||
{
|
||||
if (evt.getPropertyName().equals(org.compiere.model.GridField.PROPERTY))
|
||||
|
@ -264,16 +279,19 @@ public abstract class WEditor implements EventListener, PropertyChangeListener
|
|||
}
|
||||
}
|
||||
|
||||
public void addValueChangeListner(ValueChangeListener listener)
|
||||
/**
|
||||
* @param listener
|
||||
*/
|
||||
public void addValueChangeListener(ValueChangeListener listener)
|
||||
{
|
||||
if (listener == null)
|
||||
if (listener == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
listeners.add(listener);
|
||||
}
|
||||
|
||||
|
||||
protected void fireValueChange(ValueChangeEvent event)
|
||||
{
|
||||
for (ValueChangeListener listener : listeners)
|
||||
|
@ -282,21 +300,41 @@ public abstract class WEditor implements EventListener, PropertyChangeListener
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return Label
|
||||
*/
|
||||
public Label getLabel()
|
||||
{
|
||||
return label;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param readWrite
|
||||
*/
|
||||
public abstract void setReadWrite(boolean readWrite);
|
||||
|
||||
/**
|
||||
*
|
||||
* @return editable
|
||||
*/
|
||||
public abstract boolean isReadWrite();
|
||||
|
||||
/**
|
||||
*
|
||||
* @param visible
|
||||
*/
|
||||
public void setVisible(boolean visible)
|
||||
{
|
||||
label.setVisible(visible);
|
||||
component.setVisible(visible);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return is visible
|
||||
*/
|
||||
public boolean isVisible()
|
||||
{
|
||||
return component.isVisible();
|
||||
|
@ -322,12 +360,28 @@ public abstract class WEditor implements EventListener, PropertyChangeListener
|
|||
return sb.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param value
|
||||
*/
|
||||
abstract public void setValue(Object value);
|
||||
|
||||
/**
|
||||
*
|
||||
* @return Object
|
||||
*/
|
||||
abstract public Object getValue();
|
||||
|
||||
/**
|
||||
*
|
||||
* @return display text
|
||||
*/
|
||||
abstract public String getDisplay();
|
||||
|
||||
/**
|
||||
*
|
||||
* @return list of events
|
||||
*/
|
||||
public String[] getEvents()
|
||||
{
|
||||
return WEditor.lISTENER_EVENTS;
|
||||
|
@ -344,6 +398,10 @@ public abstract class WEditor implements EventListener, PropertyChangeListener
|
|||
label.setMandatory(mandatory);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public boolean isMandatory()
|
||||
{
|
||||
return this.mandatory;
|
||||
|
|
|
@ -86,7 +86,7 @@ public class WEditorPopupMenu extends Menupopup implements EventListener
|
|||
zoomItem = new Menuitem();
|
||||
zoomItem.setAttribute(EVENT_ATTRIBUTE, ZOOM_EVENT);
|
||||
zoomItem.setLabel("Zoom");
|
||||
zoomItem.setImage("/images/Zoom16.gif");
|
||||
zoomItem.setImage("/images/Zoom16.png");
|
||||
zoomItem.addEventListener(Events.ON_CLICK, this);
|
||||
|
||||
this.appendChild(zoomItem);
|
||||
|
@ -97,7 +97,7 @@ public class WEditorPopupMenu extends Menupopup implements EventListener
|
|||
requeryItem = new Menuitem();
|
||||
requeryItem.setAttribute(EVENT_ATTRIBUTE, REQUERY_EVENT);
|
||||
requeryItem.setLabel("ReQuery");
|
||||
requeryItem.setImage("/images/Refresh16.gif");
|
||||
requeryItem.setImage("/images/Refresh16.png");
|
||||
requeryItem.addEventListener(Events.ON_CLICK, this);
|
||||
this.appendChild(requeryItem);
|
||||
}
|
||||
|
@ -107,7 +107,7 @@ public class WEditorPopupMenu extends Menupopup implements EventListener
|
|||
prefItem = new Menuitem();
|
||||
prefItem.setAttribute(EVENT_ATTRIBUTE, PREFERENCE_EVENT);
|
||||
prefItem.setLabel("Value Preference");
|
||||
prefItem.setImage("/images/VPreference16.gif");
|
||||
prefItem.setImage("/images/VPreference16.png");
|
||||
prefItem.addEventListener(Events.ON_CLICK, this);
|
||||
this.appendChild(prefItem);
|
||||
}
|
||||
|
@ -117,7 +117,7 @@ public class WEditorPopupMenu extends Menupopup implements EventListener
|
|||
newItem = new Menuitem();
|
||||
newItem.setAttribute(EVENT_ATTRIBUTE, NEW_EVENT);
|
||||
newItem.setLabel("New Record");
|
||||
newItem.setImage("/images/New16.gif");
|
||||
newItem.setImage("/images/New16.png");
|
||||
newItem.addEventListener(Events.ON_CLICK, this);
|
||||
this.appendChild(newItem);
|
||||
}
|
||||
|
|
|
@ -42,7 +42,7 @@ public class WFilenameEditor extends WEditor
|
|||
public WFilenameEditor(GridField gridField)
|
||||
{
|
||||
super(new FilenameBox(), gridField);
|
||||
getComponent().setButtonImage("/images/Open16.gif");
|
||||
getComponent().setButtonImage("/images/Open16.png");
|
||||
getComponent().addEventListener(Events.ON_CLICK, this);
|
||||
}
|
||||
|
||||
|
|
|
@ -63,7 +63,7 @@ public class WLocationEditor extends WEditor implements EventListener, PropertyC
|
|||
|
||||
m_columnName = columnName;
|
||||
m_Location = mLocation;
|
||||
getComponent().setButtonImage("/images/Location10.gif");
|
||||
getComponent().setButtonImage("/images/Location10.png");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -84,7 +84,7 @@ public class WLocatorEditor extends WEditor implements EventListener, PropertyCh
|
|||
|
||||
m_columnName = columnName;
|
||||
m_mLocator = mLocator;
|
||||
getComponent().setButtonImage("/images/Locator10.gif");
|
||||
getComponent().setButtonImage("/images/Locator10.png");
|
||||
|
||||
setDefault_Locator_ID(); // set default locator, teo_sarca [ 1661546 ]
|
||||
|
||||
|
|
|
@ -65,7 +65,7 @@ public class WPAttributeEditor extends WEditor implements ContextMenuListener
|
|||
}
|
||||
|
||||
private void initComponents() {
|
||||
getComponent().setButtonImage("images/PAttribute10.gif");
|
||||
getComponent().setButtonImage("images/PAttribute10.png");
|
||||
getComponent().addEventListener(Events.ON_CLICK, this);
|
||||
|
||||
m_WindowNo = gridField.getWindowNo();
|
||||
|
|
|
@ -151,15 +151,15 @@ public class WSearchEditor extends WEditor implements ContextMenuListener, Value
|
|||
|
||||
if (columnName.equals("C_BPartner_ID"))
|
||||
{
|
||||
getComponent().setButtonImage("/images/BPartner10.gif");
|
||||
getComponent().setButtonImage("/images/BPartner10.png");
|
||||
}
|
||||
else if (columnName.equals("M_Product_ID"))
|
||||
{
|
||||
getComponent().setButtonImage("/images/Product10.gif");
|
||||
getComponent().setButtonImage("/images/Product10.png");
|
||||
}
|
||||
else
|
||||
{
|
||||
getComponent().setButtonImage("/images/PickOpen10.gif");
|
||||
getComponent().setButtonImage("/images/PickOpen10.png");
|
||||
}
|
||||
|
||||
return;
|
||||
|
|
|
@ -34,7 +34,7 @@ public class WUrlEditor extends WEditor
|
|||
public WUrlEditor(GridField gridField)
|
||||
{
|
||||
super(new Urlbox(), gridField);
|
||||
getComponent().setButtonImage("/images/Online16.gif");
|
||||
getComponent().setButtonImage("/images/Online16.png");
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -204,7 +204,7 @@ public class WBPartner extends Window implements EventListener, ValueChangeListe
|
|||
|
||||
fAddress = new WLocationEditor("C_Location_ID", false, ro, true,
|
||||
new MLocationLookup (Env.getCtx(), m_WindowNo));
|
||||
fAddress.addValueChangeListner(this);
|
||||
fAddress.addValueChangeListener(this);
|
||||
fAddress.setValue (null);
|
||||
createLine (fAddress.getComponent(), "C_Location_ID", true)/*.setFontBold(true)*/;
|
||||
|
||||
|
|
|
@ -52,7 +52,7 @@ public abstract class ADForm extends Window implements EventListener
|
|||
/** The unique identifier of the form type */
|
||||
private int m_adFormId;
|
||||
/** The identifying number of the window in which the form is housed */
|
||||
protected int m_windowNo;
|
||||
protected int m_WindowNo;
|
||||
|
||||
|
||||
private String m_name;
|
||||
|
@ -65,7 +65,7 @@ public abstract class ADForm extends Window implements EventListener
|
|||
*/
|
||||
protected ADForm()
|
||||
{
|
||||
m_windowNo = SessionManager.getAppDesktop().registerWindow(this);
|
||||
m_WindowNo = SessionManager.getAppDesktop().registerWindow(this);
|
||||
|
||||
this.setWidth("100%");
|
||||
this.setHeight("95%");
|
||||
|
@ -75,7 +75,7 @@ public abstract class ADForm extends Window implements EventListener
|
|||
|
||||
protected int getWindowNo()
|
||||
{
|
||||
return m_windowNo;
|
||||
return m_WindowNo;
|
||||
}
|
||||
|
||||
protected int getAdFormId()
|
||||
|
@ -102,10 +102,12 @@ public abstract class ADForm extends Window implements EventListener
|
|||
setTitle(name);
|
||||
m_name = name;
|
||||
|
||||
return;
|
||||
initForm();
|
||||
}
|
||||
|
||||
/**
|
||||
abstract protected void initForm();
|
||||
|
||||
/**
|
||||
* @return form name
|
||||
*/
|
||||
public String getFormName() {
|
||||
|
|
|
@ -273,10 +273,10 @@ public class ADSortTab extends Panel implements IADTabpanel
|
|||
yesList.setSeltype("multiple");
|
||||
noList.setSeltype("multiple");
|
||||
|
||||
bAdd.setImage("images/Detail24.gif");
|
||||
bAdd.setImage("images/Detail24.png");
|
||||
bAdd.addEventListener(Events.ON_CLICK, actionListener);
|
||||
|
||||
bRemove.setImage("images/Parent24.gif");
|
||||
bRemove.setImage("images/Parent24.png");
|
||||
bRemove.addEventListener(Events.ON_CLICK, actionListener);
|
||||
|
||||
EventListener crossListMouseListener = new DragListener();
|
||||
|
@ -292,10 +292,10 @@ public class ADSortTab extends Panel implements IADTabpanel
|
|||
}
|
||||
};
|
||||
|
||||
bUp.setImage("images/Previous24.gif");
|
||||
bUp.setImage("images/Previous24.png");
|
||||
bUp.addEventListener(Events.ON_CLICK, actionListener);
|
||||
|
||||
bDown.setImage("images/Next24.gif");
|
||||
bDown.setImage("images/Next24.png");
|
||||
bDown.addEventListener(Events.ON_CLICK, actionListener);
|
||||
|
||||
EventListener yesListMouseMotionListener = new EventListener()
|
||||
|
|
|
@ -279,7 +279,7 @@ DataStatusListener, ValueChangeListener, IADTabpanel
|
|||
else
|
||||
{
|
||||
ToolBar toolbar = new ToolBar();
|
||||
Toolbarbutton button = new Toolbarbutton(fieldGroup, "images/ns-collapse.gif");
|
||||
Toolbarbutton button = new Toolbarbutton(fieldGroup, "images/ns-collapse.png");
|
||||
button.addEventListener(Events.ON_CLICK, this);
|
||||
button.setParent(toolbar);
|
||||
row.appendChild(toolbar);
|
||||
|
@ -351,7 +351,7 @@ DataStatusListener, ValueChangeListener, IADTabpanel
|
|||
}
|
||||
else
|
||||
{
|
||||
editor.addValueChangeListner(this);
|
||||
editor.addValueChangeListener(this);
|
||||
}
|
||||
|
||||
if (editor.getComponent() instanceof HtmlBasedComponent) {
|
||||
|
@ -638,12 +638,12 @@ DataStatusListener, ValueChangeListener, IADTabpanel
|
|||
for (Row row : list) {
|
||||
row.setVisible(false);
|
||||
}
|
||||
button.setImage("images/ns-expand.gif");
|
||||
button.setImage("images/ns-expand.png");
|
||||
} else {
|
||||
for (Row row : list) {
|
||||
row.setVisible(true);
|
||||
}
|
||||
button.setImage("images/ns-collapse.gif");
|
||||
button.setImage("images/ns-collapse.png");
|
||||
}
|
||||
} else if (event.getTarget() instanceof Listbox)
|
||||
{
|
||||
|
|
|
@ -150,7 +150,7 @@ public class InfoAssetPanel extends InfoPanel implements ValueChangeListener, Ev
|
|||
fBPartner_ID = new WSearchEditor(
|
||||
MLookupFactory.get (Env.getCtx(), p_WindowNo, 0, 8065, DisplayType.Search),
|
||||
Msg.translate(Env.getCtx(), "C_BPartner_ID"), "", false, false, true);
|
||||
fBPartner_ID.addValueChangeListner(this);
|
||||
fBPartner_ID.addValueChangeListener(this);
|
||||
|
||||
boxBPartner.setWidth("100%");
|
||||
boxBPartner.setWidths("40%, ");
|
||||
|
@ -164,7 +164,7 @@ public class InfoAssetPanel extends InfoPanel implements ValueChangeListener, Ev
|
|||
fProduct_ID = new WSearchEditor(
|
||||
MLookupFactory.get (Env.getCtx(), p_WindowNo, 0, 8047, DisplayType.Search),
|
||||
Msg.translate(Env.getCtx(), "M_Product_ID"), "", false, false, true);
|
||||
fProduct_ID.addValueChangeListner(this);
|
||||
fProduct_ID.addValueChangeListener(this);
|
||||
|
||||
boxProduct.appendChild(fProduct_ID.getLabel());
|
||||
boxProduct.appendChild(fProduct_ID.getComponent());
|
||||
|
|
|
@ -150,7 +150,7 @@ public class InfoAssignmentPanel extends InfoPanel implements EventListener, Val
|
|||
return false;
|
||||
}
|
||||
|
||||
bNew.setImage("/images/New16.gif");
|
||||
bNew.setImage("/images/New16.png");
|
||||
|
||||
return true;
|
||||
} // initLookups
|
||||
|
|
|
@ -187,7 +187,7 @@ public class InfoCashLinePanel extends InfoPanel implements ValueChangeListener,
|
|||
fCashBook_ID = new WSearchEditor(
|
||||
MLookupFactory.get (Env.getCtx(), p_WindowNo, 0, 5249, DisplayType.TableDir),
|
||||
Msg.translate(Env.getCtx(), "C_CashBook_ID"), "", false, false, true);
|
||||
fCashBook_ID.addValueChangeListner(this);
|
||||
fCashBook_ID.addValueChangeListener(this);
|
||||
|
||||
boxCashBook.appendChild(fCashBook_ID.getLabel());
|
||||
boxCashBook.appendChild(fCashBook_ID.getComponent());
|
||||
|
@ -198,7 +198,7 @@ public class InfoCashLinePanel extends InfoPanel implements ValueChangeListener,
|
|||
fInvoice_ID = new WSearchEditor(
|
||||
MLookupFactory.get (Env.getCtx(), p_WindowNo, 0, 5354, DisplayType.Search),
|
||||
Msg.translate(Env.getCtx(), "C_Invoice_ID"), "", false, false, true);
|
||||
fInvoice_ID.addValueChangeListner(this);
|
||||
fInvoice_ID.addValueChangeListener(this);
|
||||
|
||||
boxInvoice.appendChild(fInvoice_ID.getLabel());
|
||||
boxInvoice.appendChild(fInvoice_ID.getComponent());
|
||||
|
@ -209,7 +209,7 @@ public class InfoCashLinePanel extends InfoPanel implements ValueChangeListener,
|
|||
fBankAccount_ID = new WSearchEditor(
|
||||
MLookupFactory.get (Env.getCtx(), p_WindowNo, 0, 5295, DisplayType.TableDir),
|
||||
Msg.translate(Env.getCtx(), "C_BankAccount_ID"), "", false, false, true);
|
||||
fBankAccount_ID.addValueChangeListner(this);
|
||||
fBankAccount_ID.addValueChangeListener(this);
|
||||
|
||||
boxBankAcct.appendChild(fBankAccount_ID.getLabel());
|
||||
boxBankAcct.appendChild(fBankAccount_ID.getComponent());
|
||||
|
|
|
@ -189,7 +189,7 @@ public class InfoInOutPanel extends InfoPanel implements ValueChangeListener, Ev
|
|||
fBPartner_ID = new WSearchEditor(
|
||||
MLookupFactory.get (Env.getCtx(), p_WindowNo, 0, 3499, DisplayType.Search),
|
||||
Msg.translate(Env.getCtx(), "BPartner"), "", false, false, true);
|
||||
fBPartner_ID.addValueChangeListner(this);
|
||||
fBPartner_ID.addValueChangeListener(this);
|
||||
|
||||
boxBPartner.appendChild(fBPartner_ID.getLabel());
|
||||
boxBPartner.appendChild(fBPartner_ID.getComponent());
|
||||
|
|
|
@ -165,13 +165,13 @@ public class InfoInvoicePanel extends InfoPanel implements ValueChangeListener
|
|||
0, 3499, DisplayType.Search);
|
||||
editorBPartner = new WSearchEditor(lookupBP, Msg.translate(
|
||||
Env.getCtx(), "C_BPartner_ID"), "", false, false, true);
|
||||
editorBPartner.addValueChangeListner(this);
|
||||
editorBPartner.addValueChangeListener(this);
|
||||
|
||||
MLookup lookupOrder = MLookupFactory.get(Env.getCtx(), p_WindowNo,
|
||||
0, 4247, DisplayType.Search);
|
||||
editorOrder = new WSearchEditor(lookupOrder, Msg.translate(
|
||||
Env.getCtx(), "C_Order_ID"), "", false, false, true);
|
||||
editorOrder.addValueChangeListner(this);
|
||||
editorOrder.addValueChangeListener(this);
|
||||
|
||||
contentPanel = new WListbox();
|
||||
contentPanel.setWidth("99%");
|
||||
|
|
|
@ -150,7 +150,7 @@ public class InfoOrderPanel extends InfoPanel implements ValueChangeListener
|
|||
0, 3499, DisplayType.Search);
|
||||
editorBPartner = new WSearchEditor(lookupBP, Msg.translate(
|
||||
Env.getCtx(), "C_BPartner_ID"), "", true, false, true);
|
||||
editorBPartner.addValueChangeListner(this);
|
||||
editorBPartner.addValueChangeListener(this);
|
||||
contentPanel = new WListbox();
|
||||
contentPanel.setWidth("99%");
|
||||
contentPanel.setHeight("400px");
|
||||
|
|
|
@ -185,7 +185,7 @@ public class InfoPaymentPanel extends InfoPanel implements ValueChangeListener,
|
|||
fBPartner_ID = new WSearchEditor(
|
||||
MLookupFactory.get(Env.getCtx(), p_WindowNo, 0, 3499, DisplayType.Search),
|
||||
Msg.translate(Env.getCtx(), "C_BPartner_ID"), "", false, false, true);
|
||||
fBPartner_ID.addValueChangeListner(this);
|
||||
fBPartner_ID.addValueChangeListener(this);
|
||||
|
||||
boxBPartner.appendChild(fBPartner_ID.getLabel());
|
||||
boxBPartner.appendChild(fBPartner_ID.getComponent());
|
||||
|
|
|
@ -172,7 +172,7 @@ public final class InfoProductPanel extends InfoPanel implements EventListener
|
|||
lblVendor.setValue(Msg.translate(Env.getCtx(), "Vendor"));
|
||||
|
||||
/* p_attributeInfo = new Button();
|
||||
p_attributeInfo.setImage("/images/PAttribute16.gif");
|
||||
p_attributeInfo.setImage("/images/PAttribute16.png");
|
||||
p_attributeInfo.setTooltiptext("Poduct Atribute Info");
|
||||
p_attributeInfo.addEventListener(Events.ON_CLICK,this);*/
|
||||
|
||||
|
|
|
@ -18,13 +18,14 @@
|
|||
package org.adempiere.webui.panel;
|
||||
|
||||
import java.util.Properties;
|
||||
import java.util.ResourceBundle;
|
||||
|
||||
import org.adempiere.webui.component.Grid;
|
||||
import org.adempiere.webui.component.Label;
|
||||
import org.adempiere.webui.component.Row;
|
||||
import org.adempiere.webui.component.Rows;
|
||||
import org.adempiere.webui.component.Textbox;
|
||||
import org.adempiere.webui.component.WConfirmPanel;
|
||||
import org.adempiere.webui.component.ConfirmPanel;
|
||||
import org.adempiere.webui.component.Window;
|
||||
import org.adempiere.webui.window.LoginWindow;
|
||||
import org.compiere.util.Env;
|
||||
|
@ -52,6 +53,9 @@ import org.zkoss.zul.Listbox;
|
|||
public class LoginPanel extends Window implements EventListener
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private static final String RESOURCE = "org.compiere.apps.ALoginRes";
|
||||
private ResourceBundle res = ResourceBundle.getBundle(RESOURCE);
|
||||
|
||||
private Properties ctx;
|
||||
private Label lblUserId;
|
||||
|
@ -79,14 +83,13 @@ public class LoginPanel extends Window implements EventListener
|
|||
private void init()
|
||||
{
|
||||
Grid grid = new Grid();
|
||||
//grid.setSclass("grid-no-striped");
|
||||
grid.setOddRowSclass("even");
|
||||
grid.setId("grdLogin");
|
||||
Rows rows = new Rows();
|
||||
Row logo = new Row();
|
||||
logo.setSpans("2");
|
||||
Image image = new Image();
|
||||
image.setSrc("images/Logo.gif");
|
||||
image.setSrc("images/logo.png");
|
||||
logo.appendChild(image);
|
||||
Row rowUser = new Row();
|
||||
rowUser.setId("rowUser");
|
||||
|
@ -95,24 +98,19 @@ public class LoginPanel extends Window implements EventListener
|
|||
Row rowLanguage = new Row();
|
||||
rowLanguage.setId("rowLanguage");
|
||||
|
||||
rowUser.appendChild(lblUserId);
|
||||
rowUser.appendChild(this.txtUserId);
|
||||
rowUser.appendChild(lblUserId.rightAlign());
|
||||
rowUser.appendChild(txtUserId);
|
||||
|
||||
rowPassword.appendChild(lblPassword);
|
||||
rowPassword.appendChild(lblPassword.rightAlign());
|
||||
rowPassword.appendChild(txtPassword);
|
||||
|
||||
rowLanguage.appendChild(lblLanguage);
|
||||
rowLanguage.appendChild(lblLanguage.rightAlign());
|
||||
rowLanguage.appendChild(lstLanguage);
|
||||
|
||||
Row rowButtons = new Row();
|
||||
//rowButtons.setAlign("right");
|
||||
//Label lblButtons = new Label();
|
||||
rowButtons.setSpans("2");
|
||||
//rowButtons.appendChild(lblButtons);
|
||||
WConfirmPanel pnlButtons = new WConfirmPanel(false);
|
||||
pnlButtons.addEventListener(this);
|
||||
//pnlButtons.appendChild(btnOk);
|
||||
//pnlButtons.appendChild(btnCancel);
|
||||
ConfirmPanel pnlButtons = new ConfirmPanel(false);
|
||||
pnlButtons.addActionListener(this);
|
||||
rowButtons.appendChild(pnlButtons);
|
||||
|
||||
rows.appendChild(logo);
|
||||
|
@ -128,21 +126,22 @@ public class LoginPanel extends Window implements EventListener
|
|||
{
|
||||
lblUserId = new Label();
|
||||
lblUserId.setId("lblUserId");
|
||||
lblUserId.setValue("User ID: ");
|
||||
lblUserId.setValue("User ID");
|
||||
|
||||
lblPassword = new Label();
|
||||
lblPassword.setId("lblPassword");
|
||||
lblPassword.setValue("Password: ");
|
||||
lblPassword.setValue("Password");
|
||||
|
||||
lblLanguage = new Label();
|
||||
lblLanguage.setId("lblLanguage");
|
||||
lblLanguage.setValue("Language: ");
|
||||
lblLanguage.setValue("Language");
|
||||
|
||||
txtUserId = new Textbox();
|
||||
txtUserId.setId("txtUserId");
|
||||
txtUserId.setConstraint("no empty");
|
||||
txtUserId.setCols(25);
|
||||
txtUserId.setMaxlength(40);
|
||||
txtUserId.setWidth("220px");
|
||||
|
||||
txtPassword = new Textbox();
|
||||
txtPassword.setId("txtPassword");
|
||||
|
@ -150,13 +149,14 @@ public class LoginPanel extends Window implements EventListener
|
|||
txtPassword.setType("password");
|
||||
txtPassword.setCols(25);
|
||||
txtPassword.setMaxlength(40);
|
||||
txtPassword.setWidth("220px");
|
||||
|
||||
lstLanguage = new Listbox();
|
||||
lstLanguage.setId("lstLanguage");
|
||||
lstLanguage.setRows(1);
|
||||
lstLanguage.setMold("select");
|
||||
lstLanguage.addEventListener(Events.ON_SELECT, this);
|
||||
lstLanguage.setWidth("180px");
|
||||
lstLanguage.setWidth("220px");
|
||||
|
||||
// Update Language List
|
||||
lstLanguage.getItems().clear();
|
||||
|
@ -165,23 +165,13 @@ public class LoginPanel extends Window implements EventListener
|
|||
Language language = Language.getLanguage(langName);
|
||||
lstLanguage.appendItem(langName, language.getAD_Language());
|
||||
}
|
||||
|
||||
/* btnOk = new Button();
|
||||
btnOk.setName("btnOk");
|
||||
btnOk.setLabel("Ok");
|
||||
btnOk.addEventListener(EventConstants.ONCLICK, this);
|
||||
|
||||
btnCancel = new Button();
|
||||
btnCancel.setName("btnCancel");
|
||||
btnCancel.setLabel("Cancel");
|
||||
btnCancel.addEventListener(EventConstants.ONCLICK, this);*/
|
||||
}
|
||||
|
||||
public void onEvent(Event event)
|
||||
{
|
||||
Component eventComp = event.getTarget();
|
||||
|
||||
if (event.getName().equals(WConfirmPanel.A_OK))
|
||||
if (event.getTarget().getId().equals(ConfirmPanel.A_OK))
|
||||
{
|
||||
validateLogin();
|
||||
}
|
||||
|
@ -192,6 +182,11 @@ public class LoginPanel extends Window implements EventListener
|
|||
Env.setContext(ctx, Env.LANGUAGE, langName);
|
||||
Language language = Language.getLanguage(langName);
|
||||
Env.verifyLanguage(ctx, language);
|
||||
|
||||
res = ResourceBundle.getBundle(RESOURCE, language.getLocale());
|
||||
lblUserId.setValue(res.getString("User"));
|
||||
lblPassword.setValue(res.getString("Password"));
|
||||
lblLanguage.setValue(res.getString("Language"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -209,7 +204,17 @@ public class LoginPanel extends Window implements EventListener
|
|||
throw new WrongValueException("User Id or Password invalid!!!");
|
||||
|
||||
else
|
||||
{
|
||||
String langName = null;
|
||||
if ( lstLanguage.getSelectedItem() != null )
|
||||
langName = (String) lstLanguage.getSelectedItem().getValue();
|
||||
else
|
||||
langName = Language.getBaseLanguage().getName();
|
||||
Env.setContext(ctx, Env.LANGUAGE, langName);
|
||||
Language language = Language.getLanguage(langName);
|
||||
Env.verifyLanguage(ctx, language);
|
||||
wndLogin.loginOk(userId, userPassword);
|
||||
}
|
||||
}
|
||||
|
||||
public boolean isAsap()
|
||||
|
|
|
@ -165,13 +165,13 @@ public class MenuPanel extends Panel implements EventListener
|
|||
treeitem.setValue(String.valueOf(mChildNode.getNode_ID()));
|
||||
|
||||
if (mChildNode.isReport())
|
||||
treeitem.setImage("/images/mReport.gif");
|
||||
treeitem.setImage("/images/mReport.png");
|
||||
else if (mChildNode.isProcess())
|
||||
treeitem.setImage("/images/mProcess.gif");
|
||||
treeitem.setImage("/images/mProcess.png");
|
||||
else if (mChildNode.isWorkFlow())
|
||||
treeitem.setImage("/images/mWorkFlow.gif");
|
||||
treeitem.setImage("/images/mWorkFlow.png");
|
||||
else
|
||||
treeitem.setImage("/images/mWindow.gif");
|
||||
treeitem.setImage("/images/mWindow.png");
|
||||
|
||||
treeitem.getTreerow().setDraggable("favourite"); // Elaine 2008/07/24
|
||||
pnlSearch.addTreeItem(treeitem);
|
||||
|
|
|
@ -18,16 +18,18 @@
|
|||
package org.adempiere.webui.panel;
|
||||
|
||||
import java.util.Properties;
|
||||
import java.util.ResourceBundle;
|
||||
|
||||
import org.adempiere.webui.component.WConfirmPanel;
|
||||
import org.adempiere.webui.component.ConfirmPanel;
|
||||
import org.adempiere.webui.component.Label;
|
||||
import org.adempiere.webui.component.Window;
|
||||
import org.adempiere.webui.exception.ApplicationException;
|
||||
import org.adempiere.webui.window.LoginWindow;
|
||||
import org.compiere.db.CConnection;
|
||||
import org.compiere.util.Env;
|
||||
import org.compiere.util.KeyNamePair;
|
||||
import org.compiere.util.Language;
|
||||
import org.compiere.util.Login;
|
||||
import org.compiere.util.Msg;
|
||||
import org.zkoss.zk.au.out.AuFocus;
|
||||
import org.zkoss.zk.ui.event.Event;
|
||||
import org.zkoss.zk.ui.event.EventListener;
|
||||
|
@ -37,7 +39,6 @@ import org.zkoss.zul.Button;
|
|||
import org.zkoss.zul.Div;
|
||||
import org.zkoss.zul.Grid;
|
||||
import org.zkoss.zul.Image;
|
||||
import org.zkoss.zul.Label;
|
||||
import org.zkoss.zul.Listbox;
|
||||
import org.zkoss.zul.Listitem;
|
||||
import org.zkoss.zul.Row;
|
||||
|
@ -54,6 +55,8 @@ import org.zkoss.zul.Rows;
|
|||
public class RolePanel extends Window implements EventListener
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private static final String RESOURCE = "org.compiere.apps.ALoginRes";
|
||||
|
||||
private LoginWindow wndLogin;
|
||||
private Login login;
|
||||
|
@ -94,7 +97,7 @@ public class RolePanel extends Window implements EventListener
|
|||
Row logo = new Row();
|
||||
logo.setSpans("2");
|
||||
Image image = new Image();
|
||||
image.setSrc("images/Logo.gif");
|
||||
image.setSrc("images/logo.png");
|
||||
logo.appendChild(image);
|
||||
|
||||
Row rowRole = new Row();
|
||||
|
@ -102,27 +105,21 @@ public class RolePanel extends Window implements EventListener
|
|||
Row rowOrg = new Row();
|
||||
Row rowWarehouse = new Row();
|
||||
|
||||
rowRole.appendChild(lblRole);
|
||||
rowRole.appendChild(lblRole.rightAlign());
|
||||
rowRole.appendChild(lstRole);
|
||||
|
||||
rowClient.appendChild(lblClient);
|
||||
rowClient.appendChild(lblClient.rightAlign());
|
||||
rowClient.appendChild(lstClient);
|
||||
|
||||
rowOrg.appendChild(lblOrganisation);
|
||||
rowOrg.appendChild(lblOrganisation.rightAlign());
|
||||
rowOrg.appendChild(lstOrganisation);
|
||||
|
||||
rowWarehouse.appendChild(lblWarehouse);
|
||||
rowWarehouse.appendChild(lblWarehouse.rightAlign());
|
||||
rowWarehouse.appendChild(lstWarehouse);
|
||||
|
||||
Row rowButtons = new Row();
|
||||
//rowButtons.setAlign("right");
|
||||
//Label lblButtons = new Label();
|
||||
//rowButtons.appendChild(lblButtons);
|
||||
//Panel pnlButtons = new Panel();
|
||||
//divButtons.appendChild(btnOk);
|
||||
//divButtons.appendChild(btnCancel);
|
||||
WConfirmPanel pnlButtons = new WConfirmPanel(true, false, false, false, false, false, false);
|
||||
pnlButtons.addEventListener(this);
|
||||
ConfirmPanel pnlButtons = new ConfirmPanel(true);
|
||||
pnlButtons.addActionListener(this);
|
||||
rowButtons.setSpans("2");
|
||||
rowButtons.appendChild(pnlButtons);
|
||||
|
||||
|
@ -143,52 +140,56 @@ public class RolePanel extends Window implements EventListener
|
|||
|
||||
private void initComponents()
|
||||
{
|
||||
Language language = Env.getLanguage(Env.getCtx());
|
||||
|
||||
ResourceBundle res = ResourceBundle.getBundle(RESOURCE, language.getLocale());
|
||||
|
||||
lblErrorMsg = new Label();
|
||||
lblErrorMsg.setValue(" ");
|
||||
|
||||
lblRole = new Label();
|
||||
lblRole.setId("lblRole");
|
||||
lblRole.setValue(Msg.getMsg(Env.getCtx(),"Role")+ ":");
|
||||
lblRole.setValue(res.getString("Role"));
|
||||
|
||||
lblClient = new Label();
|
||||
lblClient.setId("lblClient");
|
||||
lblClient.setValue(Msg.getMsg(Env.getCtx(),"Client")+ ":");
|
||||
lblClient.setValue(res.getString("Client"));
|
||||
|
||||
lblOrganisation = new Label();
|
||||
lblOrganisation.setId("lblOrganisation");
|
||||
lblOrganisation.setValue(Msg.getMsg(Env.getCtx(),"Organization")+ " :");
|
||||
lblOrganisation.setValue(res.getString("Organization"));
|
||||
|
||||
lblWarehouse = new Label();
|
||||
lblWarehouse.setId("lblWarehouse");
|
||||
lblWarehouse.setValue(Msg.getMsg(Env.getCtx(),"Warehouse")+ " :");
|
||||
lblWarehouse.setValue(res.getString("Warehouse"));
|
||||
|
||||
lstRole = new Listbox();
|
||||
lstRole.setId("lstRole");
|
||||
lstRole.setRows(1);
|
||||
lstRole.setMold("select");
|
||||
lstRole.addEventListener(Events.ON_SELECT, this);
|
||||
lstRole.setWidth("180px");
|
||||
lstRole.setWidth("220px");
|
||||
|
||||
lstClient = new Listbox();
|
||||
lstClient.setId("lstClient");
|
||||
lstClient.setRows(1);
|
||||
lstClient.setMold("select");
|
||||
lstClient.addEventListener(Events.ON_SELECT, this);
|
||||
lstClient.setWidth("180px");
|
||||
lstClient.setWidth("220px");
|
||||
|
||||
lstOrganisation = new Listbox();
|
||||
lstOrganisation.setId("lstOrganisation");
|
||||
lstOrganisation.setRows(1);
|
||||
lstOrganisation.setMold("select");
|
||||
lstOrganisation.addEventListener(Events.ON_SELECT, this);
|
||||
lstOrganisation.setWidth("180px");
|
||||
lstOrganisation.setWidth("220px");
|
||||
|
||||
lstWarehouse = new Listbox();
|
||||
lstWarehouse.setId("lstWarehouse");
|
||||
lstWarehouse.setRows(1);
|
||||
lstWarehouse.setMold("select");
|
||||
lstWarehouse.addEventListener(Events.ON_SELECT, this);
|
||||
lstWarehouse.setWidth("180px");
|
||||
lstWarehouse.setWidth("220px");
|
||||
|
||||
btnOk = new Button();
|
||||
btnOk.setId("btnOk");
|
||||
|
@ -272,22 +273,11 @@ public class RolePanel extends Window implements EventListener
|
|||
else if(eventCompId.equals(lstOrganisation.getId()))
|
||||
updateWarehouseList();
|
||||
}
|
||||
/* else if(eventName.equals("onClick"))
|
||||
{
|
||||
if(eventCompId.equals(btnOk.getId()))
|
||||
{
|
||||
validateRoles();
|
||||
}
|
||||
else if(eventCompId.equals(btnCancel.getId()))
|
||||
{
|
||||
|
||||
}
|
||||
}*/
|
||||
if (event.getName().equals(WConfirmPanel.A_OK))
|
||||
if (event.getTarget().getId().equals(ConfirmPanel.A_OK))
|
||||
{
|
||||
validateRoles();
|
||||
}
|
||||
else if (event.getName().equals(WConfirmPanel.A_CANCEL))
|
||||
else if (event.getTarget().getId().equals(ConfirmPanel.A_CANCEL))
|
||||
{
|
||||
wndLogin.loginCancelled();
|
||||
}
|
||||
|
|
|
@ -178,15 +178,15 @@ public class WAttachment extends Window implements EventListener
|
|||
northPanel.appendChild(toolBar);
|
||||
|
||||
bSave.setEnabled(false);
|
||||
bSave.setSrc("/images/Export24.gif");
|
||||
bSave.setSrc("/images/Export24.png");
|
||||
bSave.setTooltiptext(Msg.getMsg(Env.getCtx(), "AttachmentSave"));
|
||||
bSave.addEventListener(Events.ON_CLICK, this);
|
||||
|
||||
bLoad.setSrc("/images/Import24.gif");
|
||||
bLoad.setSrc("/images/Import24.png");
|
||||
bLoad.setTooltiptext(Msg.getMsg(Env.getCtx(), "Load"));
|
||||
bLoad.addEventListener(Events.ON_CLICK, this);
|
||||
|
||||
bDelete.setSrc("/images/Delete24.gif");
|
||||
bDelete.setSrc("/images/Delete24.png");
|
||||
bDelete.setTooltiptext(Msg.getMsg(Env.getCtx(), "Delete"));
|
||||
bDelete.addEventListener(Events.ON_CLICK, this);
|
||||
|
||||
|
@ -212,13 +212,13 @@ public class WAttachment extends Window implements EventListener
|
|||
southPane.appendChild(confirmPanel);
|
||||
southPane.setHeight("30px");
|
||||
|
||||
bCancel.setImage("/images/Cancel24.gif");
|
||||
bCancel.setImage("/images/Cancel24.png");
|
||||
bCancel.addEventListener(Events.ON_CLICK, this);
|
||||
|
||||
bOk.setImage("/images/Ok24.gif");
|
||||
bOk.setImage("/images/Ok24.png");
|
||||
bOk.addEventListener(Events.ON_CLICK, this);
|
||||
|
||||
bDeleteAll.setImage("/images/Delete24.gif");
|
||||
bDeleteAll.setImage("/images/Delete24.png");
|
||||
bDeleteAll.addEventListener(Events.ON_CLICK, this);
|
||||
|
||||
confirmPanel.appendChild(bDeleteAll);
|
||||
|
|
|
@ -22,6 +22,7 @@ import java.util.List;
|
|||
|
||||
import org.adempiere.webui.component.ConfirmPanel;
|
||||
import org.adempiere.webui.component.Grid;
|
||||
import org.adempiere.webui.component.GridFactory;
|
||||
import org.adempiere.webui.component.Panel;
|
||||
import org.adempiere.webui.component.Row;
|
||||
import org.adempiere.webui.component.Rows;
|
||||
|
@ -39,6 +40,7 @@ import org.zkoss.zk.ui.event.Events;
|
|||
import org.zkoss.zul.Label;
|
||||
import org.zkoss.zul.Listbox;
|
||||
import org.zkoss.zul.Listitem;
|
||||
import org.zkoss.zul.Space;
|
||||
|
||||
|
||||
|
||||
|
@ -210,7 +212,6 @@ public class WDocActionPanel extends Window implements EventListener
|
|||
lstDocAction.addEventListener(Events.ON_SELECT, this);
|
||||
|
||||
confirmPanel = new ConfirmPanel(true);
|
||||
confirmPanel.addComponentsLeft(confirmPanel.createButton("Process"));
|
||||
confirmPanel.addActionListener(Events.ON_CLICK, this);
|
||||
|
||||
}
|
||||
|
@ -218,7 +219,7 @@ public class WDocActionPanel extends Window implements EventListener
|
|||
private void init()
|
||||
{
|
||||
|
||||
Grid grid = new Grid();
|
||||
Grid grid = GridFactory.newGridLayout();
|
||||
grid.setId("grd");
|
||||
grid.setWidth("400px");
|
||||
|
||||
|
@ -227,7 +228,8 @@ public class WDocActionPanel extends Window implements EventListener
|
|||
Row rowDocAction = new Row();
|
||||
Row rowLabel = new Row();
|
||||
Row rowConfirm = new Row();
|
||||
|
||||
Row rowSpacer = new Row();
|
||||
|
||||
Panel pnlDocAction = new Panel();
|
||||
pnlDocAction.appendChild(lblDocAction);
|
||||
pnlDocAction.appendChild(lstDocAction);
|
||||
|
@ -236,8 +238,10 @@ public class WDocActionPanel extends Window implements EventListener
|
|||
rowDocAction.setAlign("right");
|
||||
rowLabel.appendChild(label);
|
||||
rowConfirm.appendChild(confirmPanel);
|
||||
rowSpacer.appendChild(new Space());
|
||||
rows.appendChild(rowDocAction);
|
||||
rows.appendChild(rowLabel);
|
||||
rows.appendChild(rowSpacer);
|
||||
rows.appendChild(rowConfirm);
|
||||
|
||||
grid.appendChild(rows);
|
||||
|
@ -272,11 +276,7 @@ public class WDocActionPanel extends Window implements EventListener
|
|||
{
|
||||
m_OKpressed = false;
|
||||
this.detach();
|
||||
}
|
||||
else if (confirmPanel.getButton("Process").equals(event.getTarget()))
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (Events.ON_SELECT.equals(event.getName()))
|
||||
{
|
||||
|
|
|
@ -33,6 +33,8 @@ import org.zkoss.zkex.zul.Borderlayout;
|
|||
public class WindowContainer extends AbstractUIPart implements EventListener
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private static final int MAX_TITLE_LENGTH = 30;
|
||||
|
||||
private Tabbox tabbox;
|
||||
|
||||
|
@ -79,7 +81,17 @@ public class WindowContainer extends AbstractUIPart implements EventListener
|
|||
public void addWindow(Component comp, String title, boolean closeable, boolean enable)
|
||||
{
|
||||
Tab tab = new Tab();
|
||||
tab.setLabel(title);
|
||||
title = title.replaceAll("[&]", "");
|
||||
if (title.length() <= MAX_TITLE_LENGTH)
|
||||
{
|
||||
tab.setLabel(title);
|
||||
}
|
||||
else
|
||||
{
|
||||
tab.setTooltiptext(title);
|
||||
title = title.substring(0, 27) + "...";
|
||||
tab.setLabel(title);
|
||||
}
|
||||
tab.setClosable(closeable);
|
||||
// tab.setHeight("20px");
|
||||
|
||||
|
|
|
@ -29,9 +29,9 @@ import org.compiere.util.Language;
|
|||
* @version $Revision: 0.10 $
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public final class WebContext extends Properties
|
||||
public final class ServerContext extends Properties
|
||||
{
|
||||
public WebContext()
|
||||
private ServerContext()
|
||||
{
|
||||
super();
|
||||
/**
|
||||
|
@ -40,21 +40,46 @@ public final class WebContext extends Properties
|
|||
this.put(Env.LANGUAGE, Language.getBaseAD_Language());
|
||||
}
|
||||
|
||||
private static InheritableThreadLocal context = new InheritableThreadLocal() {
|
||||
protected WebContext initialValue()
|
||||
private static InheritableThreadLocal<ServerContext> context = new InheritableThreadLocal<ServerContext>() {
|
||||
protected ServerContext initialValue()
|
||||
{
|
||||
return new WebContext();
|
||||
return new ServerContext();
|
||||
}
|
||||
};
|
||||
|
||||
public static WebContext getCurrentInstance()
|
||||
/**
|
||||
* Get server context for current thread
|
||||
* @return ServerContext
|
||||
*/
|
||||
public static ServerContext getCurrentInstance()
|
||||
{
|
||||
return (WebContext)context.get();
|
||||
return (ServerContext)context.get();
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public static void setCurrentInstance(WebContext webCtx)
|
||||
/**
|
||||
* dispose server context for current thread
|
||||
*/
|
||||
public static void dispose()
|
||||
{
|
||||
context.set(webCtx);
|
||||
context.remove();
|
||||
}
|
||||
|
||||
/**
|
||||
* Allocate new server context for current thread
|
||||
* @return ServerContext
|
||||
*/
|
||||
public static ServerContext newInstance()
|
||||
{
|
||||
dispose();
|
||||
return getCurrentInstance();
|
||||
}
|
||||
|
||||
/**
|
||||
* Set server context for current thread
|
||||
* @param ctx
|
||||
*/
|
||||
public static void setCurrentInstance(ServerContext ctx)
|
||||
{
|
||||
context.set(ctx);
|
||||
}
|
||||
}
|
|
@ -44,13 +44,16 @@ public class SessionContextListener implements ExecutionInit,
|
|||
{
|
||||
if (parent == null)
|
||||
{
|
||||
WebContext ctx = (WebContext)exec.getDesktop().getSession().getAttribute(SESSION_CTX);
|
||||
ServerContext ctx = (ServerContext)exec.getDesktop().getSession().getAttribute(SESSION_CTX);
|
||||
if (ctx == null)
|
||||
{
|
||||
ctx = new WebContext();
|
||||
ctx = ServerContext.newInstance();
|
||||
exec.getDesktop().getSession().setAttribute(SESSION_CTX, ctx);
|
||||
}
|
||||
setWebContext(ctx);
|
||||
else
|
||||
{
|
||||
ServerContext.setCurrentInstance(ctx);
|
||||
}
|
||||
exec.setAttribute(SESSION_CTX, ctx);
|
||||
}
|
||||
}
|
||||
|
@ -60,7 +63,8 @@ public class SessionContextListener implements ExecutionInit,
|
|||
if (parent == null)
|
||||
{
|
||||
exec.removeAttribute(SESSION_CTX);
|
||||
}
|
||||
ServerContext.dispose();
|
||||
}
|
||||
}
|
||||
|
||||
public void prepare(Component comp, Event evt)
|
||||
|
@ -69,9 +73,9 @@ public class SessionContextListener implements ExecutionInit,
|
|||
|
||||
public boolean init(Component comp, Event evt)
|
||||
{
|
||||
WebContext ctx = (WebContext) Executions.getCurrent().getAttribute(
|
||||
ServerContext ctx = (ServerContext) Executions.getCurrent().getAttribute(
|
||||
SESSION_CTX);
|
||||
setWebContext(ctx);
|
||||
ServerContext.setCurrentInstance(ctx);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -82,26 +86,13 @@ public class SessionContextListener implements ExecutionInit,
|
|||
|
||||
public void afterResume(Component comp, Event evt)
|
||||
{
|
||||
WebContext ctx = (WebContext) Executions.getCurrent().getAttribute(
|
||||
ServerContext ctx = (ServerContext) Executions.getCurrent().getAttribute(
|
||||
SESSION_CTX);
|
||||
setWebContext(ctx);
|
||||
ServerContext.setCurrentInstance(ctx);
|
||||
}
|
||||
|
||||
public void abortResume(Component comp, Event evt)
|
||||
{
|
||||
// do nothing
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public void setWebContext(WebContext ctx)
|
||||
{
|
||||
getContextThreadLocal().set(ctx);
|
||||
WebContext.setCurrentInstance(ctx);
|
||||
}
|
||||
|
||||
private ThreadLocal getContextThreadLocal()
|
||||
{
|
||||
return ThreadLocals.getThreadLocal(
|
||||
"org.adempiere.webui.session.WebContext", "context");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -62,7 +62,7 @@ public class WebUIServlet extends DHtmlLayoutServlet
|
|||
super.init(servletConfig);
|
||||
|
||||
/** Initialise context for the current thread*/
|
||||
WebContext.setCurrentInstance(new WebContext());
|
||||
ServerContext.newInstance();
|
||||
Env.setContextProvider(new ZkContextProvider());
|
||||
|
||||
/**
|
||||
|
|
|
@ -124,7 +124,7 @@ public class AboutWindow extends Window implements EventListener {
|
|||
hbox.setPack("end");
|
||||
hbox.setWidth("100%");
|
||||
Button btnOk = new Button();
|
||||
btnOk.setImage("/images/Ok24.gif");
|
||||
btnOk.setImage("/images/Ok24.png");
|
||||
btnOk.addEventListener(Events.ON_CLICK, this);
|
||||
btnOk.setParent(hbox);
|
||||
|
||||
|
|
|
@ -249,17 +249,17 @@ public class FindWindow extends Window implements EventListener,ValueChangeListe
|
|||
|
||||
Button btnNew = new Button();
|
||||
btnNew.setName("btnNew");
|
||||
btnNew.setSrc("/images/New24.gif");
|
||||
btnNew.setSrc("/images/New24.png");
|
||||
btnNew.addEventListener(Events.ON_CLICK,this);
|
||||
|
||||
Button btnOk = new Button();
|
||||
btnOk.setName("btnOkSimple");
|
||||
btnOk.setSrc("/images/Ok24.gif");
|
||||
btnOk.setSrc("/images/Ok24.png");
|
||||
btnOk.addEventListener(Events.ON_CLICK,this);
|
||||
|
||||
Button btnCancel = new Button();
|
||||
btnCancel.setName("btnCancel");
|
||||
btnCancel.setSrc("/images/Cancel24.gif");
|
||||
btnCancel.setSrc("/images/Cancel24.png");
|
||||
btnCancel.addEventListener(Events.ON_CLICK,this);
|
||||
|
||||
Panel pnlButtonRight = new Panel();
|
||||
|
@ -321,18 +321,18 @@ public class FindWindow extends Window implements EventListener,ValueChangeListe
|
|||
private void initAdvanced()
|
||||
{
|
||||
ToolBarButton btnNew = new ToolBarButton();
|
||||
btnNew.setSrc("/images/New24.gif");
|
||||
btnNew.setSrc("/images/New24.png");
|
||||
btnNew.setAttribute("name", "btnNewAdv");
|
||||
btnNew.addEventListener(Events.ON_CLICK, this);
|
||||
|
||||
ToolBarButton btnDelete = new ToolBarButton();
|
||||
btnDelete.setAttribute("name","btnDeleteAdv");
|
||||
btnDelete.setSrc("/images/Delete24.gif");
|
||||
btnDelete.setSrc("/images/Delete24.png");
|
||||
btnDelete.addEventListener(Events.ON_CLICK, this);
|
||||
|
||||
ToolBarButton btnSave = new ToolBarButton();
|
||||
btnSave.setAttribute("name","btnSaveAdv");
|
||||
btnSave.setSrc("/images/Save24.gif");
|
||||
btnSave.setSrc("/images/Save24.png");
|
||||
btnSave.addEventListener(Events.ON_CLICK, this);
|
||||
|
||||
fQueryName = new Combobox();
|
||||
|
@ -349,12 +349,12 @@ public class FindWindow extends Window implements EventListener,ValueChangeListe
|
|||
|
||||
Button btnOk = new Button();
|
||||
btnOk.setName("btnOkAdv");
|
||||
btnOk.setSrc("/images/Ok24.gif");
|
||||
btnOk.setSrc("/images/Ok24.png");
|
||||
btnOk.addEventListener(Events.ON_CLICK, this);
|
||||
|
||||
Button btnCancel = new Button();
|
||||
btnCancel.setName("btnCancel");
|
||||
btnCancel.setSrc("/images/Cancel24.gif");
|
||||
btnCancel.setSrc("/images/Cancel24.png");
|
||||
btnCancel.addEventListener(Events.ON_CLICK, this);
|
||||
|
||||
Panel pnlButtonRight = new Panel();
|
||||
|
@ -1178,7 +1178,7 @@ public class FindWindow extends Window implements EventListener,ValueChangeListe
|
|||
m_editor = new WStringEditor(field);
|
||||
|
||||
field.addPropertyChangeListener(m_editor);
|
||||
m_editor.addValueChangeListner(this);
|
||||
m_editor.addValueChangeListener(this);
|
||||
m_editor.setValue(null);
|
||||
m_editor.setReadWrite(enabled);
|
||||
m_editor.setVisible(enabled);
|
||||
|
|
|
@ -184,7 +184,7 @@ public class InfoSchedule extends Window implements EventListener //, ChangeList
|
|||
Button btnNew = new Button();
|
||||
btnNew.setName("btnNew");
|
||||
btnNew.setId("New");
|
||||
btnNew.setSrc("/images/New24.gif");
|
||||
btnNew.setSrc("/images/New24.png");
|
||||
|
||||
confirmPanel.addComponentsLeft(btnNew);
|
||||
btnNew.addEventListener(Events.ON_CLICK, this);
|
||||
|
|
|
@ -169,13 +169,13 @@ public final class WAccountDialog extends Window
|
|||
toolBar.setOrient("vertical");
|
||||
toolBar.setStyle("border: none; margin: 5px");
|
||||
|
||||
bSave.setImage("images/Save24.gif");
|
||||
bSave.setImage("images/Save24.png");
|
||||
bSave.setTooltiptext(Msg.getMsg(Env.getCtx(),"AccountNewUpdate"));
|
||||
bSave.addEventListener(Events.ON_CLICK, this);
|
||||
bRefresh.setImage("images/Refresh24.gif");
|
||||
bRefresh.setImage("images/Refresh24.png");
|
||||
bRefresh.setTooltiptext(Msg.getMsg(Env.getCtx(),"Refresh"));
|
||||
bRefresh.addEventListener(Events.ON_CLICK, this);
|
||||
bIgnore.setImage("images/Ignore24.gif");
|
||||
bIgnore.setImage("images/Ignore24.png");
|
||||
bIgnore.setTooltiptext(Msg.getMsg(Env.getCtx(),"Ignore"));
|
||||
bIgnore.addEventListener(Events.ON_CLICK, this);
|
||||
//
|
||||
|
@ -320,7 +320,7 @@ public final class WAccountDialog extends Window
|
|||
f_Account_ID = WebEditorFactory.getEditor(field, false);
|
||||
// ((VLookup)f_Account_ID).setWidth(400);
|
||||
addLine(field, f_Account_ID, isMandatory);
|
||||
f_Account_ID.addValueChangeListner(this);
|
||||
f_Account_ID.addValueChangeListener(this);
|
||||
}
|
||||
else if (type.equals(MAcctSchemaElement.ELEMENTTYPE_SubAccount))
|
||||
{
|
||||
|
|
|
@ -28,7 +28,7 @@ import org.adempiere.webui.component.Label;
|
|||
import org.adempiere.webui.component.Row;
|
||||
import org.adempiere.webui.component.Rows;
|
||||
import org.adempiere.webui.component.Textbox;
|
||||
import org.adempiere.webui.component.WConfirmPanel;
|
||||
import org.adempiere.webui.component.ConfirmPanel;
|
||||
import org.adempiere.webui.component.WStatusBar;
|
||||
import org.adempiere.webui.component.Window;
|
||||
import org.adempiere.webui.editor.WSearchEditor;
|
||||
|
@ -116,9 +116,9 @@ public class WEMailDialog extends Window implements EventListener, ValueChangeLi
|
|||
"EMail IS NOT NULL");
|
||||
|
||||
fUser = new WSearchEditor(lookup, "AD_User_ID", "", false, false, true);
|
||||
fUser.addValueChangeListner(this);
|
||||
fUser.addValueChangeListener(this);
|
||||
fCcUser = new WSearchEditor(lookup, "AD_User_ID", "", false, false, true);
|
||||
fCcUser.addValueChangeListner(this);
|
||||
fCcUser.addValueChangeListener(this);
|
||||
jbInit();
|
||||
}
|
||||
catch(Exception ex)
|
||||
|
@ -166,7 +166,7 @@ public class WEMailDialog extends Window implements EventListener, ValueChangeLi
|
|||
private Label lAttachment = new Label();
|
||||
private Textbox fAttachment = new Textbox();//40);
|
||||
private Textbox fMessage = new Textbox();
|
||||
private WConfirmPanel confirmPanel = new WConfirmPanel(true);
|
||||
private ConfirmPanel confirmPanel = new ConfirmPanel(true);
|
||||
private WStatusBar statusBar = new WStatusBar();
|
||||
|
||||
/**
|
||||
|
@ -270,7 +270,7 @@ public class WEMailDialog extends Window implements EventListener, ValueChangeLi
|
|||
rows.appendChild(row);
|
||||
row.setSpans("2");
|
||||
row.appendChild(confirmPanel);
|
||||
confirmPanel.addEventListener(this);
|
||||
confirmPanel.addActionListener(this);
|
||||
|
||||
Borderlayout layout = new Borderlayout();
|
||||
layout.setWidth("490px");
|
||||
|
@ -435,7 +435,7 @@ public class WEMailDialog extends Window implements EventListener, ValueChangeLi
|
|||
* Action Listener - Send email
|
||||
*/
|
||||
public void onEvent(Event event) throws Exception {
|
||||
if (event.getName().equals(WConfirmPanel.A_CANCEL))
|
||||
if (event.getTarget().getId().equals(ConfirmPanel.A_CANCEL))
|
||||
onClose();
|
||||
|
||||
if (getTo() == null || getTo().length() == 0)
|
||||
|
@ -443,10 +443,8 @@ public class WEMailDialog extends Window implements EventListener, ValueChangeLi
|
|||
return;
|
||||
}
|
||||
// Send
|
||||
if (event.getName().equals(WConfirmPanel.A_OK))
|
||||
if (event.getTarget().getId().equals(ConfirmPanel.A_OK))
|
||||
{
|
||||
// setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
|
||||
// confirmPanel.getOKButton().setEnabled(false);
|
||||
|
||||
StringTokenizer st = new StringTokenizer(getTo(), " ,;", false);
|
||||
String to = st.nextToken();
|
||||
|
@ -485,7 +483,7 @@ public class WEMailDialog extends Window implements EventListener, ValueChangeLi
|
|||
// confirmPanel.getOKButton().setEnabled(false);
|
||||
// setCursor(Cursor.getDefaultCursor());
|
||||
}
|
||||
else if (event.getName().equals(WConfirmPanel.A_CANCEL))
|
||||
else if (event.getTarget().getId().equals(ConfirmPanel.A_CANCEL))
|
||||
onClose();
|
||||
}
|
||||
|
||||
|
|
|
@ -165,10 +165,10 @@ public class WLocationDialog extends Window implements EventListener
|
|||
lstCountry.setRows(0);
|
||||
|
||||
btnOk = new Button();
|
||||
btnOk.setImage("/images/Ok16.gif");
|
||||
btnOk.setImage("/images/Ok16.png");
|
||||
btnOk.addEventListener(Events.ON_CLICK,this);
|
||||
btnCancel = new Button();
|
||||
btnCancel.setImage("/images/Cancel16.gif");
|
||||
btnCancel.setImage("/images/Cancel16.png");
|
||||
btnCancel.addEventListener(Events.ON_CLICK,this);
|
||||
|
||||
mainPanel = new VerticalBox();
|
||||
|
|
|
@ -208,10 +208,10 @@ public class WLocatorDialog extends Window implements EventListener
|
|||
boxButtons.setWidths("80%, 10%, 10%");
|
||||
boxButtons.setStyle("text-align:right");
|
||||
|
||||
btnCancel.setImage("/images/Cancel16.gif");
|
||||
btnCancel.setImage("/images/Cancel16.png");
|
||||
btnCancel.addEventListener(Events.ON_CLICK, this);
|
||||
|
||||
btnOk.setImage("/images/Ok16.gif");
|
||||
btnOk.setImage("/images/Ok16.png");
|
||||
btnOk.addEventListener(Events.ON_CLICK, this);
|
||||
|
||||
boxButtons.appendChild(new Label());
|
||||
|
|
|
@ -147,15 +147,15 @@ public class WMediaDialog extends Window implements EventListener
|
|||
|
||||
|
||||
bSave.setEnabled(false);
|
||||
bSave.setSrc("/images/Export24.gif");
|
||||
bSave.setSrc("/images/Export24.png");
|
||||
bSave.setTooltiptext(Msg.getMsg(Env.getCtx(), "AttachmentSave"));
|
||||
bSave.addEventListener(Events.ON_CLICK, this);
|
||||
|
||||
bLoad.setSrc("/images/Import24.gif");
|
||||
bLoad.setSrc("/images/Import24.png");
|
||||
bLoad.setTooltiptext(Msg.getMsg(Env.getCtx(), "Load"));
|
||||
bLoad.addEventListener(Events.ON_CLICK, this);
|
||||
|
||||
bDelete.setSrc("/images/Delete24.gif");
|
||||
bDelete.setSrc("/images/Delete24.png");
|
||||
bDelete.setTooltiptext(Msg.getMsg(Env.getCtx(), "Delete"));
|
||||
bDelete.addEventListener(Events.ON_CLICK, this);
|
||||
|
||||
|
@ -174,10 +174,10 @@ public class WMediaDialog extends Window implements EventListener
|
|||
southPane.appendChild(confirmPanel);
|
||||
southPane.setHeight("30px");
|
||||
|
||||
bCancel.setImage("/images/Cancel24.gif");
|
||||
bCancel.setImage("/images/Cancel24.png");
|
||||
bCancel.addEventListener(Events.ON_CLICK, this);
|
||||
|
||||
bOk.setImage("/images/Ok24.gif");
|
||||
bOk.setImage("/images/Ok24.png");
|
||||
bOk.addEventListener(Events.ON_CLICK, this);
|
||||
|
||||
confirmPanel.appendChild(bCancel);
|
||||
|
|
|
@ -267,7 +267,7 @@ public class WPAttributeDialog extends Window implements EventListener
|
|||
cbNewEdit.addEventListener(Events.ON_CHECK, this);
|
||||
row.appendChild(cbNewEdit);
|
||||
bSelect.setLabel(Msg.getMsg(Env.getCtx(), "SelectExisting"));
|
||||
bSelect.setImage("images/PAttribute16.gif");
|
||||
bSelect.setImage("images/PAttribute16.png");
|
||||
bSelect.addEventListener(Events.ON_CLICK, this);
|
||||
row.appendChild(bSelect);
|
||||
rows.appendChild(row);
|
||||
|
@ -341,7 +341,7 @@ public class WPAttributeDialog extends Window implements EventListener
|
|||
}
|
||||
// Popup
|
||||
// fieldLot.addMouseListener(new VPAttributeDialog_mouseAdapter(this)); // popup
|
||||
mZoom = new Menuitem(Msg.getMsg(Env.getCtx(), "Zoom"), "images/Zoom16.gif");
|
||||
mZoom = new Menuitem(Msg.getMsg(Env.getCtx(), "Zoom"), "images/Zoom16.png");
|
||||
mZoom.addEventListener(Events.ON_CLICK, this);
|
||||
popupMenu.appendChild(mZoom);
|
||||
this.appendChild(popupMenu);
|
||||
|
|
|
@ -256,7 +256,7 @@ public class WRecordInfo extends Window implements EventListener
|
|||
|
||||
for (int i = 0; i < columnNames.size(); i++)
|
||||
{
|
||||
Listheader listheader = new Listheader(columnNames.get(i));
|
||||
Listheader listheader = new Listheader(columnNames.get(i).replaceAll("[&]", ""));
|
||||
listhead.appendChild(listheader);
|
||||
}
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@ public class ZkJRViewer extends Window {
|
|||
Toolbar toolbar = new Toolbar();
|
||||
toolbar.setHeight("26px");
|
||||
Toolbarbutton button = new Toolbarbutton();
|
||||
button.setImage("/images/Print24.gif");
|
||||
button.setImage("/images/Print24.png");
|
||||
button.setTooltiptext("Print");
|
||||
toolbar.appendChild(button);
|
||||
row.appendChild(toolbar);
|
||||
|
|
|
@ -34,7 +34,7 @@ import org.adempiere.webui.component.ListItem;
|
|||
import org.adempiere.webui.component.Listbox;
|
||||
import org.adempiere.webui.component.Row;
|
||||
import org.adempiere.webui.component.Rows;
|
||||
import org.adempiere.webui.component.WConfirmPanel;
|
||||
import org.adempiere.webui.component.ConfirmPanel;
|
||||
import org.adempiere.webui.component.Window;
|
||||
import org.adempiere.webui.panel.StatusBarPanel;
|
||||
import org.adempiere.webui.session.SessionManager;
|
||||
|
@ -147,7 +147,7 @@ public class ZkReportViewer extends Window implements EventListener {
|
|||
private Iframe iframe;
|
||||
|
||||
private Window winExportFile = null;
|
||||
private WConfirmPanel confirmPanel = new WConfirmPanel(true);
|
||||
private ConfirmPanel confirmPanel = new ConfirmPanel(true);
|
||||
private Listbox cboType = new Listbox();
|
||||
// private ArrayList<ValueNamePair> fileTypes = new ArrayList<ValueNamePair>();
|
||||
|
||||
|
@ -208,38 +208,38 @@ public class ZkReportViewer extends Window implements EventListener {
|
|||
comboReport.setTooltiptext(Msg.translate(m_ctx, "AD_PrintFormat_ID"));
|
||||
toolBar.appendChild(comboReport);
|
||||
|
||||
bCustomize.setImage("/images/Preference24.gif");
|
||||
bCustomize.setImage("/images/Preference24.png");
|
||||
bCustomize.setTooltiptext("Customize Report");
|
||||
toolBar.appendChild(bCustomize);
|
||||
bCustomize.addEventListener(Events.ON_CLICK, this);
|
||||
|
||||
bFind.setImage("/images/Find24.gif");
|
||||
bFind.setImage("/images/Find24.png");
|
||||
bFind.setTooltiptext("Lookup Record");
|
||||
toolBar.appendChild(bFind);
|
||||
bFind.addEventListener(Events.ON_CLICK, this);
|
||||
|
||||
toolBar.appendChild(new Separator("vertical"));
|
||||
|
||||
// bPrint.setImage("/images/Print24.gif");
|
||||
// bPrint.setImage("/images/Print24.png");
|
||||
// bPrint.setTooltiptext("Print");
|
||||
// toolBar.appendChild(bPrint);
|
||||
// bPrint.addEventListener(Events.ON_CLICK, this);
|
||||
//
|
||||
// toolBar.appendChild(new Separator("vertical"));
|
||||
|
||||
bSendMail.setImage("/images/SendMail24.gif");
|
||||
bSendMail.setImage("/images/SendMail24.png");
|
||||
bSendMail.setTooltiptext("Send Mail");
|
||||
toolBar.appendChild(bSendMail);
|
||||
bSendMail.addEventListener(Events.ON_CLICK, this);
|
||||
|
||||
bArchive.setImage("/images/Archive24.gif");
|
||||
bArchive.setImage("/images/Archive24.png");
|
||||
bArchive.setTooltiptext("Archived Documents/Reports");
|
||||
toolBar.appendChild(bArchive);
|
||||
bArchive.addEventListener(Events.ON_CLICK, this);
|
||||
|
||||
if (m_isCanExport)
|
||||
{
|
||||
bExport.setImage("/images/ExportX24.gif");
|
||||
bExport.setImage("/images/ExportX24.png");
|
||||
bExport.setTooltiptext("Export");
|
||||
toolBar.appendChild(bExport);
|
||||
bExport.addEventListener(Events.ON_CLICK, this);
|
||||
|
@ -247,7 +247,7 @@ public class ZkReportViewer extends Window implements EventListener {
|
|||
|
||||
toolBar.appendChild(new Separator("vertical"));
|
||||
|
||||
bRefresh.setImage("/images/Refresh24.gif");
|
||||
bRefresh.setImage("/images/Refresh24.png");
|
||||
bRefresh.setTooltiptext("Refresh");
|
||||
toolBar.appendChild(bRefresh);
|
||||
bRefresh.addEventListener(Events.ON_CLICK, this);
|
||||
|
@ -423,9 +423,9 @@ public class ZkReportViewer extends Window implements EventListener {
|
|||
|
||||
public void onEvent(Event event) throws Exception {
|
||||
|
||||
if(event.getName().equals(WConfirmPanel.A_CANCEL))
|
||||
if(event.getTarget().getId().equals(ConfirmPanel.A_CANCEL))
|
||||
winExportFile.onClose();
|
||||
else if(event.getName().equals(WConfirmPanel.A_OK))
|
||||
else if(event.getTarget().getId().equals(ConfirmPanel.A_OK))
|
||||
exportFile();
|
||||
else if(event.getName().equals(Events.ON_CLICK) || event.getName().equals(Events.ON_SELECT))
|
||||
actionPerformed(event);
|
||||
|
@ -527,7 +527,7 @@ public class ZkReportViewer extends Window implements EventListener {
|
|||
return;
|
||||
// Create Menu
|
||||
Menupopup pop = new Menupopup();
|
||||
// Icon wi = Env.getImageIcon("mWindow.gif");
|
||||
// Icon wi = Env.getImageIcon("mWindow.png");
|
||||
if (m_ddQ != null)
|
||||
{
|
||||
m_ddM = new Menuitem(m_ddQ.getDisplayName(Env.getCtx()));
|
||||
|
@ -707,7 +707,7 @@ public class ZkReportViewer extends Window implements EventListener {
|
|||
winExportFile.appendChild(vb);
|
||||
vb.appendChild(hb);
|
||||
vb.appendChild(confirmPanel);
|
||||
confirmPanel.addEventListener(this);
|
||||
confirmPanel.addActionListener(this);
|
||||
}
|
||||
|
||||
AEnv.showCenterScreen(winExportFile);
|
||||
|
|
|
@ -41,6 +41,15 @@ html,body {
|
|||
font-size: 10px;
|
||||
}
|
||||
|
||||
.action-button {
|
||||
height: 32px;
|
||||
width: 48px;
|
||||
}
|
||||
|
||||
div.wc-modal, div.wc-modal-none, div.wc-highlighted, div.wc-highlighted-none {
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
<%-- desktop tabbox --%>
|
||||
.desktop-tb {
|
||||
position:absolute;
|
||||
|
|
Loading…
Reference in New Issue