IDEMPIERE-3786 Number of records in detail grid must not be hardcoded
This commit is contained in:
parent
2bfa3f4c38
commit
123eaf0c6f
|
@ -0,0 +1,10 @@
|
||||||
|
SET SQLBLANKLINES ON
|
||||||
|
SET DEFINE OFF
|
||||||
|
|
||||||
|
-- IDEMPIERE-3786 : Number of records in detail grid must not be hardcoded
|
||||||
|
-- Sep 11, 2018 4:29:18 PM CEST
|
||||||
|
INSERT INTO AD_SysConfig (AD_SysConfig_ID,AD_Client_ID,AD_Org_ID,Created,Updated,CreatedBy,UpdatedBy,IsActive,Name,Value,Description,EntityType,ConfigurationLevel,AD_SysConfig_UU) VALUES (200143,0,0,TO_DATE('2018-09-11 16:29:17','YYYY-MM-DD HH24:MI:SS'),TO_DATE('2018-09-11 16:29:17','YYYY-MM-DD HH24:MI:SS'),0,0,'Y','ZK_PAGING_DETAIL_SIZE','10','Default paging size for detail grid view in zk webui','D','C','e4555557-68a2-4b87-a605-4da79de87644')
|
||||||
|
;
|
||||||
|
|
||||||
|
SELECT register_migration_script('201809111630_IDEMPIERE-3786.sql') FROM dual
|
||||||
|
;
|
|
@ -0,0 +1,7 @@
|
||||||
|
-- IDEMPIERE-3786 : Number of records in detail grid must not be hardcoded
|
||||||
|
-- Sep 11, 2018 4:29:18 PM CEST
|
||||||
|
INSERT INTO AD_SysConfig (AD_SysConfig_ID,AD_Client_ID,AD_Org_ID,Created,Updated,CreatedBy,UpdatedBy,IsActive,Name,Value,Description,EntityType,ConfigurationLevel,AD_SysConfig_UU) VALUES (200143,0,0,TO_TIMESTAMP('2018-09-11 16:29:17','YYYY-MM-DD HH24:MI:SS'),TO_TIMESTAMP('2018-09-11 16:29:17','YYYY-MM-DD HH24:MI:SS'),0,0,'Y','ZK_PAGING_DETAIL_SIZE','10','Default paging size for detail grid view in zk webui','D','C','e4555557-68a2-4b87-a605-4da79de87644')
|
||||||
|
;
|
||||||
|
|
||||||
|
SELECT register_migration_script('201809111630_IDEMPIERE-3786.sql') FROM dual
|
||||||
|
;
|
|
@ -42,7 +42,7 @@ public class MSysConfig extends X_AD_SysConfig
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private static final long serialVersionUID = 8623809160538454497L;
|
private static final long serialVersionUID = -1273442365045945366L;
|
||||||
|
|
||||||
public static final String ADDRESS_VALIDATION = "ADDRESS_VALIDATION";
|
public static final String ADDRESS_VALIDATION = "ADDRESS_VALIDATION";
|
||||||
public static final String ALERT_SEND_ATTACHMENT_AS_XLS = "ALERT_SEND_ATTACHMENT_AS_XLS";
|
public static final String ALERT_SEND_ATTACHMENT_AS_XLS = "ALERT_SEND_ATTACHMENT_AS_XLS";
|
||||||
|
@ -175,6 +175,7 @@ public class MSysConfig extends X_AD_SysConfig
|
||||||
public static final String ZK_LOGO_SMALL = "ZK_LOGO_SMALL";
|
public static final String ZK_LOGO_SMALL = "ZK_LOGO_SMALL";
|
||||||
public static final String ZK_MAX_UPLOAD_SIZE = "ZK_MAX_UPLOAD_SIZE";
|
public static final String ZK_MAX_UPLOAD_SIZE = "ZK_MAX_UPLOAD_SIZE";
|
||||||
public static final String ZK_MOBILE_PAGING_SIZE = "ZK_MOBILE_PAGING_SIZE";
|
public static final String ZK_MOBILE_PAGING_SIZE = "ZK_MOBILE_PAGING_SIZE";
|
||||||
|
public static final String ZK_PAGING_DETAIL_SIZE = "ZK_PAGING_DETAIL_SIZE";
|
||||||
public static final String ZK_PAGING_SIZE = "ZK_PAGING_SIZE";
|
public static final String ZK_PAGING_SIZE = "ZK_PAGING_SIZE";
|
||||||
public static final String ZK_REPORT_FORM_OUTPUT_TYPE = "ZK_REPORT_FORM_OUTPUT_TYPE";
|
public static final String ZK_REPORT_FORM_OUTPUT_TYPE = "ZK_REPORT_FORM_OUTPUT_TYPE";
|
||||||
public static final String ZK_REPORT_JASPER_OUTPUT_TYPE = "ZK_REPORT_JASPER_OUTPUT_TYPE";
|
public static final String ZK_REPORT_JASPER_OUTPUT_TYPE = "ZK_REPORT_JASPER_OUTPUT_TYPE";
|
||||||
|
@ -183,8 +184,8 @@ public class MSysConfig extends X_AD_SysConfig
|
||||||
public static final String ZK_ROOT_FOLDER_BROWSER = "ZK_ROOT_FOLDER_BROWSER";
|
public static final String ZK_ROOT_FOLDER_BROWSER = "ZK_ROOT_FOLDER_BROWSER";
|
||||||
public static final String ZK_SEQ_DEFAULT_VALUE_PANEL = "ZK_SEQ_DEFAULT_VALUE_PANEL";
|
public static final String ZK_SEQ_DEFAULT_VALUE_PANEL = "ZK_SEQ_DEFAULT_VALUE_PANEL";
|
||||||
public static final String ZK_SESSION_TIMEOUT_IN_SECONDS = "ZK_SESSION_TIMEOUT_IN_SECONDS";
|
public static final String ZK_SESSION_TIMEOUT_IN_SECONDS = "ZK_SESSION_TIMEOUT_IN_SECONDS";
|
||||||
public static final String ZK_THEME = "ZK_THEME";
|
|
||||||
public static final String ZK_THEME_USE_FONT_ICON_FOR_IMAGE = "ZK_THEME_USE_FONT_ICON_FOR_IMAGE";
|
public static final String ZK_THEME_USE_FONT_ICON_FOR_IMAGE = "ZK_THEME_USE_FONT_ICON_FOR_IMAGE";
|
||||||
|
public static final String ZK_THEME = "ZK_THEME";
|
||||||
public static final String ZOOM_ACROSS_QUERY_TIMEOUT = "ZOOM_ACROSS_QUERY_TIMEOUT";
|
public static final String ZOOM_ACROSS_QUERY_TIMEOUT = "ZOOM_ACROSS_QUERY_TIMEOUT";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -78,7 +78,7 @@ public class GridView extends Vlayout implements EventListener<Event>, IdSpace,
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private static final long serialVersionUID = -2966799998482667434L;
|
private static final long serialVersionUID = 3046157124327495333L;
|
||||||
|
|
||||||
private static final String HEADER_GRID_STYLE = "border: none; margin:0; padding: 0;";
|
private static final String HEADER_GRID_STYLE = "border: none; margin:0; padding: 0;";
|
||||||
|
|
||||||
|
@ -208,11 +208,16 @@ public class GridView extends Vlayout implements EventListener<Event>, IdSpace,
|
||||||
public void setDetailPaneMode(boolean detailPaneMode) {
|
public void setDetailPaneMode(boolean detailPaneMode) {
|
||||||
if (this.detailPaneMode != detailPaneMode) {
|
if (this.detailPaneMode != detailPaneMode) {
|
||||||
this.detailPaneMode = detailPaneMode;
|
this.detailPaneMode = detailPaneMode;
|
||||||
pageSize = detailPaneMode ? DEFAULT_DETAIL_PAGE_SIZE : MSysConfig.getIntValue(MSysConfig.ZK_PAGING_SIZE, 20, Env.getAD_Client_ID(Env.getCtx()));
|
pageSize = detailPaneMode ? getDetailPageSize() : MSysConfig.getIntValue(MSysConfig.ZK_PAGING_SIZE, 20, Env.getAD_Client_ID(Env.getCtx()));
|
||||||
updatePaging();
|
updatePaging();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Returns the number of records to be displayed in detail grid (TODO : manage exceptions defined in SysConfig - see https://idempiere.atlassian.net/browse/IDEMPIERE-3786) */
|
||||||
|
int getDetailPageSize() {
|
||||||
|
return MSysConfig.getIntValue(MSysConfig.ZK_PAGING_DETAIL_SIZE, DEFAULT_DETAIL_PAGE_SIZE, Env.getAD_Client_ID(Env.getCtx()));
|
||||||
|
}
|
||||||
|
|
||||||
public boolean isDetailPaneMode() {
|
public boolean isDetailPaneMode() {
|
||||||
return this.detailPaneMode;
|
return this.detailPaneMode;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue