diff --git a/base/src/org/compiere/model/GridField.java b/base/src/org/compiere/model/GridField.java index aecbc50ab5..11d5b2555e 100644 --- a/base/src/org/compiere/model/GridField.java +++ b/base/src/org/compiere/model/GridField.java @@ -13,6 +13,7 @@ * For the text or an alternative of this public license, you may reach us * * ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA * * or via info@compiere.org or http://www.compiere.org/license.html * + * Contributor(s): Victor Perez e-Evolution victor.perez@e-evolution.com * *****************************************************************************/ package org.compiere.model; @@ -37,6 +38,7 @@ import org.compiere.util.*; * Usually editors listen to their fields. * * @author Jorg Janke + * @contributor Victor Perez , e-Evolution.SC FR [ 1757088 ] * @version $Id: GridField.java,v 1.5 2006/07/30 00:51:02 jjanke Exp $ */ public class GridField @@ -1568,4 +1570,14 @@ public class GridField m_vo.VFormat = strNewFormat; } //setVFormat + + /** + * Feature Request FR [ 1757088 ] + * Get the id tab include + * @return id Tab + */ + public int getIncluded_Tab_ID () + { + return m_vo.Included_Tab_ID; + } } // MField diff --git a/base/src/org/compiere/model/GridFieldVO.java b/base/src/org/compiere/model/GridFieldVO.java index 7f06716f0c..14aa7a54eb 100644 --- a/base/src/org/compiere/model/GridFieldVO.java +++ b/base/src/org/compiere/model/GridFieldVO.java @@ -13,6 +13,7 @@ * For the text or an alternative of this public license, you may reach us * * ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA * * or via info@compiere.org or http://www.compiere.org/license.html * + * @contributor Victor Perez , e-Evolution.SC FR [ 1757088 ] *****************************************************************************/ package org.compiere.model; @@ -27,6 +28,7 @@ import org.compiere.util.*; * Field Model Value Object * * @author Jorg Janke + * @contributor Victor Perez , e-Evolution.SC FR [ 1757088 ] * @version $Id: GridFieldVO.java,v 1.3 2006/07/30 00:58:04 jjanke Exp $ */ public class GridFieldVO implements Serializable @@ -150,6 +152,9 @@ public class GridFieldVO implements Serializable vo.ValidationCode = rs.getString(i); else if (columnName.equalsIgnoreCase("ColumnSQL")) vo.ColumnSQL = rs.getString(i); + //Feature Request FR [ 1757088 ] + else if (columnName.equalsIgnoreCase("Included_Tab_ID")) + vo.Included_Tab_ID = rs.getInt(i); } if (vo.Header == null) vo.Header = vo.ColumnName; @@ -400,6 +405,10 @@ public class GridFieldVO implements Serializable /** Lookup Value Object */ public MLookupInfo lookupInfo = null; + + + //* Feature Request FR [ 1757088 ] + public int Included_Tab_ID = 0; /** diff --git a/base/src/org/compiere/model/GridTab.java b/base/src/org/compiere/model/GridTab.java index 43d07d5a59..03a09dfffe 100644 --- a/base/src/org/compiere/model/GridTab.java +++ b/base/src/org/compiere/model/GridTab.java @@ -13,6 +13,7 @@ * For the text or an alternative of this public license, you may reach us * * ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA * * or via info@compiere.org or http://www.compiere.org/license.html * + * @contributor Victor Perez , e-Evolution.SC FR [ 1757088 ] *****************************************************************************/ package org.compiere.model; @@ -51,6 +52,7 @@ import org.compiere.util.*; * @version $Id: GridTab.java,v 1.10 2006/10/02 05:18:39 jjanke Exp $ * * @author Teo Sarca - BF [ 1742159 ] + * @contributor Victor Perez , e-Evolution.SC FR [ 1757088 ] */ public class GridTab implements DataStatusListener, Evaluatee, Serializable { @@ -270,6 +272,10 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable { GridField field = new GridField (voF); String columnName = field.getColumnName(); + //FR [ 1757088 ] + if(this.isReadOnly()) { + voF.IsReadOnly = true; + } // Record Info if (field.isKey()) m_keyColumnName = columnName; diff --git a/base/src/org/compiere/model/I_AD_Field.java b/base/src/org/compiere/model/I_AD_Field.java index 54b78eaef5..a9f610b5b6 100644 --- a/base/src/org/compiere/model/I_AD_Field.java +++ b/base/src/org/compiere/model/I_AD_Field.java @@ -5,21 +5,21 @@ * Copyright (C) Trifon Trifonov. * * Copyright (C) Contributors * * * - * This program is free software; + * This program is free software; you can redistribute it and/or * * modify it under the terms of the GNU General Public License * - * as published by the Free Software Foundation; + * as published by the Free Software Foundation; either version 2 * * of the License, or (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; + * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * - * along with this program; + * along with this program; if not, write to the Free Software * * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, * * MA 02110-1301, USA. * @@ -30,327 +30,325 @@ * Sponsors: * * - Company (http://www.site.com) * **********************************************************************/ -package org.compiere.model; - -import java.util.*; -import java.sql.Timestamp; -import java.math.*; -import org.compiere.util.*; +package org.compiere.model; - /** Generated Interface for AD_Field - * @author Trifon Trifonov (generated) - * @version Release 3.3.0 - 2007-08-24 11:39:21.921 - */ - public interface I_AD_Field -{ +import java.math.BigDecimal; +import org.compiere.util.KeyNamePair; + +/** Generated Interface for AD_Field + * @author Trifon Trifonov (generated) + * @version Release 3.3.0 + */ +public interface I_AD_Field +{ /** TableName=AD_Field */ - public static final String Table_Name = "AD_Field"; + public static final String Table_Name = "AD_Field"; /** AD_Table_ID=107 */ - public static final int Table_ID = MTable.getTable_ID(Table_Name); + public static final int Table_ID = MTable.getTable_ID(Table_Name); - KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name); + KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name); /** AccessLevel = 4 - System */ - BigDecimal accessLevel = new BigDecimal(4); + BigDecimal accessLevel = BigDecimal.valueOf(4); /** Load Meta Data */ /** Column name AD_Column_ID */ - public static final String COLUMNNAME_AD_Column_ID = "AD_Column_ID"; + public static final String COLUMNNAME_AD_Column_ID = "AD_Column_ID"; /** Set Column. - * Column in the table + * Column in the table */ - public void setAD_Column_ID (int AD_Column_ID); + public void setAD_Column_ID (int AD_Column_ID); /** Get Column. - * Column in the table + * Column in the table */ - public int getAD_Column_ID(); + public int getAD_Column_ID(); - public I_AD_Column getI_AD_Column() throws Exception; + public I_AD_Column getAD_Column() throws Exception; /** Column name AD_FieldGroup_ID */ - public static final String COLUMNNAME_AD_FieldGroup_ID = "AD_FieldGroup_ID"; + public static final String COLUMNNAME_AD_FieldGroup_ID = "AD_FieldGroup_ID"; /** Set Field Group. - * Logical grouping of fields + * Logical grouping of fields */ - public void setAD_FieldGroup_ID (int AD_FieldGroup_ID); + public void setAD_FieldGroup_ID (int AD_FieldGroup_ID); /** Get Field Group. - * Logical grouping of fields + * Logical grouping of fields */ - public int getAD_FieldGroup_ID(); + public int getAD_FieldGroup_ID(); - public I_AD_FieldGroup getI_AD_FieldGroup() throws Exception; + public I_AD_FieldGroup getAD_FieldGroup() throws Exception; /** Column name AD_Field_ID */ - public static final String COLUMNNAME_AD_Field_ID = "AD_Field_ID"; + public static final String COLUMNNAME_AD_Field_ID = "AD_Field_ID"; /** Set Field. - * Field on a database table + * Field on a database table */ - public void setAD_Field_ID (int AD_Field_ID); + public void setAD_Field_ID (int AD_Field_ID); /** Get Field. - * Field on a database table + * Field on a database table */ - public int getAD_Field_ID(); + public int getAD_Field_ID(); /** Column name AD_Reference_ID */ - public static final String COLUMNNAME_AD_Reference_ID = "AD_Reference_ID"; + public static final String COLUMNNAME_AD_Reference_ID = "AD_Reference_ID"; /** Set Reference. - * System Reference and Validation + * System Reference and Validation */ - public void setAD_Reference_ID (int AD_Reference_ID); + public void setAD_Reference_ID (int AD_Reference_ID); /** Get Reference. - * System Reference and Validation + * System Reference and Validation */ - public int getAD_Reference_ID(); + public int getAD_Reference_ID(); /** Column name AD_Tab_ID */ - public static final String COLUMNNAME_AD_Tab_ID = "AD_Tab_ID"; + public static final String COLUMNNAME_AD_Tab_ID = "AD_Tab_ID"; /** Set Tab. - * Tab within a Window + * Tab within a Window */ - public void setAD_Tab_ID (int AD_Tab_ID); + public void setAD_Tab_ID (int AD_Tab_ID); /** Get Tab. - * Tab within a Window + * Tab within a Window */ - public int getAD_Tab_ID(); + public int getAD_Tab_ID(); - public I_AD_Tab getI_AD_Tab() throws Exception; + public I_AD_Tab getAD_Tab() throws Exception; /** Column name Description */ - public static final String COLUMNNAME_Description = "Description"; + public static final String COLUMNNAME_Description = "Description"; /** Set Description. - * Optional short description of the record + * Optional short description of the record */ - public void setDescription (String Description); + public void setDescription (String Description); /** Get Description. - * Optional short description of the record + * Optional short description of the record */ - public String getDescription(); + public String getDescription(); /** Column name DisplayLength */ - public static final String COLUMNNAME_DisplayLength = "DisplayLength"; + public static final String COLUMNNAME_DisplayLength = "DisplayLength"; /** Set Display Length. - * Length of the display in characters + * Length of the display in characters */ - public void setDisplayLength (int DisplayLength); + public void setDisplayLength (int DisplayLength); /** Get Display Length. - * Length of the display in characters + * Length of the display in characters */ - public int getDisplayLength(); + public int getDisplayLength(); /** Column name DisplayLogic */ - public static final String COLUMNNAME_DisplayLogic = "DisplayLogic"; + public static final String COLUMNNAME_DisplayLogic = "DisplayLogic"; /** Set Display Logic. - * If the Field is displayed, the result determines if the field is actually displayed + * If the Field is displayed, the result determines if the field is actually displayed */ - public void setDisplayLogic (String DisplayLogic); + public void setDisplayLogic (String DisplayLogic); /** Get Display Logic. - * If the Field is displayed, the result determines if the field is actually displayed + * If the Field is displayed, the result determines if the field is actually displayed */ - public String getDisplayLogic(); + public String getDisplayLogic(); /** Column name EntityType */ - public static final String COLUMNNAME_EntityType = "EntityType"; + public static final String COLUMNNAME_EntityType = "EntityType"; /** Set Entity Type. - * Dictionary Entity Type; - Determines ownership and synchronization + * Dictionary Entity Type; + Determines ownership and synchronization */ - public void setEntityType (String EntityType); + public void setEntityType (String EntityType); /** Get Entity Type. - * Dictionary Entity Type; - Determines ownership and synchronization + * Dictionary Entity Type; + Determines ownership and synchronization */ - public String getEntityType(); + public String getEntityType(); /** Column name Help */ - public static final String COLUMNNAME_Help = "Help"; + public static final String COLUMNNAME_Help = "Help"; /** Set Comment/Help. - * Comment or Hint + * Comment or Hint */ - public void setHelp (String Help); + public void setHelp (String Help); /** Get Comment/Help. - * Comment or Hint + * Comment or Hint */ - public String getHelp(); + public String getHelp(); /** Column name IsCentrallyMaintained */ - public static final String COLUMNNAME_IsCentrallyMaintained = "IsCentrallyMaintained"; + public static final String COLUMNNAME_IsCentrallyMaintained = "IsCentrallyMaintained"; /** Set Centrally maintained. - * Information maintained in System Element table + * Information maintained in System Element table */ - public void setIsCentrallyMaintained (boolean IsCentrallyMaintained); + public void setIsCentrallyMaintained (boolean IsCentrallyMaintained); /** Get Centrally maintained. - * Information maintained in System Element table + * Information maintained in System Element table */ - public boolean isCentrallyMaintained(); + public boolean isCentrallyMaintained(); /** Column name IsDisplayed */ - public static final String COLUMNNAME_IsDisplayed = "IsDisplayed"; + public static final String COLUMNNAME_IsDisplayed = "IsDisplayed"; /** Set Displayed. - * Determines, if this field is displayed + * Determines, if this field is displayed */ - public void setIsDisplayed (boolean IsDisplayed); + public void setIsDisplayed (boolean IsDisplayed); /** Get Displayed. - * Determines, if this field is displayed + * Determines, if this field is displayed */ - public boolean isDisplayed(); + public boolean isDisplayed(); /** Column name IsEncrypted */ - public static final String COLUMNNAME_IsEncrypted = "IsEncrypted"; + public static final String COLUMNNAME_IsEncrypted = "IsEncrypted"; /** Set Encrypted. - * Display or Storage is encrypted + * Display or Storage is encrypted */ - public void setIsEncrypted (boolean IsEncrypted); + public void setIsEncrypted (boolean IsEncrypted); /** Get Encrypted. - * Display or Storage is encrypted + * Display or Storage is encrypted */ - public boolean isEncrypted(); + public boolean isEncrypted(); /** Column name IsFieldOnly */ - public static final String COLUMNNAME_IsFieldOnly = "IsFieldOnly"; + public static final String COLUMNNAME_IsFieldOnly = "IsFieldOnly"; /** Set Field Only. - * Label is not displayed + * Label is not displayed */ - public void setIsFieldOnly (boolean IsFieldOnly); + public void setIsFieldOnly (boolean IsFieldOnly); /** Get Field Only. - * Label is not displayed + * Label is not displayed */ - public boolean isFieldOnly(); + public boolean isFieldOnly(); /** Column name IsHeading */ - public static final String COLUMNNAME_IsHeading = "IsHeading"; + public static final String COLUMNNAME_IsHeading = "IsHeading"; /** Set Heading only. - * Field without Column - Only label is displayed + * Field without Column - Only label is displayed */ - public void setIsHeading (boolean IsHeading); + public void setIsHeading (boolean IsHeading); /** Get Heading only. - * Field without Column - Only label is displayed + * Field without Column - Only label is displayed */ - public boolean isHeading(); + public boolean isHeading(); /** Column name IsMandatory */ - public static final String COLUMNNAME_IsMandatory = "IsMandatory"; + public static final String COLUMNNAME_IsMandatory = "IsMandatory"; /** Set Mandatory. - * Data entry is required in this column + * Data entry is required in this column */ - public void setIsMandatory (String IsMandatory); + public void setIsMandatory (String IsMandatory); /** Get Mandatory. - * Data entry is required in this column + * Data entry is required in this column */ - public String getIsMandatory(); + public String getIsMandatory(); /** Column name IsReadOnly */ - public static final String COLUMNNAME_IsReadOnly = "IsReadOnly"; + public static final String COLUMNNAME_IsReadOnly = "IsReadOnly"; /** Set Read Only. - * Field is read only + * Field is read only */ - public void setIsReadOnly (boolean IsReadOnly); + public void setIsReadOnly (boolean IsReadOnly); /** Get Read Only. - * Field is read only + * Field is read only */ - public boolean isReadOnly(); + public boolean isReadOnly(); /** Column name IsSameLine */ - public static final String COLUMNNAME_IsSameLine = "IsSameLine"; + public static final String COLUMNNAME_IsSameLine = "IsSameLine"; /** Set Same Line. - * Displayed on same line as previous field + * Displayed on same line as previous field */ - public void setIsSameLine (boolean IsSameLine); + public void setIsSameLine (boolean IsSameLine); /** Get Same Line. - * Displayed on same line as previous field + * Displayed on same line as previous field */ - public boolean isSameLine(); + public boolean isSameLine(); /** Column name Name */ - public static final String COLUMNNAME_Name = "Name"; + public static final String COLUMNNAME_Name = "Name"; /** Set Name. - * Alphanumeric identifier of the entity + * Alphanumeric identifier of the entity */ - public void setName (String Name); + public void setName (String Name); /** Get Name. - * Alphanumeric identifier of the entity + * Alphanumeric identifier of the entity */ - public String getName(); + public String getName(); /** Column name ObscureType */ - public static final String COLUMNNAME_ObscureType = "ObscureType"; + public static final String COLUMNNAME_ObscureType = "ObscureType"; /** Set Obscure. - * Type of obscuring the data (limiting the display) + * Type of obscuring the data (limiting the display) */ - public void setObscureType (String ObscureType); + public void setObscureType (String ObscureType); /** Get Obscure. - * Type of obscuring the data (limiting the display) + * Type of obscuring the data (limiting the display) */ - public String getObscureType(); + public String getObscureType(); /** Column name SeqNo */ - public static final String COLUMNNAME_SeqNo = "SeqNo"; + public static final String COLUMNNAME_SeqNo = "SeqNo"; /** Set Sequence. - * Method of ordering records; - lowest number comes first + * Method of ordering records; + lowest number comes first */ - public void setSeqNo (int SeqNo); + public void setSeqNo (int SeqNo); /** Get Sequence. - * Method of ordering records; - lowest number comes first + * Method of ordering records; + lowest number comes first */ - public int getSeqNo(); + public int getSeqNo(); /** Column name SortNo */ - public static final String COLUMNNAME_SortNo = "SortNo"; + public static final String COLUMNNAME_SortNo = "SortNo"; /** Set Record Sort No. - * Determines in what order the records are displayed + * Determines in what order the records are displayed */ - public void setSortNo (BigDecimal SortNo); + public void setSortNo (BigDecimal SortNo); /** Get Record Sort No. - * Determines in what order the records are displayed + * Determines in what order the records are displayed */ - public BigDecimal getSortNo(); -} + public BigDecimal getSortNo(); +} diff --git a/base/src/org/compiere/model/I_AD_FieldGroup.java b/base/src/org/compiere/model/I_AD_FieldGroup.java index fde5116942..c1e185f659 100644 --- a/base/src/org/compiere/model/I_AD_FieldGroup.java +++ b/base/src/org/compiere/model/I_AD_FieldGroup.java @@ -5,21 +5,21 @@ * Copyright (C) Trifon Trifonov. * * Copyright (C) Contributors * * * - * This program is free software; + * This program is free software; you can redistribute it and/or * * modify it under the terms of the GNU General Public License * - * as published by the Free Software Foundation; + * as published by the Free Software Foundation; either version 2 * * of the License, or (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; + * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * - * along with this program; + * along with this program; if not, write to the Free Software * * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, * * MA 02110-1301, USA. * @@ -30,72 +30,83 @@ * Sponsors: * * - Company (http://www.site.com) * **********************************************************************/ -package org.compiere.model; - -import java.util.*; -import java.sql.Timestamp; -import java.math.*; -import org.compiere.util.*; +package org.compiere.model; - /** Generated Interface for AD_FieldGroup - * @author Trifon Trifonov (generated) - * @version Release 3.3.0 - 2007-08-24 11:39:21.984 - */ - public interface I_AD_FieldGroup -{ +import java.math.BigDecimal; +import org.compiere.util.KeyNamePair; + +/** Generated Interface for AD_FieldGroup + * @author Trifon Trifonov (generated) + * @version Release 3.3.0 + */ +public interface I_AD_FieldGroup +{ /** TableName=AD_FieldGroup */ - public static final String Table_Name = "AD_FieldGroup"; + public static final String Table_Name = "AD_FieldGroup"; /** AD_Table_ID=414 */ - public static final int Table_ID = MTable.getTable_ID(Table_Name); + public static final int Table_ID = MTable.getTable_ID(Table_Name); - KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name); + KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name); /** AccessLevel = 4 - System */ - BigDecimal accessLevel = new BigDecimal(4); + BigDecimal accessLevel = BigDecimal.valueOf(4); /** Load Meta Data */ /** Column name AD_FieldGroup_ID */ - public static final String COLUMNNAME_AD_FieldGroup_ID = "AD_FieldGroup_ID"; + public static final String COLUMNNAME_AD_FieldGroup_ID = "AD_FieldGroup_ID"; /** Set Field Group. - * Logical grouping of fields + * Logical grouping of fields */ - public void setAD_FieldGroup_ID (int AD_FieldGroup_ID); + public void setAD_FieldGroup_ID (int AD_FieldGroup_ID); /** Get Field Group. - * Logical grouping of fields + * Logical grouping of fields */ - public int getAD_FieldGroup_ID(); + public int getAD_FieldGroup_ID(); /** Column name EntityType */ - public static final String COLUMNNAME_EntityType = "EntityType"; + public static final String COLUMNNAME_EntityType = "EntityType"; /** Set Entity Type. - * Dictionary Entity Type; - Determines ownership and synchronization + * Dictionary Entity Type; + Determines ownership and synchronization */ - public void setEntityType (String EntityType); + public void setEntityType (String EntityType); /** Get Entity Type. - * Dictionary Entity Type; - Determines ownership and synchronization + * Dictionary Entity Type; + Determines ownership and synchronization */ - public String getEntityType(); + public String getEntityType(); + + /** Column name FieldGroupType */ + public static final String COLUMNNAME_FieldGroupType = "FieldGroupType"; + + /** Set Field Group Type. + * Field Group + */ + public void setFieldGroupType (String FieldGroupType); + + /** Get Field Group Type. + * Field Group + */ + public String getFieldGroupType(); /** Column name Name */ - public static final String COLUMNNAME_Name = "Name"; + public static final String COLUMNNAME_Name = "Name"; /** Set Name. - * Alphanumeric identifier of the entity + * Alphanumeric identifier of the entity */ - public void setName (String Name); + public void setName (String Name); /** Get Name. - * Alphanumeric identifier of the entity + * Alphanumeric identifier of the entity */ - public String getName(); -} + public String getName(); +} diff --git a/client/build.xml b/client/build.xml index 8060c540e6..158305e713 100644 --- a/client/build.xml +++ b/client/build.xml @@ -31,7 +31,8 @@ - + + diff --git a/client/src/org/compiere/apps/APanel.java b/client/src/org/compiere/apps/APanel.java index 05c375c865..b3c5491b57 100644 --- a/client/src/org/compiere/apps/APanel.java +++ b/client/src/org/compiere/apps/APanel.java @@ -13,6 +13,7 @@ * For the text or an alternative of this public license, you may reach us * * ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA * * or via info@compiere.org or http://www.compiere.org/license.html * + * @contributor Victor Perez , e-Evolution.SC FR [ 1757088 ] *****************************************************************************/ package org.compiere.apps; @@ -47,6 +48,8 @@ import org.compiere.util.*; * @version $Id: APanel.java,v 1.4 2006/07/30 00:51:27 jjanke Exp $ * * Colin Rooney 2007/03/20 RFE#1670185 & related BUG#1684142 - Extend Sec to Info Queries + * @contributor Victor Perez , e-Evolution.SC FR [ 1757088 ] + * @contributor fer_luck@centuryon.com , FR [ 1757088 ] */ public final class APanel extends CPanel implements DataStatusListener, ChangeListener, ActionListener, ASyncProcess @@ -55,6 +58,27 @@ public final class APanel extends CPanel * Constructs a new instance. * Need to call initPanel for dynamic initialization */ + //FR [ 1757088 ] + public APanel(GridController gc){ + super(); + m_ctx = Env.getCtx(); + try{ + m_curGC = gc; + m_curTab = gc.getMTab(); + Component tabElement = null; + tabElement = gc; + VTabbedPane tabPane = new VTabbedPane(false); + tabPane.addTab(m_curTab.getName().toString(), m_curTab, tabElement); + m_curWinTab = tabPane; + jbInit(); + initSwitchLineAction(); + } + catch(Exception e){ + log.log(Level.SEVERE, "", e); + } + createMenu(); + } + public APanel(AWindow window) { super(); @@ -330,11 +354,15 @@ public final class APanel extends CPanel toolBar.add(aChat.getButton()); toolBar.add(aMulti.getButton()); toolBar.addSeparator(); - toolBar.add(aHistory.getButton()); // F9 - toolBar.add(aHome.getButton()); // F10 is Windows Menu Key - toolBar.add(aParent.getButton()); - toolBar.add(aDetail.getButton()); - toolBar.addSeparator(); + //FR [ 1757088 ] + if((m_curGC == null) || (m_curGC != null && !m_curGC.isDetailGrid())){ + toolBar.add(aHistory.getButton()); // F9 + toolBar.add(aHome.getButton()); // F10 is Windows Menu Key + toolBar.add(aParent.getButton()); + toolBar.add(aDetail.getButton()); + toolBar.addSeparator(); + } + toolBar.add(aFirst.getButton()); toolBar.add(aPrevious.getButton()); toolBar.add(aNext.getButton()); @@ -344,19 +372,23 @@ public final class APanel extends CPanel toolBar.add(aArchive.getButton()); toolBar.add(aPrintPreview.getButton()); toolBar.add(aPrint.getButton()); - toolBar.addSeparator(); - if (m_isPersonalLock) - toolBar.add(aLock.getButton()); - toolBar.add(aZoomAcross.getButton()); - if (aWorkflow != null) - toolBar.add(aWorkflow.getButton()); - toolBar.add(aRequest.getButton()); - if (MRole.getDefault().isAllow_Info_Product()) - { - toolBar.add(aProduct.getButton()); + // FR [ 1757088 ] + if((m_curGC == null) || (m_curGC != null && !m_curGC.isDetailGrid())){ + toolBar.addSeparator(); + if (m_isPersonalLock) + toolBar.add(aLock.getButton()); + toolBar.add(aZoomAcross.getButton()); + if (aWorkflow != null) + toolBar.add(aWorkflow.getButton()); + toolBar.add(aRequest.getButton()); + if (MRole.getDefault().isAllow_Info_Product()) + { + toolBar.add(aProduct.getButton()); + } + toolBar.addSeparator(); + toolBar.add(aEnd.getButton()); } - toolBar.addSeparator(); - toolBar.add(aEnd.getButton()); + // if (CLogMgt.isLevelAll()) Util.printActionInputMap(this); @@ -625,10 +657,18 @@ public final class APanel extends CPanel // If we have a zoom query, switch to single row if (tab == 0 && goSingleRow) gc.switchSingleRow(); - - // Store GC if it has a included Tab - if (gTab.getIncluded_Tab_ID() != 0) - includedMap.put(new Integer(gTab.getIncluded_Tab_ID()), gc); + + // FR [ 1757088 ] + GridField[] fields = gc.getMTab().getFields(); + int m_tab_id = 0; + for(int f =0 ; f < fields.length ; f ++) + { + m_tab_id = fields[f].getIncluded_Tab_ID(); + if ( m_tab_id != 0) + { + includedMap.put(m_tab_id, gc); + } + } // Is this tab included? if (includedMap.size() > 0) @@ -636,7 +676,24 @@ public final class APanel extends CPanel GridController parent = (GridController)includedMap.get(new Integer(gTab.getAD_Tab_ID())); if (parent != null) { - included = parent.includeTab(gc); + // FR [ 1757088 ] + gc.initGrid(gTab, false, m_curWindowNo, this, mWindow, false); // will set color on Tab level + included = parent.includeTab(gc,this); + TabSwitcher ts = new TabSwitcher(parent, this); + Component[] comp = parent.getvPanel().getComponents(); + for (int i = 0; i < comp.length; i++) + { + ts.addTabSwitchingSupport((JComponent)comp[i]); + } + ts = new TabSwitcher(gc, this); + comp = gc.getvPanel().getComponents(); + for (int i = 0; i < comp.length; i++) + { + ts.addTabSwitchingSupport((JComponent)comp[i]); + } + ts = new TabSwitcher(gc, this); + ts.addTabSwitchingSupport((JComponent)gc.getTable()); + if (!included) log.log(Level.SEVERE, "Not Included = " + gc); } @@ -2444,5 +2501,51 @@ public final class APanel extends CPanel aSwitchLinesUpAction.getName()); getActionMap().put(aSwitchLinesUpAction.getName(), aSwitchLinesUpAction); } + + //FR [ 1757088 ] + public void dispatchTabSwitch(GridController gc) + { + log.info("Current Grid " + gc.getName()); + if(gc == null || gc.equals(m_curGC)) + { + return; + } + + if(m_curTab.getRecord_ID() == -1 ) + { + gc.getMTab().navigateCurrent(); + gc.dynamicDisplay(0); + gc.getMTab().dataRefresh(); + return; + } + + gc.getMTab().dataSave(true); + m_curGC = gc; + m_curGC.activate(); + m_curTab = gc.getMTab(); + aDetail.setEnabled(m_curTabIndex != m_curWinTab.getTabCount()-1); + aParent.setEnabled(m_curTabIndex != 0 && m_curWinTab.getTabCount() > 1); + + if (m_mWorkbench.getMWindow(getWindowIndex()).isTransaction()) { + aHistory.setEnabled(isFirstTab()); + } + else + { + aHistory.setPressed(false); + aHistory.setEnabled(false); + } + + aPrint.setEnabled(m_curTab.isPrinted()); + aFind.setPressed(m_curTab.isQueryActive()); + + aMulti.setEnabled(true); + aMulti.setPressed(!m_curGC.isSingleRow()); + aFind.setEnabled(true); + aRefresh.setEnabled(true); + aAttachment.setEnabled(true); + + m_curWinTab.requestFocusInWindow(); + setBusy(false,true); + } } // APanel diff --git a/client/src/org/compiere/apps/TabSwitcher.java b/client/src/org/compiere/apps/TabSwitcher.java new file mode 100644 index 0000000000..07ccbddd2d --- /dev/null +++ b/client/src/org/compiere/apps/TabSwitcher.java @@ -0,0 +1,134 @@ +/****************************************************************************** + * Product: Adempiere ERP & CRM Smart Business Solution * + * This program is free software; you can redistribute it and/or modify it * + * under the terms version 2 of the GNU General Public License as published * + * by the Free Software Foundation. This program is distributed in the hope * + * that it will be useful, but WITHOUT ANY WARRANTY; without even the implied * + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * + * See the GNU General Public License for more details. * + * You should have received a copy of the GNU General Public License along * + * with this program; if not, write to the Free Software Foundation, Inc., * + * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * + * For the text or an alternative of this public license, you may reach us * + * Copyright (C) 2003-2007 e-Evolution,SC. All Rights Reserved. * + * @contributor Victor Perez , e-Evolution.SC FR [ 1757088 ] * + *****************************************************************************/ + + +package org.compiere.apps; + +import java.awt.Component; +import java.awt.ItemSelectable; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.awt.event.FocusAdapter; +import java.awt.event.FocusEvent; +import java.awt.event.*; + +import javax.swing.AbstractButton; +import javax.swing.JTable; +import javax.swing.JTabbedPane; +import javax.swing.JComponent; +import javax.swing.JComboBox; +import javax.swing.event.ChangeEvent; + + +import javax.swing.event.ChangeListener; +import javax.swing.event.ListSelectionEvent; +import javax.swing.event.ListSelectionListener; +import javax.swing.text.JTextComponent; + +import org.compiere.grid.GridController; +import org.compiere.grid.ed.VEditor; +import org.compiere.model.MField; +import org.compiere.swing.CPanel; + +/** + * + * @author Gunther Hoppe, 21.08.2005 + * + */ +public class TabSwitcher extends FocusAdapter implements ActionListener, ListSelectionListener{ + + private APanel panel; + private GridController gc; + + public TabSwitcher(GridController g, APanel p) { + + panel = p; + gc = g; + } + + public void valueChanged(ListSelectionEvent e) { + if(!e.getValueIsAdjusting()) { + + performSwitch(); + } + }; + + public void actionPerformed(ActionEvent e) { + if(!(e.getSource() instanceof JTextComponent)) { + if(gc.getMTab().getRecord_ID() != -1) + performSwitch(); + } + } + + public void focusGained(FocusEvent e) { + performSwitch(); + } + + private void performSwitch() { + //gc.transferFocus(); + //panel.dispatchTabSwitch(gc); + } + + public void addTabSwitchingSupport(JComponent c) { + + if(c instanceof JTable) { + + ((JTable)c).getSelectionModel().addListSelectionListener(this); + return; + } + else if( //c instanceof org.compiere.grid.ed.VEditor || + c instanceof JTextComponent || + //c instanceof ItemSelectable || + c instanceof org.compiere.grid.ed.VCheckBox || + //c instanceof org.compiere.grid.ed.VLookup || + //c instanceof org.compiere.swing.CLabel || + c instanceof AbstractButton) + { + c.addFocusListener(this); + //c.addKeyListener(new MovementAdapter()); + return; + } + else if(c instanceof org.compiere.grid.ed.VDate) + { + org.compiere.grid.ed.VDate d = ((org.compiere.grid.ed.VDate)c); + //d.addFocusListener(this); + d.addActionListener(this); + //d.addKeyListener(new MovementAdapter()); + return; + } + else if(c instanceof org.compiere.grid.ed.VLookup) + { + org.compiere.grid.ed.VLookup l = ((org.compiere.grid.ed.VLookup)c); + //l.addFocusListener(this); + l.addActionListener(this); + //l.addKeyListener(new MovementAdapter()); + return; + } + } + + class MovementAdapter extends KeyAdapter + { + public void keyPressed(KeyEvent event) + { + // look for tab keys + if(event.getKeyCode() == KeyEvent.VK_TAB + || event.getKeyCode() == KeyEvent.VK_ENTER) + { + ((JComponent)event.getSource()).transferFocus(); + } + } + } +} diff --git a/client/src/org/compiere/grid/GridController.java b/client/src/org/compiere/grid/GridController.java index 2b38438261..d6e1662ce5 100644 --- a/client/src/org/compiere/grid/GridController.java +++ b/client/src/org/compiere/grid/GridController.java @@ -13,6 +13,8 @@ * For the text or an alternative of this public license, you may reach us * * ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA * * or via info@compiere.org or http://www.compiere.org/license.html * + * @contributor Victor Perez , e-Evolution.SC FR [ 1757088 ] + * @contributor fer_luck @ centuryon *****************************************************************************/ package org.compiere.grid; @@ -96,6 +98,8 @@ import org.compiere.util.*; * @version $Id: GridController.java,v 1.8 2006/09/25 00:59:52 jjanke Exp $ * * @author Teo Sarca - BF [ 1742159 ], BF [ 1707876 ] + * @contributor Victor Perez , e-Evolution.SC FR [ 1757088 ] + * @contributor fer_luck @ centuryon FR [ 1757088 ] */ public class GridController extends CPanel implements DataStatusListener, ListSelectionListener, Evaluatee, @@ -139,12 +143,15 @@ public class GridController extends CPanel private CardLayout cardLayout = new CardLayout(); private JSplitPane srPane = new JSplitPane(); private JScrollPane vPane = new JScrollPane(); - private GridController vIncludedGC = null; + //FR [ 1757088 ] + private GridController detail = null; private CScrollPane mrPane = new CScrollPane(); private CPanel xPanel = new CPanel(); private FlowLayout xLayout = new FlowLayout(); private VTable vTable = new VTable(); - private VPanel vPanel = new VPanel(); + //FR [ 1757088 ] + private VPanel vPanel = null; + private boolean detailGrid = false; /** * Static Layout init @@ -174,10 +181,8 @@ public class GridController extends CPanel srPane.add(vPane, JSplitPane.TOP); srPane.setTopComponent(vPane); srPane.setBottomComponent(null); // otherwise a button is created/displayed - // - vPane.getViewport().add(xPanel, null); - xPanel.add(vPanel); - vPane.setBorder(null); + //FR [ 1757088 ] vPane.getViewport().add(xPanel, null); + //FR [ 1757088 ] xPanel.add(vPanel); xPanel.setLayout(xLayout); xPanel.setName("gc_xPanel"); xLayout.setAlignment(FlowLayout.LEFT); @@ -206,7 +211,7 @@ public class GridController extends CPanel if (m_mTab.needSave(true, false)) m_mTab.dataIgnore(); } - vIncludedGC = null; + //FR [ 1757088 ] vIncludedGC = null; // Listeners if (m_mTab.isLoadComplete()) @@ -295,6 +300,10 @@ public class GridController extends CPanel m_onlyMultiRow = onlyMultiRow; m_aPanel = aPanel; setName("GC-" + mTab); + //FR [ 1757088 ] + vPanel = new VPanel(mWindow.getName()); + vPane.getViewport().add(xPanel, null); + xPanel.add(vPanel); setTabLevel(m_mTab.getTabLevel()); @@ -414,60 +423,68 @@ public class GridController extends CPanel * @param gc grod controller to add * @return true if included */ - public boolean includeTab (GridController gc) - { - GridTab imcludedMTab = gc.getMTab(); - if (m_mTab.getIncluded_Tab_ID () != imcludedMTab.getAD_Tab_ID()) - return false; - // - vIncludedGC = gc; - vIncludedGC.switchMultiRow(); - // - Dimension size = getPreferredSize(); - srPane.setResizeWeight(.75); // top part gets 75% - srPane.add(vIncludedGC, JSplitPane.BOTTOM); - srPane.setBottomComponent(vIncludedGC); - srPane.setDividerSize (5); - // - int height = 150; - vIncludedGC.setPreferredSize(new Dimension(600, height)); - setPreferredSize(new Dimension(size.width, size.height+height)); - srPane.setDividerLocation (size.height); - // - imcludedMTab.setIncluded (true); - imcludedMTab.query (false, 0, 0); - // + //FR [ 1757088 ] + public boolean includeTab (GridController gc , APanel aPanel) + { + detail = gc; + int screenWidth = (int) Toolkit.getDefaultToolkit().getScreenSize().getWidth() - 630; + // Set screen dimension + detail.setPreferredSize(new Dimension(screenWidth, 250)); + ArrayList parents = detail.getMTab().getParentColumnNames(); + // No Parent - no link + if (parents.size() == 0) + ; + // Standard case + else if (parents.size() == 1) + detail.getMTab().setLinkColumnName((String)parents.get(0)); + detail.getMTab().query(false, 0, 0); + int c = VTable.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT; + vTable.getInputMap(c).put(KeyStroke.getKeyStroke(KeyEvent.VK_F4, 0), aPanel.aSave.getName()); + vTable.getActionMap().put(aPanel.aSave.getName(), aPanel.aSave); + org.jdesktop.swingx.JXTaskPane taskpanetab = vPanel.getTaskPane(detail.getMTab().getAD_Tab_ID()); + gc.isDetailGrid(true); + + if(taskpanetab != null) + { + APanel painel = new APanel(gc); + String name = detail.getMTab().getName() + ""; + taskpanetab.setTitle(name); + painel.add(detail); + taskpanetab.add(painel); + } + JRootPane rt = SwingUtilities.getRootPane(this); if (rt == null) System.out.println("Root pane null"); else { System.out.println("Root=" + rt); - rt.addMouseListener(vIncludedGC); + rt.addMouseListener(detail); Component gp = rt.getGlassPane(); if (gp == null) System.out.println("No Glass Pane"); else { System.out.println("Glass=" + gp); - gp.addMouseListener(vIncludedGC); + gp.addMouseListener(detail); } } - - vIncludedGC.addMouseListener(vIncludedGC); - vIncludedGC.enableEvents(AWTEvent.HIERARCHY_EVENT_MASK + AWTEvent.MOUSE_EVENT_MASK); - /** - vIncludedGC.splitPane.addMouseListener(vIncludedGC); - vIncludedGC.cardPanel.addMouseListener(vIncludedGC); - vIncludedGC.mrPane.addMouseListener(vIncludedGC); - vIncludedGC.vTable.addMouseListener(vIncludedGC); - **/ + detail.addMouseListener(detail); + detail.enableEvents(AWTEvent.HIERARCHY_EVENT_MASK + AWTEvent.MOUSE_EVENT_MASK); return true; } // IncludeTab + //FR [ 1757088 ] + public void isDetailGrid(boolean value){ + detailGrid = value; + } + + public boolean isDetailGrid(){ + return detailGrid; + } /** * Get Title * @return title @@ -731,7 +748,16 @@ public class GridController extends CPanel int rowTable = vTable.getSelectedRow(); int rowCurrent = m_mTab.getCurrentRow(); log.config("(" + m_mTab.toString() + ") Row in Table=" + rowTable + ", in Model=" + rowCurrent); - + // FR [ 1757088 ] + if(rowCurrent + 1 == vTable.getRowCount() && !isSingleRow() && Env.isAutoNew(Env.getCtx()) && m_mTab.getRecord_ID() != -1) + { + //stopEditor(true); + vTable.getSelectionModel().removeListSelectionListener(this); + m_mTab.dataNew(false); + dynamicDisplay(0); + vTable.getSelectionModel().addListSelectionListener(this); + return; + } if (rowTable == -1) // nothing selected { if (rowCurrent >= 0) @@ -754,9 +780,10 @@ public class GridController extends CPanel // log.config( "GridController.valueChanged (" + m_mTab.toString() + ") - fini", // "Row in Table=" + rowTable + ", in Model=" + rowCurrent); + // FR [ 1757088 ] // Query Included Tab - if (vIncludedGC != null) - vIncludedGC.getMTab().query(false, 0, 0); + if (detail != null) + detail.getMTab().query(false, 0, 0); } // valueChanged /** @@ -1151,4 +1178,10 @@ public class GridController extends CPanel { return m_mTab != null ? m_mTab.isCurrent() : false; } + + //FR [ 1757088 ] + public VPanel getvPanel() + { + return vPanel; + } } // GridController diff --git a/client/src/org/compiere/grid/VPanel.java b/client/src/org/compiere/grid/VPanel.java index 959fc26e0f..514c760e98 100644 --- a/client/src/org/compiere/grid/VPanel.java +++ b/client/src/org/compiere/grid/VPanel.java @@ -13,12 +13,14 @@ * For the text or an alternative of this public license, you may reach us * * ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA * * or via info@compiere.org or http://www.compiere.org/license.html * + * @contributor Victor Perez , e-Evolution.SC FR [ 1757088 ] *****************************************************************************/ package org.compiere.grid; import java.awt.*; import java.awt.event.*; import javax.swing.*; + import java.util.*; // import org.compiere.grid.ed.*; @@ -51,17 +53,23 @@ import org.compiere.util.*; * * @author Jorg Janke * @version $Id: VPanel.java,v 1.3 2006/07/30 00:51:28 jjanke Exp $ + * @contributor Victor Perez , e-Evolution.SC FR [ 1757088 ] */ -public final class VPanel extends CPanel +public final class VPanel extends CTabbedPane { + /** * Constructor */ - public VPanel() + public VPanel(String Name) { - super(new GridBagLayout()); - setName("VPanel"); - setBorder(null); + //[ 1757088 ] + CTabbedPane T = new CTabbedPane(); + m_main.setName(Name); + m_main.setLayout(new GridBagLayout()); + m_tablist.put("main", m_main); + this.setBorder(marginBorder); + this.add(m_main); // Set initial values of constraint m_gbc.anchor = GridBagConstraints.NORTHWEST; @@ -95,6 +103,12 @@ public final class VPanel extends CPanel private boolean m_hGapAdded = false; // only once /** Previous Field Group Header */ private String m_oldFieldGroup = null; + //[ 1757088 ] + private java.util.Hashtable m_tablist = new java.util.Hashtable(); + private java.util.Hashtable m_tabincludelist = new java.util.Hashtable(); + private CPanel m_main = new CPanel(org.compiere.plaf.CompiereColor.getDefaultBackground()); + private int typeGroup = 3; + private org.jdesktop.swingx.border.DropShadowBorder marginBorder = new org.jdesktop.swingx.border.DropShadowBorder(); /** Logger */ private static CLogger log = CLogger.getCLogger (VPanel.class); @@ -134,13 +148,49 @@ public final class VPanel extends CPanel */ public void addField (VEditor editor, GridField mField) { + //[ 1757088 ] + int AD_Tab_ID = mField.getIncluded_Tab_ID(); + if(AD_Tab_ID != 0 ) + { + m_gbc.gridx = 0; + m_gbc.gridy = m_line++; + m_gbc.gridwidth = 4; + org.jdesktop.swingx.JXTaskPaneContainer GroupPaneContainer = new org.jdesktop.swingx.JXTaskPaneContainer(); + org.jdesktop.swingx.JXTaskPane m_tab = new org.jdesktop.swingx.JXTaskPane(); + m_tab.setLayout(new BorderLayout()); + GroupPaneContainer.setBackground(org.compiere.plaf.CompiereColor.getDefaultBackground().getFlatColor()); + GroupPaneContainer.add(m_tab); + m_tabincludelist.put(AD_Tab_ID, m_tab); + m_gbc.anchor = GridBagConstraints.NORTHWEST; + m_gbc.gridx = 0; + m_gbc.gridheight = 1; + m_gbc.insets = new Insets(2,12,0,0); + m_gbc.gridy = m_line++; + m_gbc.gridwidth = 4; + m_gbc.fill = GridBagConstraints.HORIZONTAL; + m_gbc.weightx = 0; + m_gbc.ipadx = 0; + m_main.add(GroupPaneContainer,m_gbc); + return; + } CLabel label = VEditorFactory.getLabel(mField); if (label == null && editor == null) return; boolean sameLine = mField.isSameLine(); - if (addGroup(mField.getFieldGroup())) // sets top - sameLine = false; + //[ 1757088 ] // sets top + String fieldGroup = mField.getFieldGroup(); + if (fieldGroup == "") + { + fieldGroup = m_oldFieldGroup; + } + + if (addGroup(fieldGroup)) // sets top + sameLine = false; + else + { + fieldGroup = m_oldFieldGroup; + } if (sameLine) // Set line # m_gbc.gridy = m_line-1; @@ -164,7 +214,23 @@ public final class VPanel extends CPanel if (mField.isCreateMnemonic()) setMnemonic(label, mField.getMnemonic()); // Add Label - this.add(label, m_gbc); + //[ 1757088 ] + //this.add(label, m_gbc); + if (typeGroup == 1) + { + CPanel m_tab = (CPanel)m_tablist.get(fieldGroup); + m_tab.add(label, m_gbc); + + } + else if (typeGroup == 2) + { + org.jdesktop.swingx.JXTaskPane m_tab = (org.jdesktop.swingx.JXTaskPane)m_tablist.get(fieldGroup); + m_tab.add(label, m_gbc); + } + else if (typeGroup == 3) + { + m_main.add(label, m_gbc); + } } // *** The Field *** @@ -184,7 +250,21 @@ public final class VPanel extends CPanel // Weight factor for Fields m_gbc.weightx = 1; // Add Field - this.add(field, m_gbc); + //[ 1757088 ] + if (typeGroup == 1) + { + CPanel m_tab = (CPanel)m_tablist.get(fieldGroup); + m_tab.add(field, m_gbc); + } + else if (typeGroup == 2) + { + org.jdesktop.swingx.JXTaskPane m_tab = (org.jdesktop.swingx.JXTaskPane)m_tablist.get(fieldGroup); + m_tab.add(field, m_gbc); + } + else if (typeGroup == 3) + { + m_main.add(field, m_gbc); + } // Link Label to Field if (label != null) label.setLabelFor(field); @@ -208,19 +288,84 @@ public final class VPanel extends CPanel } if (fieldGroup == null || fieldGroup.length() == 0 || fieldGroup.equals(m_oldFieldGroup)) + return false; + + //[ 1757088 ] + if (m_tablist.get(fieldGroup) != null) + { return false; - m_oldFieldGroup = fieldGroup; + } - CPanel group = new CPanel(); - group.setBorder(new VLine(fieldGroup)); - group.add(Box.createVerticalStrut(VLine.SPACE)); - m_gbc.gridx = 0; - m_gbc.gridy = m_line++; - m_gbc.gridwidth = 4; - this.add(group, m_gbc); + //[ 1757088 ] + if (fieldGroup != null) + { + if (Env.getContext(Env.getCtx(),"#AD_Language").equals("en_US")) + { + typeGroup = DB.getSQLValue(null,"SELECT CASE WHEN FieldGroupType = 'T' THEN 1 WHEN FieldGroupType = 'C' THEN 2 WHEN FieldGroupType = 'L' THEN 3 END AS Type FROM AD_FieldGroup fg WHERE fg.Name= ? ", fieldGroup); + } + else + { + typeGroup = DB.getSQLValue(null,"SELECT CASE WHEN FieldGroupType = 'T' THEN 1 WHEN FieldGroupType = 'C' THEN 2 WHEN FieldGroupType = 'L' THEN 3 END AS Type FROM AD_FieldGroup fg INNER JOIN AD_FieldGroup_Trl fgtrl ON ( fg.AD_FieldGroup_ID = fgtrl.AD_FieldGroup_ID) WHERE fgtrl.Name= ? ", fieldGroup); + } + } + if(typeGroup < 1 ) + { + typeGroup = 3; + } + + if (typeGroup == 1) + { + + CPanel m_tab = new CPanel(org.compiere.plaf.CompiereColor.getDefaultBackground()); + m_tab.setLayout(new GridBagLayout()); + m_tab.setName(fieldGroup); + this.add(m_tab); + m_tablist.put(fieldGroup, m_tab); + m_oldFieldGroup= fieldGroup; + return true; + + } + else if (typeGroup == 2) + { + org.jdesktop.swingx.JXTaskPaneContainer GroupPaneContainer = new org.jdesktop.swingx.JXTaskPaneContainer(); + org.jdesktop.swingx.JXTaskPane m_tab = new org.jdesktop.swingx.JXTaskPane(); + GroupPaneContainer.setBackground(org.compiere.plaf.CompiereColor.getDefaultBackground().getFlatColor()); + + m_tab.setLayout(new GridBagLayout()); + m_tab.setTitle(fieldGroup); + m_tab.setName(fieldGroup); + m_tab.setAnimated(true); + GroupPaneContainer.add(m_tab); + m_gbc.anchor = GridBagConstraints.NORTHWEST; + //m_gbc.gridy = 0; // line + m_gbc.gridx = 0; + m_gbc.gridheight = 1; + m_gbc.insets = new Insets(2,12,0,0); + m_gbc.gridy = m_line++; + m_gbc.gridwidth = 4; + m_gbc.fill = GridBagConstraints.HORIZONTAL; + m_gbc.weightx = 0; + m_gbc.ipadx = 0; + m_main.add(GroupPaneContainer,m_gbc); + m_tablist.put(fieldGroup, m_tab); + m_oldFieldGroup = fieldGroup; + return true; + } + else if (typeGroup == 3) + { + CPanel group = new CPanel(); + group.setBorder(new VLine(fieldGroup)); + group.add(Box.createVerticalStrut(VLine.SPACE)); + m_gbc.gridx = 0; + m_gbc.gridy = m_line++; + m_gbc.gridwidth = 4; + m_main.add(group, m_gbc); // reset - m_gbc.gridwidth = 1; + m_gbc.gridwidth = 1; + m_oldFieldGroup = fieldGroup; return true; + } + return false; } // addGroup /** @@ -230,14 +375,15 @@ public final class VPanel extends CPanel { // Top Gap m_gbc.gridy = m_line++; - this.add(Box.createVerticalStrut(10), m_gbc); // top gap + //[ 1757088 ] + m_main.add(Box.createVerticalStrut(10), m_gbc); // top gap // Right gap m_gbc.gridx = 4; // 5th column m_gbc.gridwidth = 1; m_gbc.weightx = 0; m_gbc.insets = m_zeroInset; m_gbc.fill = GridBagConstraints.NONE; - this.add(Box.createHorizontalStrut(12), m_gbc); + m_main.add(Box.createHorizontalStrut(12), m_gbc); } // addTop /** @@ -252,7 +398,8 @@ public final class VPanel extends CPanel m_gbc.fill = GridBagConstraints.HORIZONTAL; m_gbc.weightx = 0; // - this.add(Box.createVerticalStrut(9), m_gbc); // botton gap + //[ 1757088 ] + m_main.add(Box.createVerticalStrut(9), m_gbc); } // addEnd /** @@ -451,5 +598,57 @@ public final class VPanel extends CPanel public void setBackground (int AD_Color_ID) { } // setBackground + //[ 1757088 ] + public org.jdesktop.swingx.JXTaskPane getTaskPane(int AD_Tab_ID) + { + return (org.jdesktop.swingx.JXTaskPane)m_tabincludelist.get(AD_Tab_ID); + } + //[ 1757088 ] + public Component[] getComponents() + { + java.util.ArrayList list = new java.util.ArrayList(); + + for (int i = 0; i < this.getTabCount(); i++) + { + list.add(this.getComponentAt(i)); + if (this.getComponentAt(i) instanceof CPanel) + { + CPanel tab = (CPanel)this.getComponentAt(i); + Component[] comp = tab.getComponents(); + + for (int c = 0; c < comp.length; c++) + { + + if ( comp [c] instanceof org.jdesktop.swingx.JXTaskPaneContainer) + { + org.jdesktop.swingx.JXTaskPaneContainer panetaskcontainer = (org.jdesktop.swingx.JXTaskPaneContainer)comp [c]; + + Component[] comppanetask = panetaskcontainer.getComponents(); + + for (int y = 0; y < comppanetask.length; y++) + { + + if ( comppanetask [y] instanceof org.jdesktop.swingx.JXTaskPane) + { + org.jdesktop.swingx.JXTaskPane tabtask = (org.jdesktop.swingx.JXTaskPane)comppanetask[y]; + Component[] comptabtask = tabtask.getContentPane().getComponents(); + + for (int x = 0; x < comptabtask.length; x++) + { + list.add(comptabtask[x]); + } + } + } + } + + list.add(comp[c]); + } + } + } + + Component[] result = new Component[list.size ()]; + list.toArray (result); + return result; + } } // VPanel diff --git a/migration/330-trunk/016_GridCollapseDetail.sql b/migration/330-trunk/016_GridCollapseDetail.sql new file mode 100644 index 0000000000..5a8da4294e --- /dev/null +++ b/migration/330-trunk/016_GridCollapseDetail.sql @@ -0,0 +1,204 @@ +--@author - fer_luck @ centuryono +--Add Detail column +--The fields are already in the databse. Just needs to update them +BEGIN; +update ad_field set seqno = seqno + 10 where ad_tab_id = 107 and seqno > 70; + +update ad_field +set ad_tab_id = 107, isdisplayed = 'Y', seqno = 80 +where ad_column_id = 8547; + +--It's not physically in the database, so here we create it +alter table ad_field add included_tab_id numeric(10); + +--Modify the views +drop view ad_field_v; +CREATE OR REPLACE VIEW AD_FIELD_V +(AD_WINDOW_ID, AD_TAB_ID, AD_FIELD_ID, AD_TABLE_ID, AD_COLUMN_ID, + NAME, DESCRIPTION, HELP, ISDISPLAYED, DISPLAYLOGIC, + DISPLAYLENGTH, SEQNO, SORTNO, ISSAMELINE, ISHEADING, + ISFIELDONLY, ISREADONLY, ISENCRYPTEDFIELD, OBSCURETYPE, COLUMNNAME, + COLUMNSQL, FIELDLENGTH, VFORMAT, DEFAULTVALUE, ISKEY, + ISPARENT, ISMANDATORY, ISIDENTIFIER, ISTRANSLATED, AD_REFERENCE_VALUE_ID, + CALLOUT, AD_REFERENCE_ID, AD_VAL_RULE_ID, AD_PROCESS_ID, ISALWAYSUPDATEABLE, + READONLYLOGIC, MANDATORYLOGIC, ISUPDATEABLE, ISENCRYPTEDCOLUMN, ISSELECTIONCOLUMN, TABLENAME, + VALUEMIN, VALUEMAX, FIELDGROUP, VALIDATIONCODE) +AS +SELECT t.AD_Window_ID, f.AD_Tab_ID, f.AD_Field_ID, tbl.AD_Table_ID, f.AD_Column_ID, + f.Name, f.Description, f.Help, f.IsDisplayed, f.DisplayLogic, f.DisplayLength, + f.SeqNo, f.SortNo, f.IsSameLine, f.IsHeading, f.IsFieldOnly, f.IsReadOnly, + f.IsEncrypted AS IsEncryptedField, f.ObscureType, + c.ColumnName, c.ColumnSQL, c.FieldLength, c.VFormat, c.DefaultValue, c.IsKey, c.IsParent, + COALESCE(f.IsMandatory, c.IsMandatory) AS IsMandatory, + c.IsIdentifier, c.IsTranslated, c.AD_Reference_Value_ID, + c.Callout, COALESCE(f.AD_Reference_ID, c.AD_Reference_ID) AS AD_Reference_ID, + c.AD_Val_Rule_ID, c.AD_Process_ID, c.IsAlwaysUpdateable, + c.ReadOnlyLogic, c.MandatoryLogic, c.IsUpdateable, c.IsEncrypted AS IsEncryptedColumn, + c.IsSelectionColumn, + tbl.TableName, c.ValueMin, c.ValueMax, + fg.Name AS FieldGroup, vr.Code AS ValidationCode, f.included_tab_id +FROM AD_Field f + INNER JOIN AD_Tab t ON (f.AD_Tab_ID = t.AD_Tab_ID) + LEFT OUTER JOIN AD_FieldGroup fg ON (f.AD_FieldGroup_ID = fg.AD_FieldGroup_ID) + LEFT OUTER JOIN AD_Column c ON (f.AD_Column_ID = c.AD_Column_ID) + INNER JOIN AD_Table tbl ON (c.AD_Table_ID = tbl.AD_Table_ID) + INNER JOIN AD_Reference r ON (c.AD_Reference_ID = r.AD_Reference_ID) + LEFT OUTER JOIN AD_Val_Rule vr ON (c.AD_Val_Rule_ID=vr.AD_Val_Rule_ID) +WHERE f.IsActive = 'Y' + AND c.IsActive = 'Y'; + + +drop view ad_field_vt; +CREATE OR REPLACE VIEW AD_FIELD_VT +(AD_LANGUAGE, AD_WINDOW_ID, AD_TAB_ID, AD_FIELD_ID, AD_TABLE_ID, + AD_COLUMN_ID, NAME, DESCRIPTION, HELP, ISDISPLAYED, + DISPLAYLOGIC, DISPLAYLENGTH, SEQNO, SORTNO, ISSAMELINE, + ISHEADING, ISFIELDONLY, ISREADONLY, ISENCRYPTEDFIELD, OBSCURETYPE, + COLUMNNAME, COLUMNSQL, FIELDLENGTH, VFORMAT, DEFAULTVALUE, + ISKEY, ISPARENT, ISMANDATORY, ISIDENTIFIER, ISTRANSLATED, + AD_REFERENCE_VALUE_ID, CALLOUT, AD_REFERENCE_ID, AD_VAL_RULE_ID, AD_PROCESS_ID, + ISALWAYSUPDATEABLE, READONLYLOGIC, MANDATORYLOGIC, ISUPDATEABLE, ISENCRYPTEDCOLUMN, ISSELECTIONCOLUMN, + TABLENAME, VALUEMIN, VALUEMAX, FIELDGROUP, VALIDATIONCODE) +AS +SELECT trl.AD_Language, t.AD_Window_ID, f.AD_Tab_ID, f.AD_Field_ID, tbl.AD_Table_ID, f.AD_Column_ID, + trl.Name, trl.Description, trl.Help, f.IsDisplayed, f.DisplayLogic, f.DisplayLength, + f.SeqNo, f.SortNo, f.IsSameLine, f.IsHeading, f.IsFieldOnly, f.IsReadOnly, + f.IsEncrypted AS IsEncryptedField, f.ObscureType, + c.ColumnName, c.ColumnSQL, c.FieldLength, c.VFormat, c.DefaultValue, c.IsKey, c.IsParent, + COALESCE(f.IsMandatory, c.IsMandatory) AS IsMandatory, + c.IsIdentifier, c.IsTranslated, c.AD_Reference_Value_ID, + c.Callout, COALESCE(f.AD_Reference_ID, c.AD_Reference_ID) AS AD_Reference_ID, + c.AD_Val_Rule_ID, c.AD_Process_ID, c.IsAlwaysUpdateable, + c.ReadOnlyLogic, c.MandatoryLogic, c.IsUpdateable, c.IsEncrypted AS IsEncryptedColumn, c.IsSelectionColumn, + tbl.TableName, c.ValueMin, c.ValueMax, + fgt.Name AS FieldGroup, vr.Code AS ValidationCode, f.included_tab_id +FROM AD_Field f + INNER JOIN AD_Field_Trl trl ON (f.AD_Field_ID = trl.AD_Field_ID) + INNER JOIN AD_Tab t ON (f.AD_Tab_ID = t.AD_Tab_ID) + LEFT OUTER JOIN AD_FieldGroup_Trl fgt ON + (f.AD_FieldGroup_ID = fgt.AD_FieldGroup_ID AND trl.AD_Language=fgt.AD_Language) + LEFT OUTER JOIN AD_Column c ON (f.AD_Column_ID = c.AD_Column_ID) + INNER JOIN AD_Table tbl ON (c.AD_Table_ID = tbl.AD_Table_ID) + INNER JOIN AD_Reference r ON (c.AD_Reference_ID = r.AD_Reference_ID) + LEFT OUTER JOIN AD_Val_Rule vr ON (c.AD_Val_Rule_ID=vr.AD_Val_Rule_ID) +WHERE f.IsActive = 'Y' + AND c.IsActive = 'Y'; + +--Add the Grid Collapse and Tabbed item navigation +INSERT INTO AD_ELEMENT + (ad_element_id, ad_client_id, ad_org_id, isactive, + created, createdby, + updated, updatedby, + columnname, entitytype, NAME, printname + ) + VALUES (53002, 0, 0, 'Y', + TO_DATE ('07/18/2007 14:23:01', 'MM/DD/YYYY HH24:MI:SS'), 100, + TO_DATE ('07/18/2007 14:23:01', 'MM/DD/YYYY HH24:MI:SS'), 100, + 'FieldGroupType', 'D', 'Field Group Type', 'Field Group Type' + ); + +insert into ad_reference + (ad_reference_id, ad_client_id, ad_org_id, isactive, + created, + updated, createdby, + updatedby, + name, description, help, + validationtype, entitytype) + VALUES (53000, 0, 0, 'Y', + TO_DATE ('07/18/2007 14:22:51', 'MM/DD/YYYY HH24:MI:SS'), + TO_DATE ('07/18/2007 14:22:51', 'MM/DD/YYYY HH24:MI:SS'), 100, + 100, 'AD_FieldGroup', 'Field Group Type', '', + 'L', 'D'); + +insert into ad_ref_list + (ad_ref_list_id, ad_client_id, ad_org_id, isactive, + created, + updated, createdby, + updatedby, + value, name, + ad_reference_id, entitytype) +VALUES(53000, 0, 0, 'Y', + TO_DATE ('07/18/2007 14:22:51', 'MM/DD/YYYY HH24:MI:SS'), + TO_DATE ('07/18/2007 14:22:51', 'MM/DD/YYYY HH24:MI:SS'), 100, + 100, + 'T', 'Tab', + 53000, 'D'); +insert into ad_ref_list + (ad_ref_list_id, ad_client_id, ad_org_id, isactive, + created, + updated, createdby, + updatedby, + value, name, + ad_reference_id, entitytype) +VALUES(53001, 0, 0, 'Y', + TO_DATE ('07/18/2007 14:22:51', 'MM/DD/YYYY HH24:MI:SS'), + TO_DATE ('07/18/2007 14:22:51', 'MM/DD/YYYY HH24:MI:SS'), 100, + 100, + 'L', 'Label', + 53000, 'D'); +insert into ad_ref_list + (ad_ref_list_id, ad_client_id, ad_org_id, isactive, + created, + updated, createdby, + updatedby, + value, name, + ad_reference_id, entitytype) +VALUES(53002, 0, 0, 'Y', + TO_DATE ('07/18/2007 14:22:51', 'MM/DD/YYYY HH24:MI:SS'), + TO_DATE ('07/18/2007 14:22:51', 'MM/DD/YYYY HH24:MI:SS'), 100, + 100, + 'C', 'Collapse', + 53000, 'D'); + +INSERT INTO AD_COLUMN + (ad_column_id, ad_client_id, ad_org_id, isactive, + created, + updated, createdby, + updatedby, NAME, description, + HELP, + VERSION, entitytype, columnname, ad_table_id, ad_reference_id, + fieldlength, iskey, isparent, ismandatory, isupdateable, + isidentifier, seqno, istranslated, isencrypted, + isselectioncolumn, ad_element_id, issyncdatabase, + isalwaysupdateable, ad_reference_value_id + ) + VALUES (53002, 0, 0, 'Y', + TO_DATE ('07/18/2007 14:22:51', 'MM/DD/YYYY HH24:MI:SS'), + TO_DATE ('07/18/2007 14:22:51', 'MM/DD/YYYY HH24:MI:SS'), 100, + 100, 'Field Group Type', 'Field Group', + 'Field Group.', + 0, 'D', 'FieldGroupType', 414, 17, + 10, 'N', 'N', 'N', 'Y', + 'N', null, 'N', 'N', + 'N', 53002, 'Y', + 'N', 53000 + ); + +ALTER TABLE ad_fieldgroup ADD fieldgrouptype char(1); + +INSERT INTO AD_FIELD + (ad_field_id, ad_client_id, ad_org_id, isactive, + created, createdby, + updated, updatedby, + NAME, description, + HELP, + iscentrallymaintained, ad_tab_id, ad_column_id, isdisplayed, + displaylength, isreadonly, seqno, sortno, issameline, isheading, + isfieldonly, isencrypted, entitytype + ) + VALUES (53002, 0, 0, 'Y', + TO_DATE ('07/18/2007 14:23:09', 'MM/DD/YYYY HH24:MI:SS'), 100, + TO_DATE ('07/18/2007 14:23:17', 'MM/DD/YYYY HH24:MI:SS'), 100, + 'Field Group Type', 'Field Group Type', + 'The Field Group type', + 'Y', 342, 53002, 'Y', + 10, 'N', 60, 0, 'N', 'N', + 'N', 'N', 'D' + ); + +COMMIT; + +-- NOTE: Don't forget to run the three processes: +-- 1 - Add missing translations in the language screen +-- 2 - Synchronize terminology +-- 3 - Check sequences diff --git a/migration/330-trunk/postgresql/016_GridCollapseDetail.sql b/migration/330-trunk/postgresql/016_GridCollapseDetail.sql new file mode 100644 index 0000000000..5a8da4294e --- /dev/null +++ b/migration/330-trunk/postgresql/016_GridCollapseDetail.sql @@ -0,0 +1,204 @@ +--@author - fer_luck @ centuryono +--Add Detail column +--The fields are already in the databse. Just needs to update them +BEGIN; +update ad_field set seqno = seqno + 10 where ad_tab_id = 107 and seqno > 70; + +update ad_field +set ad_tab_id = 107, isdisplayed = 'Y', seqno = 80 +where ad_column_id = 8547; + +--It's not physically in the database, so here we create it +alter table ad_field add included_tab_id numeric(10); + +--Modify the views +drop view ad_field_v; +CREATE OR REPLACE VIEW AD_FIELD_V +(AD_WINDOW_ID, AD_TAB_ID, AD_FIELD_ID, AD_TABLE_ID, AD_COLUMN_ID, + NAME, DESCRIPTION, HELP, ISDISPLAYED, DISPLAYLOGIC, + DISPLAYLENGTH, SEQNO, SORTNO, ISSAMELINE, ISHEADING, + ISFIELDONLY, ISREADONLY, ISENCRYPTEDFIELD, OBSCURETYPE, COLUMNNAME, + COLUMNSQL, FIELDLENGTH, VFORMAT, DEFAULTVALUE, ISKEY, + ISPARENT, ISMANDATORY, ISIDENTIFIER, ISTRANSLATED, AD_REFERENCE_VALUE_ID, + CALLOUT, AD_REFERENCE_ID, AD_VAL_RULE_ID, AD_PROCESS_ID, ISALWAYSUPDATEABLE, + READONLYLOGIC, MANDATORYLOGIC, ISUPDATEABLE, ISENCRYPTEDCOLUMN, ISSELECTIONCOLUMN, TABLENAME, + VALUEMIN, VALUEMAX, FIELDGROUP, VALIDATIONCODE) +AS +SELECT t.AD_Window_ID, f.AD_Tab_ID, f.AD_Field_ID, tbl.AD_Table_ID, f.AD_Column_ID, + f.Name, f.Description, f.Help, f.IsDisplayed, f.DisplayLogic, f.DisplayLength, + f.SeqNo, f.SortNo, f.IsSameLine, f.IsHeading, f.IsFieldOnly, f.IsReadOnly, + f.IsEncrypted AS IsEncryptedField, f.ObscureType, + c.ColumnName, c.ColumnSQL, c.FieldLength, c.VFormat, c.DefaultValue, c.IsKey, c.IsParent, + COALESCE(f.IsMandatory, c.IsMandatory) AS IsMandatory, + c.IsIdentifier, c.IsTranslated, c.AD_Reference_Value_ID, + c.Callout, COALESCE(f.AD_Reference_ID, c.AD_Reference_ID) AS AD_Reference_ID, + c.AD_Val_Rule_ID, c.AD_Process_ID, c.IsAlwaysUpdateable, + c.ReadOnlyLogic, c.MandatoryLogic, c.IsUpdateable, c.IsEncrypted AS IsEncryptedColumn, + c.IsSelectionColumn, + tbl.TableName, c.ValueMin, c.ValueMax, + fg.Name AS FieldGroup, vr.Code AS ValidationCode, f.included_tab_id +FROM AD_Field f + INNER JOIN AD_Tab t ON (f.AD_Tab_ID = t.AD_Tab_ID) + LEFT OUTER JOIN AD_FieldGroup fg ON (f.AD_FieldGroup_ID = fg.AD_FieldGroup_ID) + LEFT OUTER JOIN AD_Column c ON (f.AD_Column_ID = c.AD_Column_ID) + INNER JOIN AD_Table tbl ON (c.AD_Table_ID = tbl.AD_Table_ID) + INNER JOIN AD_Reference r ON (c.AD_Reference_ID = r.AD_Reference_ID) + LEFT OUTER JOIN AD_Val_Rule vr ON (c.AD_Val_Rule_ID=vr.AD_Val_Rule_ID) +WHERE f.IsActive = 'Y' + AND c.IsActive = 'Y'; + + +drop view ad_field_vt; +CREATE OR REPLACE VIEW AD_FIELD_VT +(AD_LANGUAGE, AD_WINDOW_ID, AD_TAB_ID, AD_FIELD_ID, AD_TABLE_ID, + AD_COLUMN_ID, NAME, DESCRIPTION, HELP, ISDISPLAYED, + DISPLAYLOGIC, DISPLAYLENGTH, SEQNO, SORTNO, ISSAMELINE, + ISHEADING, ISFIELDONLY, ISREADONLY, ISENCRYPTEDFIELD, OBSCURETYPE, + COLUMNNAME, COLUMNSQL, FIELDLENGTH, VFORMAT, DEFAULTVALUE, + ISKEY, ISPARENT, ISMANDATORY, ISIDENTIFIER, ISTRANSLATED, + AD_REFERENCE_VALUE_ID, CALLOUT, AD_REFERENCE_ID, AD_VAL_RULE_ID, AD_PROCESS_ID, + ISALWAYSUPDATEABLE, READONLYLOGIC, MANDATORYLOGIC, ISUPDATEABLE, ISENCRYPTEDCOLUMN, ISSELECTIONCOLUMN, + TABLENAME, VALUEMIN, VALUEMAX, FIELDGROUP, VALIDATIONCODE) +AS +SELECT trl.AD_Language, t.AD_Window_ID, f.AD_Tab_ID, f.AD_Field_ID, tbl.AD_Table_ID, f.AD_Column_ID, + trl.Name, trl.Description, trl.Help, f.IsDisplayed, f.DisplayLogic, f.DisplayLength, + f.SeqNo, f.SortNo, f.IsSameLine, f.IsHeading, f.IsFieldOnly, f.IsReadOnly, + f.IsEncrypted AS IsEncryptedField, f.ObscureType, + c.ColumnName, c.ColumnSQL, c.FieldLength, c.VFormat, c.DefaultValue, c.IsKey, c.IsParent, + COALESCE(f.IsMandatory, c.IsMandatory) AS IsMandatory, + c.IsIdentifier, c.IsTranslated, c.AD_Reference_Value_ID, + c.Callout, COALESCE(f.AD_Reference_ID, c.AD_Reference_ID) AS AD_Reference_ID, + c.AD_Val_Rule_ID, c.AD_Process_ID, c.IsAlwaysUpdateable, + c.ReadOnlyLogic, c.MandatoryLogic, c.IsUpdateable, c.IsEncrypted AS IsEncryptedColumn, c.IsSelectionColumn, + tbl.TableName, c.ValueMin, c.ValueMax, + fgt.Name AS FieldGroup, vr.Code AS ValidationCode, f.included_tab_id +FROM AD_Field f + INNER JOIN AD_Field_Trl trl ON (f.AD_Field_ID = trl.AD_Field_ID) + INNER JOIN AD_Tab t ON (f.AD_Tab_ID = t.AD_Tab_ID) + LEFT OUTER JOIN AD_FieldGroup_Trl fgt ON + (f.AD_FieldGroup_ID = fgt.AD_FieldGroup_ID AND trl.AD_Language=fgt.AD_Language) + LEFT OUTER JOIN AD_Column c ON (f.AD_Column_ID = c.AD_Column_ID) + INNER JOIN AD_Table tbl ON (c.AD_Table_ID = tbl.AD_Table_ID) + INNER JOIN AD_Reference r ON (c.AD_Reference_ID = r.AD_Reference_ID) + LEFT OUTER JOIN AD_Val_Rule vr ON (c.AD_Val_Rule_ID=vr.AD_Val_Rule_ID) +WHERE f.IsActive = 'Y' + AND c.IsActive = 'Y'; + +--Add the Grid Collapse and Tabbed item navigation +INSERT INTO AD_ELEMENT + (ad_element_id, ad_client_id, ad_org_id, isactive, + created, createdby, + updated, updatedby, + columnname, entitytype, NAME, printname + ) + VALUES (53002, 0, 0, 'Y', + TO_DATE ('07/18/2007 14:23:01', 'MM/DD/YYYY HH24:MI:SS'), 100, + TO_DATE ('07/18/2007 14:23:01', 'MM/DD/YYYY HH24:MI:SS'), 100, + 'FieldGroupType', 'D', 'Field Group Type', 'Field Group Type' + ); + +insert into ad_reference + (ad_reference_id, ad_client_id, ad_org_id, isactive, + created, + updated, createdby, + updatedby, + name, description, help, + validationtype, entitytype) + VALUES (53000, 0, 0, 'Y', + TO_DATE ('07/18/2007 14:22:51', 'MM/DD/YYYY HH24:MI:SS'), + TO_DATE ('07/18/2007 14:22:51', 'MM/DD/YYYY HH24:MI:SS'), 100, + 100, 'AD_FieldGroup', 'Field Group Type', '', + 'L', 'D'); + +insert into ad_ref_list + (ad_ref_list_id, ad_client_id, ad_org_id, isactive, + created, + updated, createdby, + updatedby, + value, name, + ad_reference_id, entitytype) +VALUES(53000, 0, 0, 'Y', + TO_DATE ('07/18/2007 14:22:51', 'MM/DD/YYYY HH24:MI:SS'), + TO_DATE ('07/18/2007 14:22:51', 'MM/DD/YYYY HH24:MI:SS'), 100, + 100, + 'T', 'Tab', + 53000, 'D'); +insert into ad_ref_list + (ad_ref_list_id, ad_client_id, ad_org_id, isactive, + created, + updated, createdby, + updatedby, + value, name, + ad_reference_id, entitytype) +VALUES(53001, 0, 0, 'Y', + TO_DATE ('07/18/2007 14:22:51', 'MM/DD/YYYY HH24:MI:SS'), + TO_DATE ('07/18/2007 14:22:51', 'MM/DD/YYYY HH24:MI:SS'), 100, + 100, + 'L', 'Label', + 53000, 'D'); +insert into ad_ref_list + (ad_ref_list_id, ad_client_id, ad_org_id, isactive, + created, + updated, createdby, + updatedby, + value, name, + ad_reference_id, entitytype) +VALUES(53002, 0, 0, 'Y', + TO_DATE ('07/18/2007 14:22:51', 'MM/DD/YYYY HH24:MI:SS'), + TO_DATE ('07/18/2007 14:22:51', 'MM/DD/YYYY HH24:MI:SS'), 100, + 100, + 'C', 'Collapse', + 53000, 'D'); + +INSERT INTO AD_COLUMN + (ad_column_id, ad_client_id, ad_org_id, isactive, + created, + updated, createdby, + updatedby, NAME, description, + HELP, + VERSION, entitytype, columnname, ad_table_id, ad_reference_id, + fieldlength, iskey, isparent, ismandatory, isupdateable, + isidentifier, seqno, istranslated, isencrypted, + isselectioncolumn, ad_element_id, issyncdatabase, + isalwaysupdateable, ad_reference_value_id + ) + VALUES (53002, 0, 0, 'Y', + TO_DATE ('07/18/2007 14:22:51', 'MM/DD/YYYY HH24:MI:SS'), + TO_DATE ('07/18/2007 14:22:51', 'MM/DD/YYYY HH24:MI:SS'), 100, + 100, 'Field Group Type', 'Field Group', + 'Field Group.', + 0, 'D', 'FieldGroupType', 414, 17, + 10, 'N', 'N', 'N', 'Y', + 'N', null, 'N', 'N', + 'N', 53002, 'Y', + 'N', 53000 + ); + +ALTER TABLE ad_fieldgroup ADD fieldgrouptype char(1); + +INSERT INTO AD_FIELD + (ad_field_id, ad_client_id, ad_org_id, isactive, + created, createdby, + updated, updatedby, + NAME, description, + HELP, + iscentrallymaintained, ad_tab_id, ad_column_id, isdisplayed, + displaylength, isreadonly, seqno, sortno, issameline, isheading, + isfieldonly, isencrypted, entitytype + ) + VALUES (53002, 0, 0, 'Y', + TO_DATE ('07/18/2007 14:23:09', 'MM/DD/YYYY HH24:MI:SS'), 100, + TO_DATE ('07/18/2007 14:23:17', 'MM/DD/YYYY HH24:MI:SS'), 100, + 'Field Group Type', 'Field Group Type', + 'The Field Group type', + 'Y', 342, 53002, 'Y', + 10, 'N', 60, 0, 'N', 'N', + 'N', 'N', 'D' + ); + +COMMIT; + +-- NOTE: Don't forget to run the three processes: +-- 1 - Add missing translations in the language screen +-- 2 - Synchronize terminology +-- 3 - Check sequences diff --git a/tools/build.xml b/tools/build.xml index 8f0942a84d..cdc9359360 100644 --- a/tools/build.xml +++ b/tools/build.xml @@ -317,7 +317,10 @@ - + + + +