Refactoring of [ 1757088 ] Grid Collapse and Tab Group
This commit is contained in:
parent
52b0db967b
commit
d10f57c561
|
@ -1024,6 +1024,14 @@ public class GridField
|
|||
{
|
||||
return m_vo.FieldGroup;
|
||||
}
|
||||
/**
|
||||
* Get Field Group Type
|
||||
* @return field group type
|
||||
*/
|
||||
public String getFieldGroupType()
|
||||
{
|
||||
return m_vo.FieldGroupType;
|
||||
}
|
||||
/**
|
||||
* Key
|
||||
* @return key
|
||||
|
|
|
@ -127,6 +127,8 @@ public class GridFieldVO implements Serializable
|
|||
vo.ValueMax = rs.getString (i);
|
||||
else if (columnName.equalsIgnoreCase("FieldGroup"))
|
||||
vo.FieldGroup = rs.getString (i);
|
||||
else if (columnName.equalsIgnoreCase("FieldGroupType"))
|
||||
vo.FieldGroupType = rs.getString (i);
|
||||
else if (columnName.equalsIgnoreCase("IsKey"))
|
||||
vo.IsKey = "Y".equals(rs.getString (i));
|
||||
else if (columnName.equalsIgnoreCase("IsParent"))
|
||||
|
@ -373,6 +375,8 @@ public class GridFieldVO implements Serializable
|
|||
public String ValueMax = "";
|
||||
/** Field Group */
|
||||
public String FieldGroup = "";
|
||||
/** Field Group Type */
|
||||
public String FieldGroupType = "";
|
||||
/** PK */
|
||||
public boolean IsKey = false;
|
||||
/** FK */
|
||||
|
@ -434,6 +438,8 @@ public class GridFieldVO implements Serializable
|
|||
DefaultValue = "";
|
||||
if (FieldGroup == null)
|
||||
FieldGroup = "";
|
||||
if (FieldGroupType == null)
|
||||
FieldGroupType = "";
|
||||
if (Description == null)
|
||||
Description = "";
|
||||
if (Help == null)
|
||||
|
@ -508,6 +514,7 @@ public class GridFieldVO implements Serializable
|
|||
clone.ValueMin = ValueMin;
|
||||
clone.ValueMax = ValueMax;
|
||||
clone.FieldGroup = FieldGroup;
|
||||
clone.FieldGroupType = FieldGroupType;
|
||||
clone.IsKey = IsKey;
|
||||
clone.IsParent = IsParent;
|
||||
clone.Callout = Callout;
|
||||
|
|
|
@ -29,6 +29,9 @@ import org.compiere.grid.ed.*;
|
|||
import org.compiere.model.*;
|
||||
import org.compiere.swing.*;
|
||||
import org.compiere.util.*;
|
||||
import org.jdesktop.swingx.JXTaskPane;
|
||||
import org.jdesktop.swingx.JXTaskPaneContainer;
|
||||
import org.jdesktop.swingx.border.DropShadowBorder;
|
||||
|
||||
/**
|
||||
* Single Row Panel.
|
||||
|
@ -120,8 +123,7 @@ public final class VPanel extends CTabbedPane
|
|||
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();
|
||||
private DropShadowBorder marginBorder = new DropShadowBorder();
|
||||
|
||||
/** Logger */
|
||||
private static CLogger log = CLogger.getCLogger (VPanel.class);
|
||||
|
@ -161,31 +163,31 @@ public final class VPanel extends CTabbedPane
|
|||
*/
|
||||
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 = createTaskPaneContainer();
|
||||
org.jdesktop.swingx.JXTaskPane m_tab = new org.jdesktop.swingx.JXTaskPane();
|
||||
m_tab.getContentPane().setBackground(AdempierePLAF.getFormBackground());
|
||||
m_tab.setLayout(new BorderLayout());
|
||||
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;
|
||||
}
|
||||
//[ 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;
|
||||
JXTaskPaneContainer GroupPaneContainer = createTaskPaneContainer();
|
||||
JXTaskPane m_tab = new JXTaskPane();
|
||||
m_tab.getContentPane().setBackground(AdempierePLAF.getFormBackground());
|
||||
m_tab.setLayout(new BorderLayout());
|
||||
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;
|
||||
|
@ -193,12 +195,13 @@ public final class VPanel extends CTabbedPane
|
|||
boolean sameLine = mField.isSameLine();
|
||||
//[ 1757088 ] // sets top
|
||||
String fieldGroup = mField.getFieldGroup();
|
||||
String fieldGroupType = mField.getFieldGroupType();
|
||||
if (fieldGroup == "")
|
||||
{
|
||||
fieldGroup = m_oldFieldGroup;
|
||||
}
|
||||
}
|
||||
|
||||
if (addGroup(fieldGroup)) // sets top
|
||||
if (addGroup(fieldGroup, fieldGroupType)) // sets top
|
||||
sameLine = false;
|
||||
else
|
||||
{
|
||||
|
@ -229,20 +232,20 @@ public final class VPanel extends CTabbedPane
|
|||
// Add Label
|
||||
//[ 1757088 ]
|
||||
//this.add(label, m_gbc);
|
||||
if (typeGroup == 1)
|
||||
if (fieldGroupType.equals(X_AD_FieldGroup.FIELDGROUPTYPE_Tab))
|
||||
{
|
||||
CPanel m_tab = (CPanel)m_tablist.get(fieldGroup);
|
||||
m_tab.add(label, m_gbc);
|
||||
|
||||
|
||||
}
|
||||
else if (typeGroup == 2)
|
||||
else if (fieldGroupType.equals(X_AD_FieldGroup.FIELDGROUPTYPE_Collapse))
|
||||
{
|
||||
org.jdesktop.swingx.JXTaskPane m_tab = (org.jdesktop.swingx.JXTaskPane)m_tablist.get(fieldGroup);
|
||||
JXTaskPane m_tab = (JXTaskPane)m_tablist.get(fieldGroup);
|
||||
m_tab.add(label, m_gbc);
|
||||
}
|
||||
else if (typeGroup == 3)
|
||||
{
|
||||
m_main.add(label, m_gbc);
|
||||
else // Label or null
|
||||
{
|
||||
m_main.add(label, m_gbc);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -253,7 +256,7 @@ public final class VPanel extends CTabbedPane
|
|||
// Default Width
|
||||
m_gbc.gridwidth = mField.isLongField() ? 3 : 1;
|
||||
m_gbc.insets = m_fieldInset;
|
||||
// m_gbc.fill = GridBagConstraints.NONE;
|
||||
// m_gbc.fill = GridBagConstraints.NONE;
|
||||
m_gbc.fill = GridBagConstraints.HORIZONTAL;
|
||||
// Set column #
|
||||
if (m_leftToRight)
|
||||
|
@ -264,17 +267,17 @@ public final class VPanel extends CTabbedPane
|
|||
m_gbc.weightx = 1;
|
||||
// Add Field
|
||||
//[ 1757088 ]
|
||||
if (typeGroup == 1)
|
||||
if (fieldGroupType.equals(X_AD_FieldGroup.FIELDGROUPTYPE_Tab))
|
||||
{
|
||||
CPanel m_tab = (CPanel)m_tablist.get(fieldGroup);
|
||||
m_tab.add(field, m_gbc);
|
||||
}
|
||||
else if (typeGroup == 2)
|
||||
else if (fieldGroupType.equals(X_AD_FieldGroup.FIELDGROUPTYPE_Collapse))
|
||||
{
|
||||
org.jdesktop.swingx.JXTaskPane m_tab = (org.jdesktop.swingx.JXTaskPane)m_tablist.get(fieldGroup);
|
||||
JXTaskPane m_tab = (JXTaskPane)m_tablist.get(fieldGroup);
|
||||
m_tab.add(field, m_gbc);
|
||||
}
|
||||
else if (typeGroup == 3)
|
||||
else // Label or null
|
||||
{
|
||||
m_main.add(field, m_gbc);
|
||||
}
|
||||
|
@ -289,9 +292,10 @@ public final class VPanel extends CTabbedPane
|
|||
/**
|
||||
* Add Group
|
||||
* @param fieldGroup field group
|
||||
* @param fieldGroupType
|
||||
* @return true if group added
|
||||
*/
|
||||
private boolean addGroup(String fieldGroup)
|
||||
private boolean addGroup(String fieldGroup, String fieldGroupType)
|
||||
{
|
||||
// First time - add top
|
||||
if (m_oldFieldGroup == null)
|
||||
|
@ -301,101 +305,84 @@ public final class VPanel extends CTabbedPane
|
|||
}
|
||||
|
||||
if (fieldGroup == null || fieldGroup.length() == 0 || fieldGroup.equals(m_oldFieldGroup))
|
||||
return false;
|
||||
|
||||
//[ 1757088 ]
|
||||
return false;
|
||||
|
||||
//[ 1757088 ]
|
||||
if (m_tablist.get(fieldGroup) != null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
//[ 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 )
|
||||
if (fieldGroupType.equals(X_AD_FieldGroup.FIELDGROUPTYPE_Tab))
|
||||
{
|
||||
typeGroup = 3;
|
||||
|
||||
CPanel m_tab = new CPanel(org.compiere.plaf.CompiereColor.getDefaultBackground());
|
||||
m_tab.setLayout(new GridBagLayout());
|
||||
m_tab.setName(fieldGroup);
|
||||
CPanel dummy = new CPanel();
|
||||
FlowLayout f = new FlowLayout();
|
||||
f.setAlignment(FlowLayout.LEFT);
|
||||
f.setHgap(0);
|
||||
f.setVgap(0);
|
||||
dummy.setLayout(f);
|
||||
dummy.setBorder(BorderFactory.createEmptyBorder());
|
||||
dummy.add(m_tab);
|
||||
dummy.setName(m_tab.getName());
|
||||
this.add(dummy);
|
||||
m_tablist.put(fieldGroup, m_tab);
|
||||
m_oldFieldGroup= fieldGroup;
|
||||
return true;
|
||||
|
||||
}
|
||||
|
||||
if (typeGroup == 1)
|
||||
{
|
||||
|
||||
CPanel m_tab = new CPanel(org.compiere.plaf.CompiereColor.getDefaultBackground());
|
||||
m_tab.setLayout(new GridBagLayout());
|
||||
m_tab.setName(fieldGroup);
|
||||
CPanel dummy = new CPanel();
|
||||
FlowLayout f = new FlowLayout();
|
||||
f.setAlignment(FlowLayout.LEFT);
|
||||
f.setHgap(0);
|
||||
f.setVgap(0);
|
||||
dummy.setLayout(f);
|
||||
dummy.setBorder(BorderFactory.createEmptyBorder());
|
||||
dummy.add(m_tab);
|
||||
dummy.setName(m_tab.getName());
|
||||
this.add(dummy);
|
||||
m_tablist.put(fieldGroup, m_tab);
|
||||
m_oldFieldGroup= fieldGroup;
|
||||
return true;
|
||||
|
||||
}
|
||||
else if (typeGroup == 2)
|
||||
else if (fieldGroupType.equals(X_AD_FieldGroup.FIELDGROUPTYPE_Collapse))
|
||||
{
|
||||
org.jdesktop.swingx.JXTaskPaneContainer GroupPaneContainer = createTaskPaneContainer();
|
||||
org.jdesktop.swingx.JXTaskPane m_tab = new org.jdesktop.swingx.JXTaskPane();
|
||||
m_tab.getContentPane().setBackground(AdempierePLAF.getFormBackground());
|
||||
|
||||
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;
|
||||
JXTaskPaneContainer GroupPaneContainer = createTaskPaneContainer();
|
||||
JXTaskPane m_tab = new JXTaskPane();
|
||||
m_tab.getContentPane().setBackground(AdempierePLAF.getFormBackground());
|
||||
|
||||
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)
|
||||
else // Label or null
|
||||
{
|
||||
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
|
||||
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_oldFieldGroup = fieldGroup;
|
||||
return true;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
} // addGroup
|
||||
|
||||
private org.jdesktop.swingx.JXTaskPaneContainer createTaskPaneContainer() {
|
||||
private JXTaskPaneContainer createTaskPaneContainer() {
|
||||
Color c = AdempierePLAF.getFormBackground();
|
||||
Color containerBg = new Color(Math.max((int)(c.getRed() * 0.97), 0),
|
||||
Math.max((int)(c.getGreen()*0.97), 0),
|
||||
Math.max((int)(c.getBlue() *0.97), 0));
|
||||
org.jdesktop.swingx.JXTaskPaneContainer GroupPaneContainer = new org.jdesktop.swingx.JXTaskPaneContainer();
|
||||
JXTaskPaneContainer GroupPaneContainer = new JXTaskPaneContainer();
|
||||
GroupPaneContainer.setBackground(containerBg);
|
||||
return GroupPaneContainer;
|
||||
}
|
||||
|
@ -630,10 +617,11 @@ public final class VPanel extends CTabbedPane
|
|||
public void setBackground (int AD_Color_ID)
|
||||
{
|
||||
} // setBackground
|
||||
|
||||
//[ 1757088 ]
|
||||
public org.jdesktop.swingx.JXTaskPane getTaskPane(int AD_Tab_ID)
|
||||
public JXTaskPane getTaskPane(int AD_Tab_ID)
|
||||
{
|
||||
return (org.jdesktop.swingx.JXTaskPane)m_tabincludelist.get(AD_Tab_ID);
|
||||
return (JXTaskPane)m_tabincludelist.get(AD_Tab_ID);
|
||||
}
|
||||
|
||||
private void findChildComponents(CPanel container, List list)
|
||||
|
@ -642,51 +630,52 @@ public final class VPanel extends CTabbedPane
|
|||
for (int c = 0; c < comp.length; c++)
|
||||
{
|
||||
list.add(comp[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]);
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if (comp[c] instanceof CPanel)
|
||||
{
|
||||
|
||||
findChildComponents((CPanel)comp[c], list);
|
||||
}
|
||||
if ( comp [c] instanceof JXTaskPaneContainer)
|
||||
{
|
||||
JXTaskPaneContainer panetaskcontainer = (JXTaskPaneContainer)comp [c];
|
||||
|
||||
Component[] comppanetask = panetaskcontainer.getComponents();
|
||||
|
||||
for (int y = 0; y < comppanetask.length; y++)
|
||||
{
|
||||
|
||||
if ( comppanetask [y] instanceof JXTaskPane)
|
||||
{
|
||||
JXTaskPane tabtask = (JXTaskPane)comppanetask[y];
|
||||
Component[] comptabtask = tabtask.getContentPane().getComponents();
|
||||
|
||||
for (int x = 0; x < comptabtask.length; x++)
|
||||
{
|
||||
list.add(comptabtask[x]);
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if (comp[c] instanceof CPanel)
|
||||
{
|
||||
|
||||
findChildComponents((CPanel)comp[c], list);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//[ 1757088 ]
|
||||
public Component[] getComponentsRecursive()
|
||||
{
|
||||
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 panel = (CPanel)this.getComponentAt(i);
|
||||
findChildComponents(panel, list);
|
||||
}
|
||||
}
|
||||
|
||||
Component[] result = new Component[list.size ()];
|
||||
list.toArray (result);
|
||||
return result;
|
||||
}
|
||||
} // VPanel
|
||||
public Component[] getComponentsRecursive()
|
||||
{
|
||||
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 panel = (CPanel)this.getComponentAt(i);
|
||||
findChildComponents(panel, list);
|
||||
}
|
||||
}
|
||||
|
||||
Component[] result = new Component[list.size ()];
|
||||
list.toArray (result);
|
||||
return result;
|
||||
}
|
||||
|
||||
} // VPanel
|
|
@ -6,34 +6,32 @@ CREATE OR REPLACE VIEW AD_FIELD_V
|
|||
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, INCLUDED_TAB_ID)
|
||||
READONLYLOGIC, MANDATORYLOGIC, ISUPDATEABLE, ISENCRYPTEDCOLUMN, ISSELECTIONCOLUMN,
|
||||
TABLENAME, VALUEMIN, VALUEMAX, FIELDGROUP, VALIDATIONCODE,
|
||||
INCLUDED_TAB_ID, FIELDGROUPTYPE)
|
||||
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,
|
||||
COALESCE(f.DefaultValue, c.DefaultValue) as DefaultValue,
|
||||
c.IsKey, c.IsParent,
|
||||
COALESCE(f.IsMandatory, c.IsMandatory) AS IsMandatory,
|
||||
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,
|
||||
COALESCE(f.DefaultValue, c.DefaultValue) AS 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.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.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)
|
||||
tbl.TableName, c.ValueMin, c.ValueMax,
|
||||
fg.NAME AS FieldGroup, vr.Code AS ValidationCode,
|
||||
f.Included_Tab_ID, fg.FieldGroupType
|
||||
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';
|
||||
|
||||
|
||||
|
||||
AND c.IsActive = 'Y'
|
||||
|
|
|
@ -6,35 +6,34 @@ CREATE OR REPLACE VIEW AD_FIELD_VT
|
|||
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, INCLUDED_TAB_ID)
|
||||
ISALWAYSUPDATEABLE, READONLYLOGIC, MANDATORYLOGIC, ISUPDATEABLE, ISENCRYPTEDCOLUMN,
|
||||
ISSELECTIONCOLUMN, TABLENAME, VALUEMIN, VALUEMAX, FIELDGROUP,
|
||||
VALIDATIONCODE, INCLUDED_TAB_ID, FIELDGROUPTYPE)
|
||||
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,
|
||||
COALESCE(f.DefaultValue, c.DefaultValue) as DefaultValue,
|
||||
c.IsKey, c.IsParent,
|
||||
COALESCE(f.IsMandatory, c.IsMandatory) AS IsMandatory,
|
||||
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,
|
||||
COALESCE(f.DefaultValue, c.DefaultValue) AS 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.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)
|
||||
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, fg.FieldGroupType
|
||||
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 fg ON (f.AD_FieldGroup_ID = fg.AD_FieldGroup_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';
|
||||
|
||||
|
||||
|
||||
AND c.IsActive = 'Y'
|
||||
|
|
|
@ -1,39 +1,63 @@
|
|||
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, INCLUDED_TAB_ID)
|
||||
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,
|
||||
COALESCE(f.DefaultValue, c.DefaultValue) as 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';
|
||||
|
||||
|
||||
|
||||
CREATE OR
|
||||
REPLACE VIEW ad_field_v 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.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,
|
||||
fg.FieldGroupType
|
||||
FROM ((((((AD_FIELD f
|
||||
JOIN AD_TAB t
|
||||
ON ((f.ad_tab_id = t.ad_tab_id)))
|
||||
LEFT JOIN AD_FIELDGROUP fg
|
||||
ON ((f.ad_fieldgroup_id = fg.ad_fieldgroup_id)))
|
||||
LEFT JOIN AD_COLUMN C
|
||||
ON ((f.ad_column_id = C.ad_column_id)))
|
||||
JOIN AD_TABLE tbl
|
||||
ON ((C.ad_table_id = tbl.ad_table_id)))
|
||||
JOIN AD_REFERENCE r
|
||||
ON ((C.ad_reference_id = r.ad_reference_id)))
|
||||
LEFT JOIN AD_VAL_RULE vr
|
||||
ON ((C.ad_val_rule_id = vr.ad_val_rule_id)))
|
||||
WHERE ((f.isactive = 'Y'::bpchar) AND
|
||||
(C.isactive = 'Y'::bpchar))
|
|
@ -1,40 +1,69 @@
|
|||
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, INCLUDED_TAB_ID)
|
||||
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,
|
||||
COALESCE(f.DefaultValue, c.DefaultValue) as 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';
|
||||
|
||||
|
||||
|
||||
CREATE OR
|
||||
REPLACE VIEW ad_field_vt 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.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,
|
||||
fg.FieldGroupType
|
||||
FROM (((((((AD_FIELD f
|
||||
JOIN AD_FIELD_TRL trl
|
||||
ON ((f.ad_field_id = trl.ad_field_id)))
|
||||
JOIN AD_TAB t
|
||||
ON ((f.ad_tab_id = t.ad_tab_id)))
|
||||
LEFT JOIN AD_FIELDGROUP fg
|
||||
ON (f.AD_FieldGroup_ID = fg.AD_FieldGroup_ID)
|
||||
LEFT JOIN AD_FIELDGROUP_TRL fgt
|
||||
ON (((f.ad_fieldgroup_id = fgt.ad_fieldgroup_id) AND
|
||||
((trl.AD_LANGUAGE)::text = (fgt.AD_LANGUAGE)::text))))
|
||||
LEFT JOIN AD_COLUMN C
|
||||
ON ((f.ad_column_id = C.ad_column_id)))
|
||||
JOIN AD_TABLE tbl
|
||||
ON ((C.ad_table_id = tbl.ad_table_id)))
|
||||
JOIN AD_REFERENCE r
|
||||
ON ((C.ad_reference_id = r.ad_reference_id)))
|
||||
LEFT JOIN AD_VAL_RULE vr
|
||||
ON ((C.ad_val_rule_id = vr.ad_val_rule_id)))
|
||||
WHERE ((f.isactive = 'Y'::bpchar) AND
|
||||
(C.isactive = 'Y'::bpchar))
|
|
@ -0,0 +1,59 @@
|
|||
CREATE OR REPLACE VIEW AD_FIELD_V
|
||||
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,
|
||||
COALESCE(f.DefaultValue, c.DefaultValue) AS 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, fg.FieldGroupType
|
||||
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'
|
||||
;
|
||||
|
||||
CREATE OR REPLACE VIEW AD_FIELD_VT
|
||||
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,
|
||||
COALESCE(f.DefaultValue, c.DefaultValue) AS 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, fg.FieldGroupType
|
||||
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 fg ON (f.AD_FieldGroup_ID = fg.AD_FieldGroup_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'
|
||||
;
|
|
@ -0,0 +1,135 @@
|
|||
CREATE OR
|
||||
REPLACE VIEW ad_field_v 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.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,
|
||||
fg.FieldGroupType
|
||||
FROM ((((((ad_field f
|
||||
JOIN ad_tab t
|
||||
ON ((f.ad_tab_id = t.ad_tab_id)))
|
||||
LEFT JOIN ad_fieldgroup fg
|
||||
ON ((f.ad_fieldgroup_id = fg.ad_fieldgroup_id)))
|
||||
LEFT JOIN ad_column C
|
||||
ON ((f.ad_column_id = C.ad_column_id)))
|
||||
JOIN ad_table tbl
|
||||
ON ((C.ad_table_id = tbl.ad_table_id)))
|
||||
JOIN ad_reference r
|
||||
ON ((C.ad_reference_id = r.ad_reference_id)))
|
||||
LEFT JOIN ad_val_rule vr
|
||||
ON ((C.ad_val_rule_id = vr.ad_val_rule_id)))
|
||||
WHERE ((f.isactive = 'Y'::bpchar) AND
|
||||
(C.isactive = 'Y'::bpchar))
|
||||
;
|
||||
|
||||
CREATE OR
|
||||
REPLACE VIEW ad_field_vt 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.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,
|
||||
fg.FieldGroupType
|
||||
FROM (((((((ad_field f
|
||||
JOIN ad_field_trl trl
|
||||
ON ((f.ad_field_id = trl.ad_field_id)))
|
||||
JOIN ad_tab t
|
||||
ON ((f.ad_tab_id = t.ad_tab_id)))
|
||||
LEFT JOIN AD_FIELDGROUP fg
|
||||
ON (f.AD_FieldGroup_ID = fg.AD_FieldGroup_ID)
|
||||
LEFT JOIN ad_fieldgroup_trl fgt
|
||||
ON (((f.ad_fieldgroup_id = fgt.ad_fieldgroup_id) AND
|
||||
((trl.ad_language)::text = (fgt.ad_language)::text))))
|
||||
LEFT JOIN ad_column C
|
||||
ON ((f.ad_column_id = C.ad_column_id)))
|
||||
JOIN ad_table tbl
|
||||
ON ((C.ad_table_id = tbl.ad_table_id)))
|
||||
JOIN ad_reference r
|
||||
ON ((C.ad_reference_id = r.ad_reference_id)))
|
||||
LEFT JOIN ad_val_rule vr
|
||||
ON ((C.ad_val_rule_id = vr.ad_val_rule_id)))
|
||||
WHERE ((f.isactive = 'Y'::bpchar) AND
|
||||
(C.isactive = 'Y'::bpchar))
|
||||
;
|
Loading…
Reference in New Issue