Copyright Ó Oracle Corporation, All rights reserved. 77 Creating LOVs and Editors
Copyright Ó Oracle Corporation, All rights reserved. 7-2 Objectives After completing this lesson, you should be able to do the following: Describe LOVs and editors Design, create, and associate LOVs with text items in a form module Create editors and associate them with text items in a form module After completing this lesson, you should be able to do the following: Describe LOVs and editors Design, create, and associate LOVs with text items in a form module Create editors and associate them with text items in a form module
Copyright Ó Oracle Corporation, All rights reserved. 7-3 LOVs and Editors Text item Editor Text item LOV Supporting data record group
Copyright Ó Oracle Corporation, All rights reserved. 7-4 LOVs and Editors LOVs –List of values for text items –Dynamic or static list –Independent of single text items –Flexible and efficient Editors –Override default editor –Used for special requirements such as larger editing window, position, color, and title –System editor available as an option LOVs –List of values for text items –Dynamic or static list –Independent of single text items –Flexible and efficient Editors –Override default editor –Used for special requirements such as larger editing window, position, color, and title –System editor available as an option
Copyright Ó Oracle Corporation, All rights reserved. 7-5 LOVs and Record Groups Text item LOV Text item LOV Record group SQL Database Record group based on static data Query-basedrecordgroup OR
Copyright Ó Oracle Corporation, All rights reserved. 7-6 LOVs S_CUSTOMERtable S_CUSTOMER table SELECT name, id, phone, city FROM s_customer ORDER BY name SELECT name, id, phone, city FROM s_customer ORDER BY name nameidphonecityCustomers record group CustomersLOV
Copyright Ó Oracle Corporation, All rights reserved. 7-7 New LOV
Copyright Ó Oracle Corporation, All rights reserved. 7-8 LOV Queries Avoid very large queries—use restrictions. Use column in LOV to validate user input—place this column first in SELECT list. Define return items later, or use optional INTO clause. Use optional WHERE, GROUP BY, and ORDER BY clauses. Avoid very large queries—use restrictions. Use column in LOV to validate user input—place this column first in SELECT list. Define return items later, or use optional INTO clause. Use optional WHERE, GROUP BY, and ORDER BY clauses.
Copyright Ó Oracle Corporation, All rights reserved. 7-9 LOV Properties Filter Before Display ? (X,Y) AutomaticSelect AutomaticSkip Automatic Display Width Height LOV Column Mapping Return Items
Copyright Ó Oracle Corporation, All rights reserved LOV Properties LOV Column Mapping Return Items AutomaticPosition Automatic Column Width
Copyright Ó Oracle Corporation, All rights reserved LOV Column Mapping S_CUSTOMER table SELECT name, id, phone, city FROM s_customer ORDER BY name SELECT name, id, phone, city FROM s_customer ORDER BY name nameidphonecityCustomers record group CustomersLOV customer.namecustomer.id Phone City San Pedro De San Francisco New Delhi Nogales Hidden columns customer.phonecustomer.city
Copyright Ó Oracle Corporation, All rights reserved Creating an LOV Using the LOV Wizard: SQL Query Page
Copyright Ó Oracle Corporation, All rights reserved Creating an LOV Using the LOV Wizard: Column Selection Page
Copyright Ó Oracle Corporation, All rights reserved Creating an LOV Using the LOV Wizard: Column Properties Page
Copyright Ó Oracle Corporation, All rights reserved Creating an LOV Using the LOV Wizard: Display Page
Copyright Ó Oracle Corporation, All rights reserved Creating an LOV Using the LOV Wizard: Advanced Properties Page
Copyright Ó Oracle Corporation, All rights reserved Editors
Copyright Ó Oracle Corporation, All rights reserved Editors Associate one of three types of editors with a text item. Set text item’s Editor property to one of the following: –Null (default Form Builder editor) –editor_name (customized editor) –SYSTEM_EDITOR (external editor) Associate one of three types of editors with a text item. Set text item’s Editor property to one of the following: –Null (default Form Builder editor) –editor_name (customized editor) –SYSTEM_EDITOR (external editor)
Copyright Ó Oracle Corporation, All rights reserved Summary LOVs and editors are form objects. LOVs and editors can be shared across text items. There are three steps to implement an LOV. Text items can use the default editor, a custom editor, or a system editor. LOVs and editors are form objects. LOVs and editors can be shared across text items. There are three steps to implement an LOV. Text items can use the default editor, a custom editor, or a system editor.
Copyright Ó Oracle Corporation, All rights reserved Practice 7 Overview This practice covers the following topics: Creating an LOV and attaching the LOV to a text item Creating an editor and attaching the editor to a text item This practice covers the following topics: Creating an LOV and attaching the LOV to a text item Creating an editor and attaching the editor to a text item