diff --git a/org.adempiere.ui.swing/META-INF/MANIFEST.MF b/org.adempiere.ui.swing/META-INF/MANIFEST.MF
index bc9b24df60..e3572492ac 100644
--- a/org.adempiere.ui.swing/META-INF/MANIFEST.MF
+++ b/org.adempiere.ui.swing/META-INF/MANIFEST.MF
@@ -86,3 +86,5 @@ Import-Package: javax.net.ssl,
org.restlet.security,
org.restlet.service,
org.restlet.util
+Service-Component: OSGI-INF/paymentformcash.xml, OSGI-INF/paymentformcheck.xml, OSGI-INF/paymentformcreditcard.xml, OSGI-INF/paymentformdirectdebit.xml, OSGI-INF/paymentformdirectdeposit.xml, OSGI-INF/paymentformmixedpos.xml, OSGI-INF/paymentformoncredit.xml
+Bundle-ActivationPolicy: lazy
diff --git a/org.adempiere.ui.swing/OSGI-INF/paymentformcash.xml b/org.adempiere.ui.swing/OSGI-INF/paymentformcash.xml
new file mode 100644
index 0000000000..99cadd28de
--- /dev/null
+++ b/org.adempiere.ui.swing/OSGI-INF/paymentformcash.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
diff --git a/org.adempiere.ui.swing/OSGI-INF/paymentformcheck.xml b/org.adempiere.ui.swing/OSGI-INF/paymentformcheck.xml
new file mode 100644
index 0000000000..dc17bda6d6
--- /dev/null
+++ b/org.adempiere.ui.swing/OSGI-INF/paymentformcheck.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
diff --git a/org.adempiere.ui.swing/OSGI-INF/paymentformcreditcard.xml b/org.adempiere.ui.swing/OSGI-INF/paymentformcreditcard.xml
new file mode 100644
index 0000000000..7de1fc23e1
--- /dev/null
+++ b/org.adempiere.ui.swing/OSGI-INF/paymentformcreditcard.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
diff --git a/org.adempiere.ui.swing/OSGI-INF/paymentformdirectdebit.xml b/org.adempiere.ui.swing/OSGI-INF/paymentformdirectdebit.xml
new file mode 100644
index 0000000000..c9b56f531c
--- /dev/null
+++ b/org.adempiere.ui.swing/OSGI-INF/paymentformdirectdebit.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
diff --git a/org.adempiere.ui.swing/OSGI-INF/paymentformdirectdeposit.xml b/org.adempiere.ui.swing/OSGI-INF/paymentformdirectdeposit.xml
new file mode 100644
index 0000000000..cf0a13b76b
--- /dev/null
+++ b/org.adempiere.ui.swing/OSGI-INF/paymentformdirectdeposit.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
diff --git a/org.adempiere.ui.swing/OSGI-INF/paymentformmixedpos.xml b/org.adempiere.ui.swing/OSGI-INF/paymentformmixedpos.xml
new file mode 100644
index 0000000000..535f6bff6b
--- /dev/null
+++ b/org.adempiere.ui.swing/OSGI-INF/paymentformmixedpos.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
diff --git a/org.adempiere.ui.swing/OSGI-INF/paymentformoncredit.xml b/org.adempiere.ui.swing/OSGI-INF/paymentformoncredit.xml
new file mode 100644
index 0000000000..4541d936d6
--- /dev/null
+++ b/org.adempiere.ui.swing/OSGI-INF/paymentformoncredit.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
diff --git a/org.adempiere.ui.swing/build.properties b/org.adempiere.ui.swing/build.properties
index 383e4db430..cfa512982f 100644
--- a/org.adempiere.ui.swing/build.properties
+++ b/org.adempiere.ui.swing/build.properties
@@ -1,9 +1,17 @@
-bin.includes = META-INF/,\
- client.jar,\
- plugin.xml,\
- swingx-1.6.jar,\
- looks-2.0.4.jar,\
- miglayout-3.7.1-swing.jar,\
- jpedal.jar
-source.client.jar = src/
-output.client.jar = build/
+bin.includes = META-INF/,\
+ client.jar,\
+ plugin.xml,\
+ swingx-1.6.jar,\
+ looks-2.0.4.jar,\
+ miglayout-3.7.1-swing.jar,\
+ jpedal.jar,\
+ OSGI-INF/,\
+ OSGI-INF/paymentformcash.xml,\
+ OSGI-INF/paymentformcheck.xml,\
+ OSGI-INF/paymentformcreditcard.xml,\
+ OSGI-INF/paymentformdirectdebit.xml,\
+ OSGI-INF/paymentformdirectdeposit.xml,\
+ OSGI-INF/paymentformmixedpos.xml,\
+ OSGI-INF/paymentformoncredit.xml
+source.client.jar = src/
+output.client.jar = build/
diff --git a/org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormCash.java b/org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormCash.java
index 642ad950a7..55e2b76f9f 100644
--- a/org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormCash.java
+++ b/org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormCash.java
@@ -56,8 +56,12 @@ public class VPaymentFormCash extends PaymentFormCash implements ActionListener
private CLabel bAmountLabel = new CLabel();
private VNumber bAmountField = new VNumber();
- public VPaymentFormCash(int windowNo, GridTab mTab) {
- super(windowNo, mTab);
+ public VPaymentFormCash() {
+ super();
+ }
+
+ public void init(int windowNo, GridTab mTab) {
+ super.init(windowNo, mTab);
bDateField = new VDate("DateAcct", false, false, true, DisplayType.Date, "DateAcct");
dialog = new VPaymentFormDialog(this, windowNo);
init();
diff --git a/org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormCheck.java b/org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormCheck.java
index 642a0cc9ac..4cdef93906 100644
--- a/org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormCheck.java
+++ b/org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormCheck.java
@@ -64,8 +64,12 @@ public class VPaymentFormCheck extends PaymentFormCheck implements ActionListene
private CButton sOnline = new CButton();
private CLabel sStatus = new CLabel();
- public VPaymentFormCheck(int windowNo, GridTab mTab) {
- super(windowNo, mTab);
+ public VPaymentFormCheck() {
+ super();
+ }
+
+ public void init(int windowNo, GridTab mTab) {
+ super.init(windowNo, mTab);
dialog = new VPaymentFormDialog(this, windowNo);
init();
}
diff --git a/org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormCreditCard.java b/org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormCreditCard.java
index bd81c7a4e8..a54f056d1f 100644
--- a/org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormCreditCard.java
+++ b/org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormCreditCard.java
@@ -63,8 +63,12 @@ public class VPaymentFormCreditCard extends PaymentFormCreditCard implements Act
private CLabel kStatus = new CLabel();
- public VPaymentFormCreditCard(int windowNo, GridTab mTab) {
- super(windowNo, mTab);
+ public VPaymentFormCreditCard() {
+ super();
+ }
+
+ public void init(int windowNo, GridTab mTab) {
+ super.init(windowNo, mTab);
dialog = new VPaymentFormDialog(this, windowNo);
init();
}
diff --git a/org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormDirect.java b/org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormDirect.java
index 6689d3ab8d..031cf3ba8f 100644
--- a/org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormDirect.java
+++ b/org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormDirect.java
@@ -50,8 +50,12 @@ public abstract class VPaymentFormDirect extends PaymentFormDirect implements Ac
private CLabel tRoutingText = new CLabel();
private CLabel tNumberText = new CLabel();
- public VPaymentFormDirect(int windowNo, GridTab mTab, boolean isDebit) {
- super(windowNo, mTab, isDebit);
+ public VPaymentFormDirect(boolean isDebit) {
+ super(isDebit);
+ }
+
+ public void init(int windowNo, GridTab mTab) {
+ super.init(windowNo, mTab);
dialog = new VPaymentFormDialog(this, windowNo);
init();
}
diff --git a/org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormDirectDebit.java b/org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormDirectDebit.java
index f8360f529b..7582895e97 100644
--- a/org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormDirectDebit.java
+++ b/org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormDirectDebit.java
@@ -22,8 +22,8 @@ import org.compiere.model.GridTab;
*/
public class VPaymentFormDirectDebit extends VPaymentFormDirect {
- public VPaymentFormDirectDebit(int windowNo, GridTab mTab) {
- super(windowNo, mTab, true);
+ public VPaymentFormDirectDebit() {
+ super(true);
}
}
diff --git a/org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormDirectDeposit.java b/org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormDirectDeposit.java
index 68092ed142..e4703d7754 100644
--- a/org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormDirectDeposit.java
+++ b/org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormDirectDeposit.java
@@ -22,7 +22,7 @@ import org.compiere.model.GridTab;
*/
public class VPaymentFormDirectDeposit extends VPaymentFormDirect {
- public VPaymentFormDirectDeposit(int windowNo, GridTab mTab) {
- super(windowNo, mTab, false);
+ public VPaymentFormDirectDeposit() {
+ super(false);
}
}
diff --git a/org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormFactory.java b/org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormFactory.java
index 3f9c0a9fc5..0a8f076721 100644
--- a/org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormFactory.java
+++ b/org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormFactory.java
@@ -13,12 +13,9 @@
*****************************************************************************/
package org.compiere.grid;
-import java.util.HashMap;
-import java.util.logging.Level;
-
+import org.adempiere.base.Service;
+import org.adempiere.base.ServiceQuery;
import org.compiere.model.GridTab;
-import org.compiere.model.MInvoice;
-import org.compiere.util.CLogger;
/**
*
@@ -26,57 +23,19 @@ import org.compiere.util.CLogger;
*
*/
public class VPaymentFormFactory {
- /** Static Logger */
- private static CLogger s_log = CLogger.getCLogger (VPaymentFormFactory.class);
-
- private static HashMap> s_registeredClasses = null;
-
- /**
- * Register custom VPaymentForm* class
- * @param ad_table_id
- * @param cl custom class
- */
- public static final void registerClass(String paymentRule, Class extends IPaymentForm> cl)
+
+ public static IPaymentForm getPaymentForm(int windowNo, GridTab mTab, String paymentRule)
{
- s_registeredClasses.put(paymentRule, cl);
- s_log.info("Registered PaymentRule="+paymentRule+", Class="+cl);
+ ServiceQuery query = new ServiceQuery();
+ query.put("paymentRule", paymentRule);
+ return Service.locator().locate(IPaymentForm.class, query).getService();
}
- static
+ public static IPaymentForm create(int windowNo, GridTab mTab, String paymentRule)
{
- // Register defaults:
- s_registeredClasses = new HashMap>();
- s_registeredClasses.put(MInvoice.PAYMENTRULE_Cash, VPaymentFormCash.class);
- s_registeredClasses.put(MInvoice.PAYMENTRULE_Check, VPaymentFormCheck.class);
- s_registeredClasses.put(MInvoice.PAYMENTRULE_CreditCard, VPaymentFormCreditCard.class);
- s_registeredClasses.put(MInvoice.PAYMENTRULE_DirectDebit, VPaymentFormDirectDebit.class);
- s_registeredClasses.put(MInvoice.PAYMENTRULE_DirectDeposit, VPaymentFormDirectDeposit.class);
- s_registeredClasses.put(MInvoice.PAYMENTRULE_MixedPOSPayment, VPaymentFormMixedPOS.class);
- s_registeredClasses.put(MInvoice.PAYMENTRULE_OnCredit, VPaymentFormOnCredit.class);
+ IPaymentForm form = getPaymentForm(windowNo, mTab, paymentRule);
+ if (form != null)
+ form.init(windowNo, mTab);
+ return form;
}
-
- public static IPaymentForm create (int windowNo, GridTab mTab, String paymentRule)
- {
- IPaymentForm retValue = null;
- Class extends IPaymentForm> cl = s_registeredClasses.get(paymentRule);
- if (cl != null)
- {
- try
- {
- java.lang.reflect.Constructor extends IPaymentForm> ctor = cl.getConstructor(int.class, GridTab.class);
- retValue = ctor.newInstance(windowNo, mTab);
- }
- catch (Throwable e)
- {
- s_log.log(Level.SEVERE, e.getLocalizedMessage(), e);
- return null;
- }
- }
- if (retValue == null)
- {
- s_log.info("Unsupported PaymentRule=" + paymentRule);
- return null;
- }
- return retValue;
- } // create
}
diff --git a/org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormMixedPOS.java b/org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormMixedPOS.java
index 7ad7c2a286..7d9c40932b 100644
--- a/org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormMixedPOS.java
+++ b/org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormMixedPOS.java
@@ -23,8 +23,12 @@ import org.compiere.model.GridTab;
public class VPaymentFormMixedPOS extends PaymentFormMixedPOS {
private VPaymentFormDialog dialog;
- public VPaymentFormMixedPOS(int windowNo, GridTab mTab) {
- super(windowNo, mTab);
+ public VPaymentFormMixedPOS() {
+ super();
+ }
+
+ public void init(int windowNo, GridTab mTab) {
+ super.init(windowNo, mTab);
dialog = new VPaymentFormDialog(this, windowNo);
}
diff --git a/org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormOnCredit.java b/org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormOnCredit.java
index ab622eac38..66a2fa63c5 100644
--- a/org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormOnCredit.java
+++ b/org.adempiere.ui.swing/src/org/compiere/grid/VPaymentFormOnCredit.java
@@ -37,8 +37,12 @@ public class VPaymentFormOnCredit extends PaymentFormOnCredit {
private CLabel pTermLabel = new CLabel();
private CComboBox pTermCombo = new CComboBox();
- public VPaymentFormOnCredit(int windowNo, GridTab mTab) {
- super(windowNo, mTab);
+ public VPaymentFormOnCredit() {
+ super();
+ }
+
+ public void init(int windowNo, GridTab mTab) {
+ super.init(windowNo, mTab);
dialog = new VPaymentFormDialog(this, windowNo);
init();
}
diff --git a/org.adempiere.ui.zk/META-INF/MANIFEST.MF b/org.adempiere.ui.zk/META-INF/MANIFEST.MF
index f678c5be7d..7f02208b05 100644
--- a/org.adempiere.ui.zk/META-INF/MANIFEST.MF
+++ b/org.adempiere.ui.zk/META-INF/MANIFEST.MF
@@ -57,4 +57,4 @@ Bundle-Activator: org.adempiere.webui.WebUIActivator
Eclipse-ExtensibleAPI: true
Eclipse-RegisterBuddy: org.zkoss.zk.library
Web-ContextPath: webui
-Service-Component: OSGI-INF/reportviewerprovider.xml, OSGI-INF/defaultinfofactory.xml, OSGI-INF/defaulteditorfactory.xml, OSGI-INF/jrviewerprovider.xml, OSGI-INF/resourcefinder.xml
+Service-Component: OSGI-INF/reportviewerprovider.xml, OSGI-INF/defaultinfofactory.xml, OSGI-INF/defaulteditorfactory.xml, OSGI-INF/jrviewerprovider.xml, OSGI-INF/resourcefinder.xml, OSGI-INF/paymentformcash.xml, OSGI-INF/paymentformcheck.xml, OSGI-INF/paymentformcreditcard.xml, OSGI-INF/paymentformdirectdebit.xml, OSGI-INF/paymentformdirectdeposit.xml, OSGI-INF/paymentformmixedpos.xml, OSGI-INF/paymentformoncredit.xml
diff --git a/org.adempiere.ui.zk/OSGI-INF/paymentformcash.xml b/org.adempiere.ui.zk/OSGI-INF/paymentformcash.xml
new file mode 100644
index 0000000000..8794742d12
--- /dev/null
+++ b/org.adempiere.ui.zk/OSGI-INF/paymentformcash.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
diff --git a/org.adempiere.ui.zk/OSGI-INF/paymentformcheck.xml b/org.adempiere.ui.zk/OSGI-INF/paymentformcheck.xml
new file mode 100644
index 0000000000..41fee2dfd3
--- /dev/null
+++ b/org.adempiere.ui.zk/OSGI-INF/paymentformcheck.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
diff --git a/org.adempiere.ui.zk/OSGI-INF/paymentformcreditcard.xml b/org.adempiere.ui.zk/OSGI-INF/paymentformcreditcard.xml
new file mode 100644
index 0000000000..32da363cb8
--- /dev/null
+++ b/org.adempiere.ui.zk/OSGI-INF/paymentformcreditcard.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
diff --git a/org.adempiere.ui.zk/OSGI-INF/paymentformdirectdebit.xml b/org.adempiere.ui.zk/OSGI-INF/paymentformdirectdebit.xml
new file mode 100644
index 0000000000..1472755b41
--- /dev/null
+++ b/org.adempiere.ui.zk/OSGI-INF/paymentformdirectdebit.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
diff --git a/org.adempiere.ui.zk/OSGI-INF/paymentformdirectdeposit.xml b/org.adempiere.ui.zk/OSGI-INF/paymentformdirectdeposit.xml
new file mode 100644
index 0000000000..0c6541711f
--- /dev/null
+++ b/org.adempiere.ui.zk/OSGI-INF/paymentformdirectdeposit.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
diff --git a/org.adempiere.ui.zk/OSGI-INF/paymentformmixedpos.xml b/org.adempiere.ui.zk/OSGI-INF/paymentformmixedpos.xml
new file mode 100644
index 0000000000..74bcedf8e1
--- /dev/null
+++ b/org.adempiere.ui.zk/OSGI-INF/paymentformmixedpos.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
diff --git a/org.adempiere.ui.zk/OSGI-INF/paymentformoncredit.xml b/org.adempiere.ui.zk/OSGI-INF/paymentformoncredit.xml
new file mode 100644
index 0000000000..bc0466f507
--- /dev/null
+++ b/org.adempiere.ui.zk/OSGI-INF/paymentformoncredit.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaymentFormCash.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaymentFormCash.java
index 8d6c116236..d3c6288aec 100644
--- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaymentFormCash.java
+++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaymentFormCash.java
@@ -61,8 +61,12 @@ public class WPaymentFormCash extends PaymentFormCash implements EventListener> s_registeredClasses = null;
-
- /**
- * Register custom WPaymentForm* class
- * @param ad_table_id
- * @param cl custom class
- */
- public static final void registerClass(String paymentRule, Class extends IPaymentForm> cl)
+ public static IPaymentForm getPaymentForm(int windowNo, GridTab mTab, String paymentRule)
{
- s_registeredClasses.put(paymentRule, cl);
- s_log.info("Registered PaymentRule="+paymentRule+", Class="+cl);
- }
-
- static
- {
- // Register defaults:
- s_registeredClasses = new HashMap>();
- s_registeredClasses.put(MInvoice.PAYMENTRULE_Cash, WPaymentFormCash.class);
- s_registeredClasses.put(MInvoice.PAYMENTRULE_Check, WPaymentFormCheck.class);
- s_registeredClasses.put(MInvoice.PAYMENTRULE_CreditCard, WPaymentFormCreditCard.class);
- s_registeredClasses.put(MInvoice.PAYMENTRULE_DirectDebit, WPaymentFormDirectDebit.class);
- s_registeredClasses.put(MInvoice.PAYMENTRULE_DirectDeposit, WPaymentFormDirectDeposit.class);
- s_registeredClasses.put(MInvoice.PAYMENTRULE_MixedPOSPayment, WPaymentFormMixedPOS.class);
- s_registeredClasses.put(MInvoice.PAYMENTRULE_OnCredit, WPaymentFormOnCredit.class);
+ ServiceQuery query = new ServiceQuery();
+ query.put("paymentRule", paymentRule);
+ return Service.locator().locate(IPaymentForm.class, query).getService();
}
public static IPaymentForm create(int windowNo, GridTab mTab, String paymentRule)
{
- IPaymentForm retValue = null;
- Class extends IPaymentForm> cl = s_registeredClasses.get(paymentRule);
- if (cl != null)
- {
- try
- {
- java.lang.reflect.Constructor extends IPaymentForm> ctor = cl.getConstructor(int.class, GridTab.class);
- retValue = ctor.newInstance(windowNo, mTab);
- }
- catch (Throwable e)
- {
- s_log.log(Level.SEVERE, e.getLocalizedMessage(), e);
- return null;
- }
- }
- if (retValue == null)
- {
- s_log.info("Unsupported PaymentRule=" + paymentRule);
- return null;
- }
- return retValue;
- } // create
+ IPaymentForm form = getPaymentForm(windowNo, mTab, paymentRule);
+ if (form != null)
+ form.init(windowNo, mTab);
+ return form;
+ }
}
\ No newline at end of file
diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaymentFormMixedPOS.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaymentFormMixedPOS.java
index fafcd5d55a..0c89b69f6c 100644
--- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaymentFormMixedPOS.java
+++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaymentFormMixedPOS.java
@@ -25,8 +25,12 @@ public class WPaymentFormMixedPOS extends PaymentFormMixedPOS {
private WPaymentFormWindow window;
- public WPaymentFormMixedPOS(int windowNo, GridTab mTab) {
- super(windowNo, mTab);
+ public WPaymentFormMixedPOS() {
+ super();
+ }
+
+ public void init(int windowNo, GridTab mTab) {
+ super.init(windowNo, mTab);
window = new WPaymentFormWindow(this, windowNo);
}
diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaymentFormOnCredit.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaymentFormOnCredit.java
index eaa3b8ce4e..c4072c6a86 100644
--- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaymentFormOnCredit.java
+++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaymentFormOnCredit.java
@@ -43,8 +43,12 @@ public class WPaymentFormOnCredit extends PaymentFormOnCredit {
private Label pTermLabel = new Label();
private Listbox pTermCombo = ListboxFactory.newDropdownListbox();
- public WPaymentFormOnCredit(int windowNo, GridTab mTab) {
- super(windowNo, mTab);
+ public WPaymentFormOnCredit() {
+ super();
+ }
+
+ public void init(int windowNo, GridTab mTab) {
+ super.init(windowNo, mTab);
window = new WPaymentFormWindow(this, windowNo);
init();
}
diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WPaymentEditor.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WPaymentEditor.java
index 09c3ad1778..7af2b0ae92 100644
--- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WPaymentEditor.java
+++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WPaymentEditor.java
@@ -311,18 +311,7 @@ public class WPaymentEditor extends WEditor implements ListDataListener {
Events.sendEvent(comp, new Event(ON_SAVE_PAYMENT, comp));
return;
}
- }
-
-// Events.sendEvent(new Event("onSave", this));
-
-// onSave(false, false, new Callback() {
-//
-// @Override
-// public void onCallback(Boolean result) {
-// onRefresh(false, false);
-// }
-//
-// });
+ }
}
}
});
diff --git a/org.adempiere.ui.zk/build.properties b/org.adempiere.ui.zk/build.properties
index 6287f60805..573da2e50e 100644
--- a/org.adempiere.ui.zk/build.properties
+++ b/org.adempiere.ui.zk/build.properties
@@ -1,50 +1,58 @@
-output.. = WEB-INF/classes/
-bin.includes = META-INF/,\
- WEB-INF/,\
- css/,\
- images/,\
- index.zul,\
- js/,\
- theme/,\
- theme.zs,\
- zul/,\
- timeout.zul,\
- plugin.xml,\
- WEB-INF/classes/,\
- WEB-INF/lib/atmosphere-runtime-0.9.jar,\
- WEB-INF/lib/atmosphere-compat-jbossweb-0.9.jar,\
- WEB-INF/lib/atmosphere-compat-tomcat-0.9.jar,\
- WEB-INF/lib/atmosphere-compat-tomcat7-0.9.jar,\
- metainfo/,\
- WEB-INF/lib/calendar.jar,\
- calendar.css,\
- calendar.zul,\
- calendar_mini.zul,\
- divarrow.zul,\
- divtab.zul,\
- OSGI-INF/reportviewerprovider.xml,\
- OSGI-INF/defaultinfofactory.xml,\
- OSGI-INF/defaulteditorfactory.xml,\
- OSGI-INF/jrviewerprovider.xml,\
- OSGI-INF/resourcefinder.xml
-src.includes = WEB-INF/classes/,\
- WEB-INF/tld/,\
- WEB-INF/web.xml,\
- WEB-INF/xsd/,\
- WEB-INF/zk.xml,\
- css/,\
- images/,\
- index.zul,\
- js/,\
- theme/,\
- theme.zs,\
- zul/,\
- metainfo/,\
- calendar.css,\
- calendar.zul,\
- calendar_mini.zul,\
- divarrow.zul,\
- divtab.zul
-source.. = WEB-INF/src/
-bin.excludes = WEB-INF/src/,\
- WEB-INF/web-2.5.xml
+output.. = WEB-INF/classes/
+bin.includes = META-INF/,\
+ WEB-INF/,\
+ css/,\
+ images/,\
+ index.zul,\
+ js/,\
+ theme/,\
+ theme.zs,\
+ zul/,\
+ timeout.zul,\
+ plugin.xml,\
+ WEB-INF/classes/,\
+ WEB-INF/lib/atmosphere-runtime-0.9.jar,\
+ WEB-INF/lib/atmosphere-compat-jbossweb-0.9.jar,\
+ WEB-INF/lib/atmosphere-compat-tomcat-0.9.jar,\
+ WEB-INF/lib/atmosphere-compat-tomcat7-0.9.jar,\
+ metainfo/,\
+ WEB-INF/lib/calendar.jar,\
+ calendar.css,\
+ calendar.zul,\
+ calendar_mini.zul,\
+ divarrow.zul,\
+ divtab.zul,\
+ OSGI-INF/,\
+ OSGI-INF/reportviewerprovider.xml,\
+ OSGI-INF/defaultinfofactory.xml,\
+ OSGI-INF/defaulteditorfactory.xml,\
+ OSGI-INF/jrviewerprovider.xml,\
+ OSGI-INF/resourcefinder.xml,\
+ OSGI-INF/paymentformcash.xml,\
+ OSGI-INF/paymentformcheck.xml,\
+ OSGI-INF/paymentformcreditcard.xml,\
+ OSGI-INF/paymentformdirectdebit.xml,\
+ OSGI-INF/paymentformdirectdeposit.xml,\
+ OSGI-INF/paymentformmixedpos.xml,\
+ OSGI-INF/paymentformoncredit.xml
+src.includes = WEB-INF/classes/,\
+ WEB-INF/tld/,\
+ WEB-INF/web.xml,\
+ WEB-INF/xsd/,\
+ WEB-INF/zk.xml,\
+ css/,\
+ images/,\
+ index.zul,\
+ js/,\
+ theme/,\
+ theme.zs,\
+ zul/,\
+ metainfo/,\
+ calendar.css,\
+ calendar.zul,\
+ calendar_mini.zul,\
+ divarrow.zul,\
+ divtab.zul
+source.. = WEB-INF/src/
+bin.excludes = WEB-INF/src/,\
+ WEB-INF/web-2.5.xml
diff --git a/org.adempiere.ui/src/org/compiere/grid/IPaymentForm.java b/org.adempiere.ui/src/org/compiere/grid/IPaymentForm.java
index 27764f1c91..6a32a9260d 100644
--- a/org.adempiere.ui/src/org/compiere/grid/IPaymentForm.java
+++ b/org.adempiere.ui/src/org/compiere/grid/IPaymentForm.java
@@ -13,9 +13,12 @@
*****************************************************************************/
package org.compiere.grid;
+import org.compiere.model.GridTab;
import org.compiere.model.MBankAccountProcessor;
public interface IPaymentForm {
+
+ public void init(int WindowNo, GridTab mTab);
public boolean dynInit() throws Exception;
diff --git a/org.adempiere.ui/src/org/compiere/grid/PaymentForm.java b/org.adempiere.ui/src/org/compiere/grid/PaymentForm.java
index 6f4df5ae2a..1cd0022996 100644
--- a/org.adempiere.ui/src/org/compiere/grid/PaymentForm.java
+++ b/org.adempiere.ui/src/org/compiere/grid/PaymentForm.java
@@ -77,7 +77,10 @@ public abstract class PaymentForm implements IPaymentForm {
public Hashtable s_Currencies = null;
- public PaymentForm(int WindowNo, GridTab mTab) {
+ public PaymentForm() {
+ }
+
+ public void init(int WindowNo, GridTab mTab) {
m_WindowNo = WindowNo;
m_isSOTrx = "Y".equals(Env.getContext(Env.getCtx(), WindowNo, "IsSOTrx"));
m_mTab = mTab;
diff --git a/org.adempiere.ui/src/org/compiere/grid/PaymentFormCash.java b/org.adempiere.ui/src/org/compiere/grid/PaymentFormCash.java
index cb7afb3df2..5f4f177524 100644
--- a/org.adempiere.ui/src/org/compiere/grid/PaymentFormCash.java
+++ b/org.adempiere.ui/src/org/compiere/grid/PaymentFormCash.java
@@ -57,8 +57,7 @@ public abstract class PaymentFormCash extends PaymentForm {
/** Start CashBook */
public int m_C_CashBook_ID = 0;
- public PaymentFormCash(int WindowNo, GridTab mTab) {
- super(WindowNo, mTab);
+ public PaymentFormCash() {
}
@Override
diff --git a/org.adempiere.ui/src/org/compiere/grid/PaymentFormCheck.java b/org.adempiere.ui/src/org/compiere/grid/PaymentFormCheck.java
index bf30217ec7..f0c82027de 100644
--- a/org.adempiere.ui/src/org/compiere/grid/PaymentFormCheck.java
+++ b/org.adempiere.ui/src/org/compiere/grid/PaymentFormCheck.java
@@ -48,8 +48,7 @@ public abstract class PaymentFormCheck extends PaymentForm {
/** Start Bank Account */
public int m_C_BankAccount_ID = 0;
- public PaymentFormCheck(int WindowNo, GridTab mTab) {
- super(WindowNo, mTab);
+ public PaymentFormCheck() {
}
@Override
diff --git a/org.adempiere.ui/src/org/compiere/grid/PaymentFormCreditCard.java b/org.adempiere.ui/src/org/compiere/grid/PaymentFormCreditCard.java
index 1e287dda86..79ff36ebeb 100644
--- a/org.adempiere.ui/src/org/compiere/grid/PaymentFormCreditCard.java
+++ b/org.adempiere.ui/src/org/compiere/grid/PaymentFormCreditCard.java
@@ -45,8 +45,7 @@ public abstract class PaymentFormCreditCard extends PaymentForm {
/** Start CreditCard */
public String m_CCType = "";
- public PaymentFormCreditCard(int WindowNo, GridTab mTab) {
- super(WindowNo, mTab);
+ public PaymentFormCreditCard() {
}
@Override
diff --git a/org.adempiere.ui/src/org/compiere/grid/PaymentFormDirect.java b/org.adempiere.ui/src/org/compiere/grid/PaymentFormDirect.java
index 0a09e5734d..04a8972433 100644
--- a/org.adempiere.ui/src/org/compiere/grid/PaymentFormDirect.java
+++ b/org.adempiere.ui/src/org/compiere/grid/PaymentFormDirect.java
@@ -45,8 +45,7 @@ public abstract class PaymentFormDirect extends PaymentForm {
public MPayment m_mPayment = null;
public MPayment m_mPaymentOriginal = null;
- public PaymentFormDirect(int WindowNo, GridTab mTab, boolean isDebit) {
- super(WindowNo, mTab);
+ public PaymentFormDirect(boolean isDebit) {
PAYMENTRULE = isDebit ? MInvoice.PAYMENTRULE_DirectDebit : MInvoice.PAYMENTRULE_DirectDeposit;
}
diff --git a/org.adempiere.ui/src/org/compiere/grid/PaymentFormMixedPOS.java b/org.adempiere.ui/src/org/compiere/grid/PaymentFormMixedPOS.java
index 9e86d71fb4..8625fe3e3e 100644
--- a/org.adempiere.ui/src/org/compiere/grid/PaymentFormMixedPOS.java
+++ b/org.adempiere.ui/src/org/compiere/grid/PaymentFormMixedPOS.java
@@ -22,7 +22,6 @@ import org.compiere.model.GridTab;
*/
public abstract class PaymentFormMixedPOS extends PaymentForm {
- public PaymentFormMixedPOS(int WindowNo, GridTab mTab) {
- super(WindowNo, mTab);
+ public PaymentFormMixedPOS() {
}
}
diff --git a/org.adempiere.ui/src/org/compiere/grid/PaymentFormOnCredit.java b/org.adempiere.ui/src/org/compiere/grid/PaymentFormOnCredit.java
index 0f630cbd49..6e9f2d40ab 100644
--- a/org.adempiere.ui/src/org/compiere/grid/PaymentFormOnCredit.java
+++ b/org.adempiere.ui/src/org/compiere/grid/PaymentFormOnCredit.java
@@ -34,8 +34,7 @@ public abstract class PaymentFormOnCredit extends PaymentForm {
/** Start Payment Term */
public int m_C_PaymentTerm_ID = 0;
- public PaymentFormOnCredit(int WindowNo, GridTab mTab) {
- super(WindowNo, mTab);
+ public PaymentFormOnCredit() {
}
@Override