IDEMPIERE-5706 Improvements to Tab Editor in Window Customization (#1817)
This commit is contained in:
parent
be245e0767
commit
1fb4248ab9
|
@ -0,0 +1,18 @@
|
||||||
|
-- IDEMPIERE-5706 Improvements to Tab Editor in Window Customization
|
||||||
|
SELECT register_migration_script('202305011505_IDEMPIERE-5706.sql') FROM dual;
|
||||||
|
|
||||||
|
SET SQLBLANKLINES ON
|
||||||
|
SET DEFINE OFF
|
||||||
|
|
||||||
|
-- May 1, 2023, 3:05:28 PM CEST
|
||||||
|
INSERT INTO AD_FieldGroup (AD_FieldGroup_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,Name,EntityType,IsCollapsedByDefault,AD_FieldGroup_UU) VALUES (200031,0,0,'Y',TO_TIMESTAMP('2023-05-01 15:05:27','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2023-05-01 15:05:27','YYYY-MM-DD HH24:MI:SS'),100,'( None )','D','N','b447882e-593a-4e5e-9491-a499e2edf11b')
|
||||||
|
;
|
||||||
|
|
||||||
|
-- May 1, 2023, 3:12:43 PM CEST
|
||||||
|
INSERT INTO AD_Ref_List (AD_Ref_List_ID,Name,AD_Reference_ID,Value,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,EntityType,AD_Ref_List_UU) VALUES (200636,'Do Nothing',53000,'D',0,0,'Y',TO_TIMESTAMP('2023-05-01 15:12:43','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2023-05-01 15:12:43','YYYY-MM-DD HH24:MI:SS'),100,'D','5621157f-37ae-4134-95b2-65a957b258a7')
|
||||||
|
;
|
||||||
|
|
||||||
|
-- May 1, 2023, 3:26:21 PM CEST
|
||||||
|
UPDATE AD_FieldGroup SET FieldGroupType='D',Updated=TO_TIMESTAMP('2023-05-01 15:26:21','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_FieldGroup_ID=200031
|
||||||
|
;
|
||||||
|
|
|
@ -0,0 +1,15 @@
|
||||||
|
-- IDEMPIERE-5706 Improvements to Tab Editor in Window Customization
|
||||||
|
SELECT register_migration_script('202305011505_IDEMPIERE-5706.sql') FROM dual;
|
||||||
|
|
||||||
|
-- May 1, 2023, 3:05:28 PM CEST
|
||||||
|
INSERT INTO AD_FieldGroup (AD_FieldGroup_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,Name,EntityType,IsCollapsedByDefault,AD_FieldGroup_UU) VALUES (200031,0,0,'Y',TO_TIMESTAMP('2023-05-01 15:05:27','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2023-05-01 15:05:27','YYYY-MM-DD HH24:MI:SS'),100,'( None )','D','N','b447882e-593a-4e5e-9491-a499e2edf11b')
|
||||||
|
;
|
||||||
|
|
||||||
|
-- May 1, 2023, 3:12:43 PM CEST
|
||||||
|
INSERT INTO AD_Ref_List (AD_Ref_List_ID,Name,AD_Reference_ID,Value,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,EntityType,AD_Ref_List_UU) VALUES (200636,'Do Nothing',53000,'D',0,0,'Y',TO_TIMESTAMP('2023-05-01 15:12:43','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2023-05-01 15:12:43','YYYY-MM-DD HH24:MI:SS'),100,'D','5621157f-37ae-4134-95b2-65a957b258a7')
|
||||||
|
;
|
||||||
|
|
||||||
|
-- May 1, 2023, 3:26:21 PM CEST
|
||||||
|
UPDATE AD_FieldGroup SET FieldGroupType='D',Updated=TO_TIMESTAMP('2023-05-01 15:26:21','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_FieldGroup_ID=200031
|
||||||
|
;
|
||||||
|
|
|
@ -31,7 +31,7 @@ public class X_AD_FieldGroup extends PO implements I_AD_FieldGroup, I_Persistent
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private static final long serialVersionUID = 20230409L;
|
private static final long serialVersionUID = 20230501L;
|
||||||
|
|
||||||
/** Standard Constructor */
|
/** Standard Constructor */
|
||||||
public X_AD_FieldGroup (Properties ctx, int AD_FieldGroup_ID, String trxName)
|
public X_AD_FieldGroup (Properties ctx, int AD_FieldGroup_ID, String trxName)
|
||||||
|
@ -173,6 +173,8 @@ public class X_AD_FieldGroup extends PO implements I_AD_FieldGroup, I_Persistent
|
||||||
public static final int FIELDGROUPTYPE_AD_Reference_ID=53000;
|
public static final int FIELDGROUPTYPE_AD_Reference_ID=53000;
|
||||||
/** Collapse = C */
|
/** Collapse = C */
|
||||||
public static final String FIELDGROUPTYPE_Collapse = "C";
|
public static final String FIELDGROUPTYPE_Collapse = "C";
|
||||||
|
/** Do Nothing = D */
|
||||||
|
public static final String FIELDGROUPTYPE_DoNothing = "D";
|
||||||
/** Label = L */
|
/** Label = L */
|
||||||
public static final String FIELDGROUPTYPE_Label = "L";
|
public static final String FIELDGROUPTYPE_Label = "L";
|
||||||
/** Tab = T */
|
/** Tab = T */
|
||||||
|
|
|
@ -649,7 +649,8 @@ DataStatusListener, IADTabpanel, IdSpace, IFieldEditorContainer
|
||||||
|
|
||||||
// field group
|
// field group
|
||||||
String fieldGroup = field.getFieldGroup();
|
String fieldGroup = field.getFieldGroup();
|
||||||
if (!Util.isEmpty(fieldGroup) && !fieldGroup.equals(currentFieldGroup)) // group changed
|
if (!Util.isEmpty(fieldGroup) && !fieldGroup.equals(currentFieldGroup)
|
||||||
|
&& !X_AD_FieldGroup.FIELDGROUPTYPE_DoNothing.equals(field.getFieldGroupType())) // group changed
|
||||||
{
|
{
|
||||||
currentFieldGroup = fieldGroup;
|
currentFieldGroup = fieldGroup;
|
||||||
|
|
||||||
|
|
|
@ -318,7 +318,8 @@ public class ProcessParameterPanel extends Panel implements
|
||||||
field.setParentEvaluatee(this);
|
field.setParentEvaluatee(this);
|
||||||
|
|
||||||
String fieldGroup = field.getFieldGroup();
|
String fieldGroup = field.getFieldGroup();
|
||||||
if (!Util.isEmpty(fieldGroup) && !fieldGroup.equals(currentFieldGroup)) // group changed
|
if (!Util.isEmpty(fieldGroup) && !fieldGroup.equals(currentFieldGroup)
|
||||||
|
&& !X_AD_FieldGroup.FIELDGROUPTYPE_DoNothing.equals(field.getFieldGroupType())) // group changed
|
||||||
{
|
{
|
||||||
currentFieldGroup = fieldGroup;
|
currentFieldGroup = fieldGroup;
|
||||||
|
|
||||||
|
|
|
@ -265,7 +265,8 @@ public class WTabEditor extends TabEditor implements IFormController, EventListe
|
||||||
|
|
||||||
// field group
|
// field group
|
||||||
String fieldGroup = gridField.getFieldGroup();
|
String fieldGroup = gridField.getFieldGroup();
|
||||||
if (!Util.isEmpty(fieldGroup) && !fieldGroup.equals(currentFieldGroup)) // group changed
|
if (!Util.isEmpty(fieldGroup) && !fieldGroup.equals(currentFieldGroup)
|
||||||
|
&& !X_AD_FieldGroup.FIELDGROUPTYPE_DoNothing.equals(gridField.getFieldGroupType())) // group changed
|
||||||
{
|
{
|
||||||
currentFieldGroup = fieldGroup;
|
currentFieldGroup = fieldGroup;
|
||||||
|
|
||||||
|
|
|
@ -282,39 +282,49 @@ public class TabEditor
|
||||||
AD_UserDef_Field_ID = udfield.getAD_UserDef_Field_ID();
|
AD_UserDef_Field_ID = udfield.getAD_UserDef_Field_ID();
|
||||||
|
|
||||||
udfield = new MUserDefField(Env.getCtx(), AD_UserDef_Field_ID, null);
|
udfield = new MUserDefField(Env.getCtx(), AD_UserDef_Field_ID, null);
|
||||||
|
|
||||||
if (field.getName() != null)
|
|
||||||
udfield.setName(field.getName());
|
|
||||||
|
|
||||||
if (field.getDescription() != null)
|
|
||||||
udfield.setDescription(field.getDescription());
|
|
||||||
|
|
||||||
if (field.getHelp() != null)
|
|
||||||
udfield.setHelp(field.getHelp());
|
|
||||||
|
|
||||||
if (field.getPlaceholder() != null)
|
|
||||||
udfield.setPlaceholder(field.getPlaceholder());
|
|
||||||
|
|
||||||
udfield.setIsActive(field.isActive());
|
|
||||||
udfield.setDisplayLogic(field.getDisplayLogic());
|
|
||||||
udfield.setDisplayLength(field.getDisplayLength());
|
|
||||||
udfield.setIsDisplayed(field.isDisplayed() ? "Y" : "N");
|
|
||||||
udfield.setIsReadOnly(field.isReadOnly() ? "Y" : "N");
|
|
||||||
udfield.setAD_Field_ID(field.get_ID());
|
udfield.setAD_Field_ID(field.get_ID());
|
||||||
udfield.setSeqNo(field.getSeqNo());
|
|
||||||
udfield.setXPosition(field.getXPosition());
|
|
||||||
udfield.setNumLines(field.getNumLines());
|
|
||||||
udfield.setColumnSpan(field.getColumnSpan());
|
|
||||||
udfield.setAD_UserDef_Tab_ID(AD_UserDef_Tab_ID);
|
udfield.setAD_UserDef_Tab_ID(AD_UserDef_Tab_ID);
|
||||||
udfield.setSortNo(field.getSortNo().intValue());
|
|
||||||
udfield.setAD_Org_ID(m_tab.getAD_Org_ID());
|
udfield.setAD_Org_ID(m_tab.getAD_Org_ID());
|
||||||
udfield.setMandatoryLogic(field.getMandatoryLogic());
|
|
||||||
udfield.setReadOnlyLogic(field.getReadOnlyLogic());
|
|
||||||
|
|
||||||
if (field.getAD_FieldGroup_ID() > 0)
|
if (field.is_ValueChanged(MField.COLUMNNAME_Name))
|
||||||
udfield.setAD_FieldGroup_ID(field.getAD_FieldGroup_ID());
|
udfield.setName(field.getName());
|
||||||
else
|
if (field.is_ValueChanged(MField.COLUMNNAME_Description))
|
||||||
udfield.set_ValueOfColumn("ad_fieldgroup_id", null);
|
udfield.setDescription(field.getDescription());
|
||||||
|
if (field.is_ValueChanged(MField.COLUMNNAME_Help))
|
||||||
|
udfield.setHelp(field.getHelp());
|
||||||
|
if (field.is_ValueChanged(MField.COLUMNNAME_Placeholder))
|
||||||
|
udfield.setPlaceholder(field.getPlaceholder());
|
||||||
|
if (field.is_ValueChanged(MField.COLUMNNAME_IsActive))
|
||||||
|
udfield.setIsActive(field.isActive());
|
||||||
|
if (field.is_ValueChanged(MField.COLUMNNAME_DisplayLogic))
|
||||||
|
udfield.setDisplayLogic(field.getDisplayLogic());
|
||||||
|
if (field.is_ValueChanged(MField.COLUMNNAME_DisplayLength))
|
||||||
|
udfield.setDisplayLength(field.getDisplayLength());
|
||||||
|
if (field.is_ValueChanged(MField.COLUMNNAME_IsDisplayed))
|
||||||
|
udfield.setIsDisplayed(field.isDisplayed() ? "Y" : "N");
|
||||||
|
if (field.is_ValueChanged(MField.COLUMNNAME_IsReadOnly))
|
||||||
|
udfield.setIsReadOnly(field.isReadOnly() ? "Y" : "N");
|
||||||
|
if (field.is_ValueChanged(MField.COLUMNNAME_SeqNo))
|
||||||
|
udfield.setSeqNo(field.getSeqNo());
|
||||||
|
if (field.is_ValueChanged(MField.COLUMNNAME_XPosition))
|
||||||
|
udfield.setXPosition(field.getXPosition());
|
||||||
|
if (field.is_ValueChanged(MField.COLUMNNAME_NumLines))
|
||||||
|
udfield.setNumLines(field.getNumLines());
|
||||||
|
if (field.is_ValueChanged(MField.COLUMNNAME_ColumnSpan))
|
||||||
|
udfield.setColumnSpan(field.getColumnSpan());
|
||||||
|
if (field.is_ValueChanged(MField.COLUMNNAME_SortNo))
|
||||||
|
udfield.setSortNo(field.getSortNo().intValue());
|
||||||
|
if (field.is_ValueChanged(MField.COLUMNNAME_MandatoryLogic))
|
||||||
|
udfield.setMandatoryLogic(field.getMandatoryLogic());
|
||||||
|
if (field.is_ValueChanged(MField.COLUMNNAME_ReadOnlyLogic))
|
||||||
|
udfield.setReadOnlyLogic(field.getReadOnlyLogic());
|
||||||
|
|
||||||
|
if (field.is_ValueChanged(MField.COLUMNNAME_AD_FieldGroup_ID)) {
|
||||||
|
if (field.getAD_FieldGroup_ID() > 0)
|
||||||
|
udfield.setAD_FieldGroup_ID(field.getAD_FieldGroup_ID());
|
||||||
|
else
|
||||||
|
udfield.setAD_FieldGroup_ID(0);
|
||||||
|
}
|
||||||
|
|
||||||
udfield.saveEx();
|
udfield.saveEx();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue