From 2c084ac9da63aee1a75dc0e7a9f9360ce554b82b Mon Sep 17 00:00:00 2001 From: hengsin Date: Tue, 4 Feb 2020 15:35:01 +0800 Subject: [PATCH 1/5] IDEMPIERE-4164 idempiere binary doesn't start. Fix vmArgs in server.product --- org.adempiere.server-feature/server.product | 9 +++++---- org.idempiere.p2/server.product | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/org.adempiere.server-feature/server.product b/org.adempiere.server-feature/server.product index 1e0c7c0dfe..4784820573 100644 --- a/org.adempiere.server-feature/server.product +++ b/org.adempiere.server-feature/server.product @@ -9,7 +9,7 @@ -console - --add-modules java.se --add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.nio=ALL-UNNAMED --add-opens java.base/sun.nio.ch=ALL-UNNAMED --add-opens java.management/sun.management=ALL-UNNAMED --add-opens jdk.management/com.sun.management.internal=ALL-UNNAMED --add-exports java.base/jdk.internal.ref=ALL-UNNAMED --add-exports java.desktop/sun.awt=ALL-UNNAMED --add-exports java.sql.rowset/com.sun.rowset=ALL-UNNAMED --add-exports java.naming/com.sun.jndi.ldap=ALL-UNNAMED -Declipse.product=org.adempiere.server.product -Dosgi.noShutdown=true -Dosgi.framework.activeThreadType=normal -Dorg.osgi.framework.bootdelegation=sun.security.ssl,org.w3c.dom.events -Dosgi.compatibility.bootdelegation=true -Djetty.home=jettyhome -Djetty.etc.config.urls=etc/jetty.xml,etc/jetty-deployer.xml,etc/jetty-ssl.xml,etc/jetty-ssl-context.xml,etc/jetty-http.xml,etc/jetty-https.xml -Dmail.mime.encodefilename=true -Dmail.mime.decodefilename=true -Dmail.mime.encodeparameters=true -Dmail.mime.decodeparameters=true -Dhazelcast.config=hazelcast.xml -Dorg.zkoss.zk.config.path=file://${workspace_loc}/zk.xml + --add-modules=java.se --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.nio=ALL-UNNAMED --add-opens=java.base/sun.nio.ch=ALL-UNNAMED --add-opens=java.management/sun.management=ALL-UNNAMED --add-opens=jdk.management/com.sun.management.internal=ALL-UNNAMED --add-exports=java.base/jdk.internal.ref=ALL-UNNAMED --add-exports=java.desktop/sun.awt=ALL-UNNAMED --add-exports=java.sql.rowset/com.sun.rowset=ALL-UNNAMED --add-exports=java.naming/com.sun.jndi.ldap=ALL-UNNAMED -Declipse.product=org.adempiere.server.product -Dosgi.noShutdown=true -Dosgi.framework.activeThreadType=normal -Dorg.osgi.framework.bootdelegation=sun.security.ssl,org.w3c.dom.events -Dosgi.compatibility.bootdelegation=true -Djetty.home=jettyhome -Djetty.etc.config.urls=etc/jetty.xml,etc/jetty-deployer.xml,etc/jetty-ssl.xml,etc/jetty-ssl-context.xml,etc/jetty-http.xml,etc/jetty-https.xml -Dmail.mime.encodefilename=true -Dmail.mime.decodefilename=true -Dmail.mime.encodeparameters=true -Dmail.mime.decodeparameters=true -Dhazelcast.config=hazelcast.xml -Dorg.zkoss.zk.config.path=file://${workspace_loc}/zk.xml -XstartOnFirstThread -Dorg.eclipse.swt.internal.carbon.smallFonts @@ -69,11 +69,12 @@ - - - + + + + diff --git a/org.idempiere.p2/server.product b/org.idempiere.p2/server.product index ace4f211ef..4784820573 100644 --- a/org.idempiere.p2/server.product +++ b/org.idempiere.p2/server.product @@ -9,7 +9,7 @@ -console - --add-modules java.se --add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.nio=ALL-UNNAMED --add-opens java.base/sun.nio.ch=ALL-UNNAMED --add-opens java.management/sun.management=ALL-UNNAMED --add-opens jdk.management/com.sun.management.internal=ALL-UNNAMED --add-exports java.base/jdk.internal.ref=ALL-UNNAMED --add-exports java.desktop/sun.awt=ALL-UNNAMED --add-exports java.sql.rowset/com.sun.rowset=ALL-UNNAMED --add-exports java.naming/com.sun.jndi.ldap=ALL-UNNAMED -Declipse.product=org.adempiere.server.product -Dosgi.noShutdown=true -Dosgi.framework.activeThreadType=normal -Dorg.osgi.framework.bootdelegation=sun.security.ssl,org.w3c.dom.events -Dosgi.compatibility.bootdelegation=true -Djetty.home=jettyhome -Djetty.etc.config.urls=etc/jetty.xml,etc/jetty-deployer.xml,etc/jetty-ssl.xml,etc/jetty-ssl-context.xml,etc/jetty-http.xml,etc/jetty-https.xml -Dmail.mime.encodefilename=true -Dmail.mime.decodefilename=true -Dmail.mime.encodeparameters=true -Dmail.mime.decodeparameters=true -Dhazelcast.config=hazelcast.xml -Dorg.zkoss.zk.config.path=file://${workspace_loc}/zk.xml + --add-modules=java.se --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.nio=ALL-UNNAMED --add-opens=java.base/sun.nio.ch=ALL-UNNAMED --add-opens=java.management/sun.management=ALL-UNNAMED --add-opens=jdk.management/com.sun.management.internal=ALL-UNNAMED --add-exports=java.base/jdk.internal.ref=ALL-UNNAMED --add-exports=java.desktop/sun.awt=ALL-UNNAMED --add-exports=java.sql.rowset/com.sun.rowset=ALL-UNNAMED --add-exports=java.naming/com.sun.jndi.ldap=ALL-UNNAMED -Declipse.product=org.adempiere.server.product -Dosgi.noShutdown=true -Dosgi.framework.activeThreadType=normal -Dorg.osgi.framework.bootdelegation=sun.security.ssl,org.w3c.dom.events -Dosgi.compatibility.bootdelegation=true -Djetty.home=jettyhome -Djetty.etc.config.urls=etc/jetty.xml,etc/jetty-deployer.xml,etc/jetty-ssl.xml,etc/jetty-ssl-context.xml,etc/jetty-http.xml,etc/jetty-https.xml -Dmail.mime.encodefilename=true -Dmail.mime.decodefilename=true -Dmail.mime.encodeparameters=true -Dmail.mime.decodeparameters=true -Dhazelcast.config=hazelcast.xml -Dorg.zkoss.zk.config.path=file://${workspace_loc}/zk.xml -XstartOnFirstThread -Dorg.eclipse.swt.internal.carbon.smallFonts From c87223e5c9b54fa7ea323ec424c4b78647813efb Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Wed, 5 Feb 2020 22:38:02 +0100 Subject: [PATCH 2/5] IDEMPIERE-4167 Can't use Copy Info Window columns process with an Order By clause --- .../compiere/process/CopyInfoWindowColumns.java | 6 +++--- .../src/org/compiere/model/MInfoColumn.java | 13 ++++++++++--- .../src/org/compiere/model/MInfoWindow.java | 16 +++++++++++++++- 3 files changed, 28 insertions(+), 7 deletions(-) diff --git a/org.adempiere.base.process/src/org/compiere/process/CopyInfoWindowColumns.java b/org.adempiere.base.process/src/org/compiere/process/CopyInfoWindowColumns.java index c1242cc8af..3a0734de25 100644 --- a/org.adempiere.base.process/src/org/compiere/process/CopyInfoWindowColumns.java +++ b/org.adempiere.base.process/src/org/compiere/process/CopyInfoWindowColumns.java @@ -90,19 +90,19 @@ public class CopyInfoWindowColumns extends SvrProcess MInfoWindow sourceInfoWindow = new MInfoWindow(getCtx(), p_source_AD_InfoWindow_ID, get_TrxName()); MInfoColumn[] sourceColumns = sourceInfoWindow.getInfoColumns(); + targetInfoWindow.setIsValidateEachColumn(false); for (int i = 0; i < sourceColumns.length; i++) { - MInfoColumn colTarget = new MInfoColumn(getCtx(),0, get_TrxName()); + MInfoColumn colTarget = new MInfoColumn(targetInfoWindow); PO.copyValues(sourceColumns[i], colTarget); colTarget.setAD_InfoWindow_ID (targetInfoWindow.getAD_InfoWindow_ID()); - colTarget.setAD_Org_ID(targetInfoWindow.getAD_Org_ID()); colTarget.setEntityType(targetInfoWindow.getEntityType()); colTarget.setIsActive(sourceColumns[i].isActive()); colTarget.saveEx(get_TrxName()); m_count++; } - + targetInfoWindow.validate(); // return "#" + m_count; } // doIt diff --git a/org.adempiere.base/src/org/compiere/model/MInfoColumn.java b/org.adempiere.base/src/org/compiere/model/MInfoColumn.java index 92f42b6a1a..b309d119b4 100644 --- a/org.adempiere.base/src/org/compiere/model/MInfoColumn.java +++ b/org.adempiere.base/src/org/compiere/model/MInfoColumn.java @@ -41,7 +41,7 @@ public class MInfoColumn extends X_AD_InfoColumn implements IInfoColumn /** * */ - private static final long serialVersionUID = 9198213211937136870L; + private static final long serialVersionUID = -6313260451237775302L; /** * Stanfard Constructor @@ -65,6 +65,13 @@ public class MInfoColumn extends X_AD_InfoColumn implements IInfoColumn super (ctx, rs, trxName); } // MInfoColumn + public MInfoColumn(MInfoWindow targetInfoWindow) { + this(targetInfoWindow.getCtx(), 0, targetInfoWindow.get_TrxName()); + m_parent = targetInfoWindow; + this.setAD_InfoWindow_ID (targetInfoWindow.getAD_InfoWindow_ID()); + this.setEntityType(targetInfoWindow.getEntityType()); + } + /** Parent */ private MInfoWindow m_parent = null; @@ -172,9 +179,9 @@ public class MInfoColumn extends X_AD_InfoColumn implements IInfoColumn return success; // evaluate need valid - boolean isNeedValid = newRecord || is_ValueChanged (MInfoColumn.COLUMNNAME_SelectClause); + boolean isNeedValid = getParent().isValidateEachColumn() && (newRecord || is_ValueChanged (MInfoColumn.COLUMNNAME_SelectClause)); - // call valid of parrent + // call valid of parent if (isNeedValid){ getParent().validate(); getParent().saveEx(get_TrxName()); diff --git a/org.adempiere.base/src/org/compiere/model/MInfoWindow.java b/org.adempiere.base/src/org/compiere/model/MInfoWindow.java index 04b00c79e3..41179d2bc0 100644 --- a/org.adempiere.base/src/org/compiere/model/MInfoWindow.java +++ b/org.adempiere.base/src/org/compiere/model/MInfoWindow.java @@ -43,7 +43,7 @@ public class MInfoWindow extends X_AD_InfoWindow /** * */ - private static final long serialVersionUID = -3627504150648422756L; + private static final long serialVersionUID = -1619434756919905441L; /** * Standard Constructor @@ -455,5 +455,19 @@ public class MInfoWindow extends X_AD_InfoWindow // valid state this.setIsValid(true); } + + /** + * IDEMPIERE-4167 + **/ + private boolean m_validateEachColumn = true; + + public void setIsValidateEachColumn (boolean validateEachColumn) { + m_validateEachColumn= validateEachColumn; + } + + boolean isValidateEachColumn() { + return m_validateEachColumn; + } + } // MInfoWindow From 3ed3ca4761b5d2f96a896cf8bd197d3291a972ea Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Thu, 6 Feb 2020 12:37:05 +0100 Subject: [PATCH 3/5] IDEMPIERE-4167 Can't use Copy Info Window columns process with an Order By clause - add suggestion from Nicolas to save the valid status --- .../src/org/compiere/process/CopyInfoWindowColumns.java | 1 + 1 file changed, 1 insertion(+) diff --git a/org.adempiere.base.process/src/org/compiere/process/CopyInfoWindowColumns.java b/org.adempiere.base.process/src/org/compiere/process/CopyInfoWindowColumns.java index 3a0734de25..90a641cd99 100644 --- a/org.adempiere.base.process/src/org/compiere/process/CopyInfoWindowColumns.java +++ b/org.adempiere.base.process/src/org/compiere/process/CopyInfoWindowColumns.java @@ -103,6 +103,7 @@ public class CopyInfoWindowColumns extends SvrProcess m_count++; } targetInfoWindow.validate(); + targetInfoWindow.saveEx(); // return "#" + m_count; } // doIt From 63ce461862b20ea0f0497347b680c7515043b8e4 Mon Sep 17 00:00:00 2001 From: Diego Ruiz Date: Sat, 8 Feb 2020 11:22:38 +0100 Subject: [PATCH 4/5] IDEMPIERE-4165 Display issue in grid mode after grid toggle --- .../src/org/adempiere/webui/adwindow/ADTabpanel.java | 2 +- .../webui/adwindow/AbstractADWindowContent.java | 12 ++++++++++-- .../adempiere/webui/adwindow/GridTabRowRenderer.java | 5 +++++ 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/ADTabpanel.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/ADTabpanel.java index a1b3ce67f1..3224c1c5cc 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/ADTabpanel.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/ADTabpanel.java @@ -1500,7 +1500,7 @@ DataStatusListener, IADTabpanel, IdSpace, IFieldEditorContainer listPanel.dynamicDisplay(col); if (GridTable.DATA_REFRESH_MESSAGE.equals(e.getAD_Message()) || "Sorted".equals(e.getAD_Message())) { - Clients.resize(listPanel.getListbox()); + listPanel.getListbox().invalidate(); } } } diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/AbstractADWindowContent.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/AbstractADWindowContent.java index 3eb3a2106d..ea38b7dbdc 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/AbstractADWindowContent.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/AbstractADWindowContent.java @@ -124,6 +124,7 @@ import org.zkoss.zul.Columns; import org.zkoss.zul.Div; import org.zkoss.zul.Menuitem; import org.zkoss.zul.Menupopup; +import org.zkoss.zul.RowRenderer; import org.zkoss.zul.Window.Mode; /** @@ -2152,11 +2153,18 @@ public abstract class AbstractADWindowContent extends AbstractUIPart implements } } - if (dirtyTabpanel != null) + if (dirtyTabpanel != null) { focusToTabpanel(dirtyTabpanel); + //ensure row indicator is not lost + RowRenderer renderer = dirtyTabpanel.getGridView().getListbox().getRowRenderer(); + GridTabRowRenderer gtr = (GridTabRowRenderer)renderer; + org.zkoss.zul.Row row = gtr.getCurrentRow(); + if (row != null) + gtr.setCurrentRow(row); + } else focusToActivePanel(); - + updateToolbar(); if (postCallback != null) diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/GridTabRowRenderer.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/GridTabRowRenderer.java index b301e96083..c5630f345f 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/GridTabRowRenderer.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/GridTabRowRenderer.java @@ -587,6 +587,11 @@ public class GridTabRowRenderer implements RowRenderer, RowRendererExt if (isActive != null && !isActive.booleanValue()) { LayoutUtils.addSclass("grid-inactive-row", row); } + + //IDEMPIERE-4165 After adding a new row to the list (New or copy) repaint the grid when rendering the last row + if (gridTab.isNew() && rowIndex == grid.getRows().getChildren().size()-1) { + grid.invalidate(); + } } From 70bb9041d29b21e7e1f38a1f1b97fd12572dc7b0 Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Sat, 8 Feb 2020 13:16:03 +0100 Subject: [PATCH 5/5] IDEMPIERE-4169 Unresolved elements of 'Record_ID' in AttachmentElementHandler --- .../src/org/adempiere/pipo2/PoFiller.java | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/org.adempiere.pipo/src/org/adempiere/pipo2/PoFiller.java b/org.adempiere.pipo/src/org/adempiere/pipo2/PoFiller.java index db248bc2f0..3688c9e120 100644 --- a/org.adempiere.pipo/src/org/adempiere/pipo2/PoFiller.java +++ b/org.adempiere.pipo/src/org/adempiere/pipo2/PoFiller.java @@ -189,10 +189,20 @@ public class PoFiller{ foreignTable = MTable.get(Env.getCtx(), refTableName); } else { if ("Record_ID".equalsIgnoreCase(columnName)) { - // special case - get the foreign table using column AD_Table_ID - int idxTableID = po.get_ColumnIndex("AD_Table_ID"); - if (idxTableID >= 0) { - int tableID = po.get_ValueAsInt(idxTableID); + // special case - get the foreign table using AD_Table_ID + int tableID = 0; + try { + // try it first from the XML element, is possible that the table is still not filled in the po object + tableID = Integer.parseInt(e.parent.properties.get("AD_Table_ID").contents.toString()); + } catch (Exception e1) {} + if (tableID == 0) { + // XML didn't work, try the po object + int idxTableID = po.get_ColumnIndex("AD_Table_ID"); + if (idxTableID >= 0) { + tableID = po.get_ValueAsInt(idxTableID); + } + } + if (tableID > 0) { foreignTable = MTable.get(Env.getCtx(), tableID); refTableName = foreignTable.getTableName(); }