Integrate Karsten's autocompletion from trunk revisions 5521 and 5670

FR [2003044] Autocomplete for Textfields
http://sourceforge.net/tracker/index.php?func=detail&aid=2003044&group_id=176962&atid=879335
[Ctrl + Tab] iterates through all available matches
This commit is contained in:
Carlos Ruiz 2008-07-29 20:40:22 +00:00
parent 524147954a
commit b8200b10ca
4 changed files with 88 additions and 191 deletions

View File

@ -1,15 +1,10 @@
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, FIELDGROUPTYPE, IsCollapsedByDefault, InfoFactoryClass)
AS
(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, FIELDGROUPTYPE, ISCOLLAPSEDBYDEFAULT, INFOFACTORYCLASS, ISAUTOCOMPLETE) 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,
@ -26,7 +21,8 @@ SELECT t.AD_Window_ID, f.AD_Tab_ID, f.AD_Field_ID, tbl.AD_Table_ID, f.AD_Column_
tbl.TableName, c.ValueMin, c.ValueMax,
fg.NAME AS FieldGroup, vr.Code AS ValidationCode,
f.Included_Tab_ID, fg.FieldGroupType, fg.IsCollapsedByDefault,
COALESCE(f.InfoFactoryClass, c.InfoFactoryClass) as InfoFactoryClass
COALESCE(f.InfoFactoryClass, c.InfoFactoryClass) as InfoFactoryClass,
c.IsAutocomplete
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)
@ -35,4 +31,4 @@ FROM AD_FIELD f
INNER JOIN AD_REFERENCE r ON (c.AD_Reference_ID = r.AD_Reference_ID)
LEFT OUTER JOIN AD_VAL_RULE vr ON (vr.AD_Val_Rule_ID = COALESCE(f.AD_Val_Rule_ID, c.AD_Val_Rule_ID))
WHERE f.IsActive = 'Y'
AND c.IsActive = 'Y'
AND c.IsActive = 'Y';

View File

@ -1,15 +1,10 @@
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, FIELDGROUPTYPE, IsCollapsedByDefault, InfoFactoryClass)
AS
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,
FIELDGROUPTYPE, ISCOLLAPSEDBYDEFAULT, INFOFACTORYCLASS, ISAUTOCOMPLETE) 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,
@ -25,7 +20,8 @@ SELECT trl.AD_LANGUAGE, t.AD_Window_ID, f.AD_Tab_ID, f.AD_Field_ID, tbl.AD_Table
tbl.TableName, c.ValueMin, c.ValueMax,
fgt.NAME AS FieldGroup, vr.Code AS ValidationCode,
f.Included_Tab_ID, fg.FieldGroupType, fg.IsCollapsedByDefault,
COALESCE(f.InfoFactoryClass, c.InfoFactoryClass) as InfoFactoryClass
COALESCE(f.InfoFactoryClass, c.InfoFactoryClass) as InfoFactoryClass,
c.IsAutocomplete
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)
@ -37,4 +33,4 @@ FROM AD_FIELD f
INNER JOIN AD_REFERENCE r ON (c.AD_Reference_ID = r.AD_Reference_ID)
LEFT OUTER JOIN AD_VAL_RULE vr ON (vr.AD_Val_Rule_ID=COALESCE(f.AD_Val_Rule_ID, c.AD_Val_Rule_ID))
WHERE f.IsActive = 'Y'
AND c.IsActive = 'Y'
AND c.IsActive = 'Y';

View File

@ -1,65 +1,22 @@
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,
COALESCE(f.ad_reference_value_id, c.ad_reference_value_id) AS ad_reference_value_id,
c.callout,
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,
COALESCE(f.ad_reference_value_id, c.ad_reference_value_id) AS ad_reference_value_id, c.callout,
COALESCE(f.ad_reference_id, c.ad_reference_id) AS ad_reference_id,
COALESCE(f.ad_val_rule_id, c.ad_val_rule_id) AS 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,
fg.IsCollapsedByDefault AS iscollapsedbydefault,
COALESCE(f.infofactoryclass, c.infofactoryclass) as infofactoryclass
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 ((vr.ad_val_rule_id = COALESCE(f.ad_val_rule_id, c.ad_val_rule_id))))
WHERE ((f.isactive = 'Y'::bpchar) AND
(c.isactive = 'Y'::bpchar));
COALESCE(f.ad_val_rule_id, c.ad_val_rule_id) AS 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, fg.iscollapsedbydefault,
COALESCE(f.infofactoryclass, c.infofactoryclass) AS infofactoryclass, c.isautocomplete
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 vr.ad_val_rule_id = COALESCE(f.ad_val_rule_id, c.ad_val_rule_id)
WHERE f.isactive = 'Y'::bpchar AND c.isactive = 'Y'::bpchar;

View File

@ -1,71 +1,19 @@
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,
COALESCE(f.ad_reference_value_id, c.ad_reference_value_id) AS ad_reference_value_id,
c.callout,
COALESCE(f.ad_reference_id, c.ad_reference_id) AS ad_reference_id,
COALESCE(f.ad_val_rule_id, c.ad_val_rule_id) AS 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,
fg.IsCollapsedByDefault AS iscollapsedbydefault ,
COALESCE(f.infofactoryclass, c.infofactoryclass) as infofactoryclass
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 ((vr.ad_val_rule_id = COALESCE(f.ad_val_rule_id, c.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, COALESCE(f.defaultvalue, c.defaultvalue) AS defaultvalue,
c.iskey, c.isparent, COALESCE(f.ismandatory, c.ismandatory) AS ismandatory, c.isidentifier, c.istranslated,
COALESCE(f.ad_reference_value_id, c.ad_reference_value_id) AS ad_reference_value_id, c.callout, COALESCE(f.ad_reference_id, c.ad_reference_id) AS ad_reference_id,
COALESCE(f.ad_val_rule_id, c.ad_val_rule_id) AS 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, fg.iscollapsedbydefault, COALESCE(f.infofactoryclass, c.infofactoryclass) AS infofactoryclass, c.isautocomplete
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 vr.ad_val_rule_id = COALESCE(f.ad_val_rule_id, c.ad_val_rule_id)
WHERE f.isactive = 'Y'::bpchar AND c.isactive = 'Y'::bpchar;