IDEMPIERE-4011 Define paging size per Info window

This commit is contained in:
Nicolas Micoud 2019-10-16 16:00:58 +02:00
parent a0b5e52daf
commit 123e2074c8
5 changed files with 211 additions and 4 deletions

View File

@ -0,0 +1,90 @@
SET SQLBLANKLINES ON
SET DEFINE OFF
-- IDEMPIERE-4011 Define paging size per Info Window
-- 07/26/2019 12:42:03
INSERT INTO AD_Element (AD_Element_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,ColumnName,Name,PrintName,EntityType,AD_Element_UU) VALUES (203349,0,0,'Y',TO_DATE('2019-07-26 12:42:03','YYYY-MM-DD HH24:MI:SS'),0,TO_DATE('2019-07-26 12:42:03','YYYY-MM-DD HH24:MI:SS'),0,'PagingSize','Paging Size','Paging Size','D','590fb8ad-1c7f-4aaf-b6e2-d1c511915ac0')
;
-- 07/26/2019 12:42:24
INSERT INTO AD_Column (AD_Column_ID,Version,Name,AD_Table_ID,ColumnName,DefaultValue,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsEncrypted,AD_Reference_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsSyncDatabase,IsAlwaysUpdateable,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsAllowCopy,SeqNoSelection,IsToolbarButton,IsSecure,FKConstraintType,IsHtml) VALUES (213968,1,'Paging Size',895,'PagingSize','0',10,'N','N','Y','N','N',0,'N',11,0,0,'Y',TO_DATE('2019-07-26 12:42:23','YYYY-MM-DD HH24:MI:SS'),0,TO_DATE('2019-07-26 12:42:23','YYYY-MM-DD HH24:MI:SS'),0,203349,'Y','N','D','N','N','N','Y','8d207399-bf0e-45a0-a16d-883e723393af','Y',0,'N','N','N','N')
;
-- 07/26/2019 12:42:27
ALTER TABLE AD_InfoWindow ADD PagingSize NUMBER(10) DEFAULT 0 NOT NULL
;
-- 07/26/2019 12:42:47
INSERT INTO AD_Field (AD_Field_ID,Name,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,SeqNo,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsDisplayedGrid,SeqNoGrid,ColumnSpan) VALUES (206137,'Paging Size',842,213968,'Y',10,230,'N','N','N','N',0,0,'Y',TO_DATE('2019-07-26 12:42:46','YYYY-MM-DD HH24:MI:SS'),0,TO_DATE('2019-07-26 12:42:46','YYYY-MM-DD HH24:MI:SS'),0,'N','Y','D','45d5bfce-f42a-4647-a027-4b07d5c8f887','Y',140,2)
;
-- 07/26/2019 12:43:21
UPDATE AD_Field SET IsDisplayed='Y', SeqNo=70, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, XPosition=6, IsToolbarButton=NULL,Updated=TO_DATE('2019-07-26 12:43:21','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Field_ID=201639
;
-- 07/26/2019 12:43:21
UPDATE AD_Field SET SeqNo=80, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2019-07-26 12:43:21','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Field_ID=202197
;
-- 07/26/2019 12:43:21
UPDATE AD_Field SET SeqNo=90, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2019-07-26 12:43:21','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Field_ID=13575
;
-- 07/26/2019 12:43:21
UPDATE AD_Field SET SeqNo=100, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2019-07-26 12:43:21','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Field_ID=13582
;
-- 07/26/2019 12:43:21
UPDATE AD_Field SET SeqNo=110, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2019-07-26 12:43:21','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Field_ID=13581
;
-- 07/26/2019 12:43:21
UPDATE AD_Field SET SeqNo=120, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2019-07-26 12:43:21','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Field_ID=201621
;
-- 07/26/2019 12:43:21
UPDATE AD_Field SET SeqNo=130, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2019-07-26 12:43:21','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Field_ID=13579
;
-- 07/26/2019 12:43:21
UPDATE AD_Field SET SeqNo=140, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2019-07-26 12:43:21','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Field_ID=201634
;
-- 07/26/2019 12:43:21
UPDATE AD_Field SET SeqNo=150, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2019-07-26 12:43:21','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Field_ID=13580
;
-- 07/26/2019 12:43:21
UPDATE AD_Field SET SeqNo=160, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2019-07-26 12:43:21','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Field_ID=201627
;
-- 07/26/2019 12:43:21
UPDATE AD_Field SET SeqNo=170, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2019-07-26 12:43:21','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Field_ID=201628
;
-- 07/26/2019 12:43:21
UPDATE AD_Field SET SeqNo=180, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2019-07-26 12:43:21','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Field_ID=203856
;
-- 07/26/2019 12:43:21
UPDATE AD_Field SET SeqNo=190, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, ColumnSpan=1, IsToolbarButton=NULL,Updated=TO_DATE('2019-07-26 12:43:21','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Field_ID=203024
;
-- 07/26/2019 12:43:21
UPDATE AD_Field SET IsDisplayed='Y', SeqNo=200, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, XPosition=3, ColumnSpan=1, IsToolbarButton=NULL,Updated=TO_DATE('2019-07-26 12:43:21','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Field_ID=206137
;
-- 07/26/2019 12:43:21
UPDATE AD_Field SET SeqNo=210, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2019-07-26 12:43:21','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Field_ID=202198
;
-- 07/26/2019 12:43:21
UPDATE AD_Field SET SeqNo=220, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2019-07-26 12:43:21','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Field_ID=201807
;
-- 07/26/2019 12:43:21
UPDATE AD_Field SET SeqNo=230, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2019-07-26 12:43:21','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Field_ID=202196
;
SELECT register_migration_script('201907261300_IDEMPIERE-4011.sql') FROM dual
;

View File

@ -0,0 +1,87 @@
-- IDEMPIERE-4011 Define paging size per Info Window
-- 07/26/2019 12:42:03
INSERT INTO AD_Element (AD_Element_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,ColumnName,Name,PrintName,EntityType,AD_Element_UU) VALUES (203349,0,0,'Y',TO_TIMESTAMP('2019-07-26 12:42:03','YYYY-MM-DD HH24:MI:SS'),0,TO_TIMESTAMP('2019-07-26 12:42:03','YYYY-MM-DD HH24:MI:SS'),0,'PagingSize','Paging Size','Paging Size','D','590fb8ad-1c7f-4aaf-b6e2-d1c511915ac0')
;
-- 07/26/2019 12:42:24
INSERT INTO AD_Column (AD_Column_ID,Version,Name,AD_Table_ID,ColumnName,DefaultValue,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsEncrypted,AD_Reference_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsSyncDatabase,IsAlwaysUpdateable,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsAllowCopy,SeqNoSelection,IsToolbarButton,IsSecure,FKConstraintType,IsHtml) VALUES (213968,1,'Paging Size',895,'PagingSize','0',10,'N','N','Y','N','N',0,'N',11,0,0,'Y',TO_TIMESTAMP('2019-07-26 12:42:23','YYYY-MM-DD HH24:MI:SS'),0,TO_TIMESTAMP('2019-07-26 12:42:23','YYYY-MM-DD HH24:MI:SS'),0,203349,'Y','N','D','N','N','N','Y','8d207399-bf0e-45a0-a16d-883e723393af','Y',0,'N','N','N','N')
;
-- 07/26/2019 12:42:27
ALTER TABLE AD_InfoWindow ADD COLUMN PagingSize NUMERIC(10) DEFAULT '0' NOT NULL
;
-- 07/26/2019 12:42:47
INSERT INTO AD_Field (AD_Field_ID,Name,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,SeqNo,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsDisplayedGrid,SeqNoGrid,ColumnSpan) VALUES (206137,'Paging Size',842,213968,'Y',10,230,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2019-07-26 12:42:46','YYYY-MM-DD HH24:MI:SS'),0,TO_TIMESTAMP('2019-07-26 12:42:46','YYYY-MM-DD HH24:MI:SS'),0,'N','Y','D','45d5bfce-f42a-4647-a027-4b07d5c8f887','Y',140,2)
;
-- 07/26/2019 12:43:21
UPDATE AD_Field SET IsDisplayed='Y', SeqNo=70, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, XPosition=6, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2019-07-26 12:43:21','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Field_ID=201639
;
-- 07/26/2019 12:43:21
UPDATE AD_Field SET SeqNo=80, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2019-07-26 12:43:21','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Field_ID=202197
;
-- 07/26/2019 12:43:21
UPDATE AD_Field SET SeqNo=90, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2019-07-26 12:43:21','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Field_ID=13575
;
-- 07/26/2019 12:43:21
UPDATE AD_Field SET SeqNo=100, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2019-07-26 12:43:21','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Field_ID=13582
;
-- 07/26/2019 12:43:21
UPDATE AD_Field SET SeqNo=110, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2019-07-26 12:43:21','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Field_ID=13581
;
-- 07/26/2019 12:43:21
UPDATE AD_Field SET SeqNo=120, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2019-07-26 12:43:21','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Field_ID=201621
;
-- 07/26/2019 12:43:21
UPDATE AD_Field SET SeqNo=130, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2019-07-26 12:43:21','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Field_ID=13579
;
-- 07/26/2019 12:43:21
UPDATE AD_Field SET SeqNo=140, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2019-07-26 12:43:21','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Field_ID=201634
;
-- 07/26/2019 12:43:21
UPDATE AD_Field SET SeqNo=150, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2019-07-26 12:43:21','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Field_ID=13580
;
-- 07/26/2019 12:43:21
UPDATE AD_Field SET SeqNo=160, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2019-07-26 12:43:21','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Field_ID=201627
;
-- 07/26/2019 12:43:21
UPDATE AD_Field SET SeqNo=170, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2019-07-26 12:43:21','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Field_ID=201628
;
-- 07/26/2019 12:43:21
UPDATE AD_Field SET SeqNo=180, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2019-07-26 12:43:21','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Field_ID=203856
;
-- 07/26/2019 12:43:21
UPDATE AD_Field SET SeqNo=190, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, ColumnSpan=1, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2019-07-26 12:43:21','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Field_ID=203024
;
-- 07/26/2019 12:43:21
UPDATE AD_Field SET IsDisplayed='Y', SeqNo=200, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, XPosition=3, ColumnSpan=1, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2019-07-26 12:43:21','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Field_ID=206137
;
-- 07/26/2019 12:43:21
UPDATE AD_Field SET SeqNo=210, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2019-07-26 12:43:21','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Field_ID=202198
;
-- 07/26/2019 12:43:21
UPDATE AD_Field SET SeqNo=220, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2019-07-26 12:43:21','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Field_ID=201807
;
-- 07/26/2019 12:43:21
UPDATE AD_Field SET SeqNo=230, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2019-07-26 12:43:21','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Field_ID=202196
;
SELECT register_migration_script('201907261300_IDEMPIERE-4011.sql') FROM dual
;

View File

@ -323,6 +323,15 @@ public interface I_AD_InfoWindow
*/ */
public String getOtherClause(); public String getOtherClause();
/** Column name PagingSize */
public static final String COLUMNNAME_PagingSize = "PagingSize";
/** Set Paging Size */
public void setPagingSize (int PagingSize);
/** Get Paging Size */
public int getPagingSize();
/** Column name Processing */ /** Column name Processing */
public static final String COLUMNNAME_Processing = "Processing"; public static final String COLUMNNAME_Processing = "Processing";

View File

@ -30,7 +30,7 @@ public class X_AD_InfoWindow extends PO implements I_AD_InfoWindow, I_Persistent
/** /**
* *
*/ */
private static final long serialVersionUID = 20190106L; private static final long serialVersionUID = 20190726L;
/** Standard Constructor */ /** Standard Constructor */
public X_AD_InfoWindow (Properties ctx, int AD_InfoWindow_ID, String trxName) public X_AD_InfoWindow (Properties ctx, int AD_InfoWindow_ID, String trxName)
@ -54,6 +54,8 @@ public class X_AD_InfoWindow extends PO implements I_AD_InfoWindow, I_Persistent
setMaxQueryRecords (0); setMaxQueryRecords (0);
// 0 // 0
setName (null); setName (null);
setPagingSize (0);
// 0
} */ } */
} }
@ -462,6 +464,23 @@ public class X_AD_InfoWindow extends PO implements I_AD_InfoWindow, I_Persistent
return (String)get_Value(COLUMNNAME_OtherClause); return (String)get_Value(COLUMNNAME_OtherClause);
} }
/** Set Paging Size.
@param PagingSize Paging Size */
public void setPagingSize (int PagingSize)
{
set_Value (COLUMNNAME_PagingSize, Integer.valueOf(PagingSize));
}
/** Get Paging Size.
@return Paging Size */
public int getPagingSize ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_PagingSize);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set Process Now. /** Set Process Now.
@param Processing Process Now */ @param Processing Process Now */
public void setProcessing (boolean Processing) public void setProcessing (boolean Processing)

