diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WTabEditor.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WTabEditor.java index c710e1a6b1..041dd95c33 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WTabEditor.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WTabEditor.java @@ -921,26 +921,13 @@ public class WTabEditor extends TabEditor implements IFormController, EventListe editorColumn.setValue(MColumn.getColumnName(Env.getCtx(), field.getAD_Column_ID())); GridField gridField = getGridField(field); - String fieldGroup = ""; - String fieldGroupType = ""; - if (field.getAD_FieldGroup_ID() > 0) { - if (isBaseLang) - { - fieldGroup = field.getAD_FieldGroup().getName(); - } - else - { - fieldGroup = ((X_AD_FieldGroup) field.getAD_FieldGroup()).get_Translation(X_AD_FieldGroup.COLUMNNAME_Name); - } - fieldGroupType = field.getAD_FieldGroup().getFieldGroupType(); - } gridField.getVO().Header = field.getName(); gridField.getVO().Description = field.getDescription(); gridField.getVO().Help = field.getHelp(); gridField.getVO().Placeholder = field.getPlaceholder(); gridField.getVO().IsDisplayed = field.isDisplayed(); - gridField.getVO().FieldGroup = fieldGroup; - gridField.getVO().FieldGroupType = fieldGroupType; + gridField.getVO().FieldGroup = getFieldGroup(field); + gridField.getVO().FieldGroupType = getFieldGroupType(field); gridField.getVO().XPosition = field.getXPosition(); gridField.getVO().ColumnSpan = field.getColumnSpan(); gridField.getVO().NumLines = field.getNumLines(); diff --git a/org.adempiere.ui/src/org/compiere/apps/form/TabEditor.java b/org.adempiere.ui/src/org/compiere/apps/form/TabEditor.java index e63a692dc9..31c32356a4 100644 --- a/org.adempiere.ui/src/org/compiere/apps/form/TabEditor.java +++ b/org.adempiere.ui/src/org/compiere/apps/form/TabEditor.java @@ -29,6 +29,7 @@ import org.compiere.model.I_AD_Field; import org.compiere.model.MField; import org.compiere.model.MTab; import org.compiere.model.MUserDefField; +import org.compiere.model.X_AD_FieldGroup; import org.compiere.util.CLogger; import org.compiere.util.DB; import org.compiere.util.Env; @@ -110,6 +111,8 @@ public class TabEditor gridField.getVO().XPosition = field.getXPosition(); gridField.getVO().ColumnSpan = field.getColumnSpan(); gridField.getVO().IsDisplayed = field.isDisplayed(); + gridField.getVO().FieldGroup = getFieldGroup(field); + gridField.getVO().FieldGroupType = getFieldGroupType(field); } } @@ -447,5 +450,23 @@ public class TabEditor } } } - + + /** Return the name of the group field of the field */ + public String getFieldGroup(MField field) { + if (field.getAD_FieldGroup_ID() > 0) { + if (isBaseLang) + return field.getAD_FieldGroup().getName(); + else + return ((X_AD_FieldGroup) field.getAD_FieldGroup()).get_Translation(X_AD_FieldGroup.COLUMNNAME_Name); + } + return ""; + } + + /** Return the type of the group field of the field */ + public String getFieldGroupType(MField field) { + if (field.getAD_FieldGroup_ID() > 0) + return field.getAD_FieldGroup().getFieldGroupType(); + return ""; + } + } // TabEditor