Merge release-7.1 into master

This commit is contained in:
Carlos Ruiz 2020-02-08 13:19:03 +01:00
commit 6ab7fff658
9 changed files with 65 additions and 19 deletions

View File

@ -90,19 +90,20 @@ public class CopyInfoWindowColumns extends SvrProcess
MInfoWindow sourceInfoWindow = new MInfoWindow(getCtx(), p_source_AD_InfoWindow_ID, get_TrxName()); MInfoWindow sourceInfoWindow = new MInfoWindow(getCtx(), p_source_AD_InfoWindow_ID, get_TrxName());
MInfoColumn[] sourceColumns = sourceInfoWindow.getInfoColumns(); MInfoColumn[] sourceColumns = sourceInfoWindow.getInfoColumns();
targetInfoWindow.setIsValidateEachColumn(false);
for (int i = 0; i < sourceColumns.length; i++) 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); PO.copyValues(sourceColumns[i], colTarget);
colTarget.setAD_InfoWindow_ID (targetInfoWindow.getAD_InfoWindow_ID()); colTarget.setAD_InfoWindow_ID (targetInfoWindow.getAD_InfoWindow_ID());
colTarget.setAD_Org_ID(targetInfoWindow.getAD_Org_ID());
colTarget.setEntityType(targetInfoWindow.getEntityType()); colTarget.setEntityType(targetInfoWindow.getEntityType());
colTarget.setIsActive(sourceColumns[i].isActive()); colTarget.setIsActive(sourceColumns[i].isActive());
colTarget.saveEx(get_TrxName()); colTarget.saveEx(get_TrxName());
m_count++; m_count++;
} }
targetInfoWindow.validate();
targetInfoWindow.saveEx();
// //
return "#" + m_count; return "#" + m_count;
} // doIt } // doIt

View File

@ -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 * Stanfard Constructor
@ -65,6 +65,13 @@ public class MInfoColumn extends X_AD_InfoColumn implements IInfoColumn
super (ctx, rs, trxName); super (ctx, rs, trxName);
} // MInfoColumn } // 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 */ /** Parent */
private MInfoWindow m_parent = null; private MInfoWindow m_parent = null;
@ -172,9 +179,9 @@ public class MInfoColumn extends X_AD_InfoColumn implements IInfoColumn
return success; return success;
// evaluate need valid // 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){ if (isNeedValid){
getParent().validate(); getParent().validate();
getParent().saveEx(get_TrxName()); getParent().saveEx(get_TrxName());

View File

@ -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 * Standard Constructor
@ -455,5 +455,19 @@ public class MInfoWindow extends X_AD_InfoWindow
// valid state // valid state
this.setIsValid(true); this.setIsValid(true);
} }
/**
* IDEMPIERE-4167
**/
private boolean m_validateEachColumn = true;
public void setIsValidateEachColumn (boolean validateEachColumn) {
m_validateEachColumn= validateEachColumn;
}
boolean isValidateEachColumn() {
return m_validateEachColumn;
}
} // MInfoWindow } // MInfoWindow

View File

@ -189,10 +189,20 @@ public class PoFiller{
foreignTable = MTable.get(Env.getCtx(), refTableName); foreignTable = MTable.get(Env.getCtx(), refTableName);
} else { } else {
if ("Record_ID".equalsIgnoreCase(columnName)) { if ("Record_ID".equalsIgnoreCase(columnName)) {
// special case - get the foreign table using column AD_Table_ID // special case - get the foreign table using AD_Table_ID
int idxTableID = po.get_ColumnIndex("AD_Table_ID"); int tableID = 0;
if (idxTableID >= 0) { try {
int tableID = po.get_ValueAsInt(idxTableID); // 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); foreignTable = MTable.get(Env.getCtx(), tableID);
refTableName = foreignTable.getTableName(); refTableName = foreignTable.getTableName();
} }

View File

@ -9,7 +9,7 @@
<launcherArgs> <launcherArgs>
<programArgs>-console <programArgs>-console
</programArgs> </programArgs>
<vmArgs>--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 <vmArgs>--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
</vmArgs> </vmArgs>
<vmArgsMac>-XstartOnFirstThread -Dorg.eclipse.swt.internal.carbon.smallFonts <vmArgsMac>-XstartOnFirstThread -Dorg.eclipse.swt.internal.carbon.smallFonts
</vmArgsMac> </vmArgsMac>
@ -68,11 +68,12 @@
<plugin id="org.mortbay.jasper.apache-jsp" autoStart="true" startLevel="0" /> <plugin id="org.mortbay.jasper.apache-jsp" autoStart="true" startLevel="0" />
<property name="org.eclipse.update.reconcile" value="false" /> <property name="org.eclipse.update.reconcile" value="false" />
<property name="osgi.instance.area.default" value="@config.dir/../workspace" /> <property name="osgi.instance.area.default" value="@config.dir/../workspace" />
<property name="osgi.compatibility.bootdelegation" value="true" />
<property name="osgi.console.enable.builtin" value="false" />
<property name="eclipse.product" value="org.adempiere.server.product" /> <property name="eclipse.product" value="org.adempiere.server.product" />
<property name="osgi.framework.activeThreadType" value="normal" />
<property name="org.eclipse.equinox.simpleconfigurator.exclusiveInstallation" value="false" /> <property name="org.eclipse.equinox.simpleconfigurator.exclusiveInstallation" value="false" />
<property name="osgi.checkConfiguration" value="true" />
<property name="osgi.console.enable.builtin" value="false" />
<property name="osgi.framework.activeThreadType" value="normal" />
<property name="osgi.compatibility.bootdelegation" value="true" />
<property name="osgi.noShutdown" value="true" /> <property name="osgi.noShutdown" value="true" />
</configurations> </configurations>

View File

@ -1500,7 +1500,7 @@ DataStatusListener, IADTabpanel, IdSpace, IFieldEditorContainer
listPanel.dynamicDisplay(col); listPanel.dynamicDisplay(col);
if (GridTable.DATA_REFRESH_MESSAGE.equals(e.getAD_Message()) || if (GridTable.DATA_REFRESH_MESSAGE.equals(e.getAD_Message()) ||
"Sorted".equals(e.getAD_Message())) { "Sorted".equals(e.getAD_Message())) {
Clients.resize(listPanel.getListbox()); listPanel.getListbox().invalidate();
} }
} }
} }

View File

@ -124,6 +124,7 @@ import org.zkoss.zul.Columns;
import org.zkoss.zul.Div; import org.zkoss.zul.Div;
import org.zkoss.zul.Menuitem; import org.zkoss.zul.Menuitem;
import org.zkoss.zul.Menupopup; import org.zkoss.zul.Menupopup;
import org.zkoss.zul.RowRenderer;
import org.zkoss.zul.Window.Mode; 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); focusToTabpanel(dirtyTabpanel);
//ensure row indicator is not lost
RowRenderer<Object[]> renderer = dirtyTabpanel.getGridView().getListbox().getRowRenderer();
GridTabRowRenderer gtr = (GridTabRowRenderer)renderer;
org.zkoss.zul.Row row = gtr.getCurrentRow();
if (row != null)
gtr.setCurrentRow(row);
}
else else
focusToActivePanel(); focusToActivePanel();
updateToolbar(); updateToolbar();
if (postCallback != null) if (postCallback != null)

View File

@ -587,6 +587,11 @@ public class GridTabRowRenderer implements RowRenderer<Object[]>, RowRendererExt
if (isActive != null && !isActive.booleanValue()) { if (isActive != null && !isActive.booleanValue()) {
LayoutUtils.addSclass("grid-inactive-row", row); 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();
}
} }

View File

@ -9,7 +9,7 @@
<launcherArgs> <launcherArgs>
<programArgs>-console <programArgs>-console
</programArgs> </programArgs>
<vmArgs>--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 <vmArgs>--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
</vmArgs> </vmArgs>
<vmArgsMac>-XstartOnFirstThread -Dorg.eclipse.swt.internal.carbon.smallFonts <vmArgsMac>-XstartOnFirstThread -Dorg.eclipse.swt.internal.carbon.smallFonts
</vmArgsMac> </vmArgsMac>