From 60143c031e2b08bbfb366699aa7d5bc86203ff09 Mon Sep 17 00:00:00 2001 From: Heng Sin Low Date: Thu, 18 Jun 2009 12:25:28 +0000 Subject: [PATCH] https://sourceforge.net/tracker/?func=detail&aid=2808317&group_id=176962&atid=955896 - Vendor checkbox on BP Lookup not working correctly --- .../webui/panel/InfoBPartnerPanel.java | 22 +++++++++---------- .../org/adempiere/webui/panel/InfoPanel.java | 3 ++- 2 files changed, 12 insertions(+), 13 deletions(-) diff --git a/zkwebui/WEB-INF/src/org/adempiere/webui/panel/InfoBPartnerPanel.java b/zkwebui/WEB-INF/src/org/adempiere/webui/panel/InfoBPartnerPanel.java index 524f44b937..d5fa257a28 100644 --- a/zkwebui/WEB-INF/src/org/adempiere/webui/panel/InfoBPartnerPanel.java +++ b/zkwebui/WEB-INF/src/org/adempiere/webui/panel/InfoBPartnerPanel.java @@ -60,7 +60,7 @@ public class InfoBPartnerPanel extends InfoPanel implements EventListener, WTabl /** * */ - private static final long serialVersionUID = -660673175154418548L; + private static final long serialVersionUID = 5677624151607188344L; private Label lblValue ; private Textbox fieldValue ; private Label lblName; @@ -74,9 +74,8 @@ public class InfoBPartnerPanel extends InfoPanel implements EventListener, WTabl private Label lblPhone; private Intbox fieldPhone; private Checkbox checkAND ; - private Checkbox checkCustomer; - private Checkbox checkVendor; - + private Checkbox checkCustomer; + private int m_AD_User_ID_index = -1; // Elaine 2008/12/16 private int m_C_BPartner_Location_ID_index = -1; @@ -171,14 +170,13 @@ public class InfoBPartnerPanel extends InfoPanel implements EventListener, WTabl checkAND.setChecked(true); checkAND.addEventListener(Events.ON_CHECK, this); checkCustomer = new Checkbox(); - checkCustomer.setLabel(Msg.getMsg(Env.getCtx(), "OnlyCustomers")); checkCustomer.setChecked(true); checkCustomer.addEventListener(Events.ON_CHECK, this); - checkVendor = new Checkbox(); - checkVendor.setChecked(true); - checkVendor.setLabel(Msg.getMsg(Env.getCtx(), "OnlyVendors")); - checkVendor.addEventListener(Events.ON_CHECK, this); - + if (m_isSOTrx) + checkCustomer.setLabel(Msg.getMsg(Env.getCtx(), "OnlyCustomers")); + else + checkCustomer.setLabel(Msg.getMsg(Env.getCtx(), "OnlyVendors")); + contentPanel.setWidth("99%"); contentPanel.setHeight("400px"); contentPanel.setVflex(true); @@ -207,8 +205,8 @@ public class InfoBPartnerPanel extends InfoPanel implements EventListener, WTabl row.appendChild(fieldContact); row.appendChild(lblPhone.rightAlign()); row.appendChild(fieldPhone); - row.appendChild(m_isSOTrx ? checkCustomer : checkVendor); - + row.appendChild(checkCustomer); + row = new Row(); rows.appendChild(row); row.appendChild(lblName.rightAlign()); diff --git a/zkwebui/WEB-INF/src/org/adempiere/webui/panel/InfoPanel.java b/zkwebui/WEB-INF/src/org/adempiere/webui/panel/InfoPanel.java index fa12aa9cda..151d2a8d1c 100644 --- a/zkwebui/WEB-INF/src/org/adempiere/webui/panel/InfoPanel.java +++ b/zkwebui/WEB-INF/src/org/adempiere/webui/panel/InfoPanel.java @@ -919,7 +919,8 @@ public abstract class InfoPanel extends Window implements EventListener, WTableM contentPanel.setSelectedIndex(0); } } - else if (Events.ON_OK.equals(event.getName())) + //default + else { executeQuery(); renderItems();