View File

@ -123,7 +123,7 @@ public abstract class InfoPanel extends Window implements EventListener<Event>,
/** /**
* *
*/ */
private static final long serialVersionUID = 3761627143274259211L; private static final long serialVersionUID = 7893447773574337316L;
private final static int DEFAULT_PAGE_SIZE = 100; private final static int DEFAULT_PAGE_SIZE = 100;
private final static int DEFAULT_PAGE_PRELOAD = 4; private final static int DEFAULT_PAGE_PRELOAD = 4;
protected List<Button> btProcessList = new ArrayList<Button>(); protected List<Button> btProcessList = new ArrayList<Button>();
@ -254,9 +254,11 @@ public abstract class InfoPanel extends Window implements EventListener<Event>,
if (p_whereClause.length() == 0) if (p_whereClause.length() == 0)
log.log(Level.SEVERE, "Cannot parse context= " + whereClause); log.log(Level.SEVERE, "Cannot parse context= " + whereClause);
} }
pageSize = MSysConfig.getIntValue(MSysConfig.ZK_PAGING_SIZE, DEFAULT_PAGE_SIZE, Env.getAD_Client_ID(Env.getCtx())); pageSize = MSysConfig.getIntValue(MSysConfig.ZK_PAGING_SIZE, DEFAULT_PAGE_SIZE, Env.getAD_Client_ID(Env.getCtx()));
if (infoWindow != null && infoWindow.getPagingSize() > 0)
pageSize = infoWindow.getPagingSize();
init(); init();
this.setAttribute(ITabOnSelectHandler.ATTRIBUTE_KEY, new ITabOnSelectHandler() { this.setAttribute(ITabOnSelectHandler.ATTRIBUTE_KEY, new ITabOnSelectHandler() {