From 118436d934f61a21160c0b1d2fd232c506593d92 Mon Sep 17 00:00:00 2001 From: Heng Sin Low Date: Fri, 4 Jul 2014 13:52:18 +0800 Subject: [PATCH 01/36] IDEMPIERE-2041 Scrolling lag when paging size > 50. Fixed NPE ( listbox.getRows() == null ). --- .../WEB-INF/src/org/adempiere/webui/adwindow/GridView.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/GridView.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/GridView.java index 22dea5acee..b13954748e 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/GridView.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/GridView.java @@ -31,6 +31,7 @@ import org.adempiere.webui.component.Columns; import org.adempiere.webui.component.EditorBox; import org.adempiere.webui.component.Grid; import org.adempiere.webui.component.NumberBox; +import org.adempiere.webui.component.Rows; import org.adempiere.webui.editor.WEditor; import org.adempiere.webui.util.SortComparator; import org.compiere.model.GridField; @@ -597,8 +598,10 @@ public class GridView extends Vbox implements EventListener, IdSpace, IFi if (pageSize > 0 && paging != null) renderer.setPaging(paging); - listbox.setRowRenderer(renderer); listbox.setModel(listModel); + if (listbox.getRows() == null) + listbox.appendChild(new Rows()); + listbox.setRowRenderer(renderer); } /** From 93bf1a85a6561b8038f3f1fcd1af120e396ac0df Mon Sep 17 00:00:00 2001 From: Heng Sin Low Date: Fri, 4 Jul 2014 20:38:08 +0800 Subject: [PATCH 02/36] IDEMPIERE-2043 DB.To_Char: Formatting for display type Date not implemented for PostgreSQL --- .../src/org/compiere/db/DB_PostgreSQL.java | 21 +++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/org.compiere.db.postgresql.provider/src/org/compiere/db/DB_PostgreSQL.java b/org.compiere.db.postgresql.provider/src/org/compiere/db/DB_PostgreSQL.java index 0d71c429bf..05c7113916 100755 --- a/org.compiere.db.postgresql.provider/src/org/compiere/db/DB_PostgreSQL.java +++ b/org.compiere.db.postgresql.provider/src/org/compiere/db/DB_PostgreSQL.java @@ -51,6 +51,7 @@ import org.compiere.util.CLogger; import org.compiere.util.DB; import org.compiere.util.DisplayType; import org.compiere.util.Ini; +import org.compiere.util.Language; import org.compiere.util.Trx; import org.compiere.util.Util; import org.jfree.io.IOUtils; @@ -440,10 +441,19 @@ public class DB_PostgreSQL implements AdempiereDatabase **/ public String TO_CHAR (String columnName, int displayType, String AD_Language) { - StringBuilder retValue = new StringBuilder("CAST ("); - retValue.append(columnName); - retValue.append(" AS Text)"); - + StringBuilder retValue = null; + if (DisplayType.isDate(displayType)) { + retValue = new StringBuilder("TO_CHAR("); + retValue.append(columnName) + .append(",'") + .append(Language.getLanguage(AD_Language).getDBdatePattern()) + .append("')"); + } else { + retValue = new StringBuilder("CAST ("); + retValue.append(columnName); + retValue.append(" AS Text)"); + } + return retValue.toString(); // Numbers /* if (DisplayType.isNumeric(displayType)) @@ -462,8 +472,7 @@ public class DB_PostgreSQL implements AdempiereDatabase .append("'"); } retValue.append(")"); - //*/ - return retValue.toString(); + //*/ } // TO_CHAR /** From 09eba7b15ba0e35864ee3e72a4342b35a932b741 Mon Sep 17 00:00:00 2001 From: Heng Sin Low Date: Fri, 4 Jul 2014 20:52:26 +0800 Subject: [PATCH 03/36] IDEMPIERE-1988 Info Window - remove hardcoded default pagination. --- .../org/adempiere/webui/panel/InfoPanel.java | 21 ++++++++++++------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoPanel.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoPanel.java index b0b7ca5dc0..2fb2642637 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoPanel.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoPanel.java @@ -62,6 +62,7 @@ import org.compiere.model.MInfoWindow; import org.compiere.model.MPInstance; import org.compiere.model.MProcess; import org.compiere.model.MRole; +import org.compiere.model.MSysConfig; import org.compiere.model.MTable; import org.compiere.model.X_AD_CtxHelp; import org.compiere.process.ProcessInfo; @@ -107,13 +108,14 @@ public abstract class InfoPanel extends Window implements EventListener, */ private static final long serialVersionUID = -6885406231649824253L; - private final static int PAGE_SIZE = 100; + private final static int DEFAULT_PAGE_SIZE = 100; protected List