Edit D:\app\Administrator\product\11.2.0\dbhome_1\apex\images\doc\TDPAX\td_bldsellst.htm
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=us-ascii" /> <meta http-equiv="Content-Style-Type" content="text/css" /> <meta http-equiv="Content-Script-Type" content="text/javascript" /> <title>Displaying Items as Select Lists</title> <meta name="generator" content="Oracle DARB XHTML Converter (Mode = ohj/ohw) - Version 5.1" /> <meta name="date" content="2009-04-14T18:17:40Z" /> <meta name="robots" content="noarchive" /> <meta name="doctitle" content="Displaying Items as Select Lists" /> <meta name="relnum" content="Release 3.2" /> <meta name="partnum" content="E11946-01" /> <link rel="copyright" href="../dcommon/html/cpyr.htm" title="Copyright" type="text/html" /> <link rel="stylesheet" href="../dcommon/css/blafdoc.css" title="Oracle BLAFDoc" type="text/css" /> <link rel="contents" href="toc.htm" title="Contents" type="text/html" /> <link rel="up" href="preface.htm" title="Home" type="text/html" /> <link rel="up" href="build_app.htm" title="Building Your Application" type="text/html" /> <link rel="up" href="td_bldsellst.htm" title="Displaying Items as Select ..." type="text/html" /> <link rel="prev" href="td_bldedit.htm" title="Previous" type="text/html" /> <link rel="next" href="td_bldlink.htm" title="Next" type="text/html" /> </head> <body> <p id="BREADCRUMBING"><a href="preface.htm" title="Home">Home</a> > <a href="build_app.htm" title="Building Your Application">Building Your Application</a> > Displaying Items as Select ...</p> <table class="simple oac_no_warn" summary="" cellspacing="0" cellpadding="0" width="100%"> <col width="86%" /> <col width="*" /> <tr valign="bottom"> <td align="left"></td> <td align="center"><a href="td_bldedit.htm"><img src="../dcommon/gifs/leftnav.gif" alt="Previous" /><br /> <span class="icon">Previous</span></a> </td> <td align="center"><a href="td_bldlink.htm"><img src="../dcommon/gifs/rightnav.gif" alt="Next" /><br /> <span class="icon">Next</span></a></td> </tr> </table> <p><a id="BCEIBDHI" name="BCEIBDHI"></a></p> <div class="sect1"><!-- infolevel="all" infotype="General" --> <h1><a name="TDPAX04007|how to display select lists"></a>Displaying Items as <a id="sthref220" name="sthref220"></a><a id="sthref221" name="sthref221"></a><a id="sthref222" name="sthref222"></a><a id="sthref223" name="sthref223"></a>Select Lists</h1> <p>In this exercise, you edit fields (items) on the Create/Edit Employee page to display as select lists. Select lists are drop-down lists that contain lists of values that users can select to populate a field in the application. Displaying items as select lists consists of two general steps:</p> <ol> <li> <p>Create the list of values (LOVs) for each item.</p> </li> <li> <p>Edit the item to display as a select list and reference the appropriate list of values you created.</p> </li> </ol> <a id="sthref224" name="sthref224"></a> <p class="subhead2">Topics:</p> <ul> <li> <p><a href="#BCEDCHFF">Creating Lists of Values</a></p> </li> <li> <p><a href="#BCEBFFAI">Editing Items to Display as Select Lists</a></p> </li> </ul> <a id="BCEDCHFF" name="BCEDCHFF"></a> <div class="sect2"><!-- infolevel="all" infotype="General" --> <h2>Creating Lists of <a id="sthref225" name="sthref225"></a><a id="sthref226" name="sthref226"></a>Values</h2> <p>Next, you create lists of values for jobs, employees, and departments.</p> <div class="sect3"><!-- infolevel="all" infotype="General" --><a id="sthref227" name="sthref227"></a> <h3>Creating a List of Values for Jobs</h3> <p>To create a list of values for jobs:</p> <ol> <li> <p>Click <span class="bold">Application</span> on the Developer toolbar (at the bottom of the page).</p> </li> <li> <p>Click <span class="bold">4 - Create/Edit Employee</span>.</p> </li> <li> <p>Under Shared Components, Lists of Values, click the <span class="bold">Create</span> icon. The <span class="bold">Create</span> icon resembles a plus sign (+) that overlaps a small page.</p> <img src="img/bldapp_criconlov.gif" alt="Description of bldapp_criconlov.gif follows" title="Description of bldapp_criconlov.gif follows" longdesc="img_text/bldapp_criconlov.htm" /><br /> <a id="sthref228" name="sthref228" href="img_text/bldapp_criconlov.htm">Description of the illustration bldapp_criconlov.gif</a><br /> <br /> <p>The Create List of Values Wizard appears.</p> </li> <li> <p>For Source, accept the default, <span class="bold">From Scratch</span>, and click <span class="bold">Next</span>.</p> </li> <li> <p>For Name and Type:</p> <ol> <li> <p>Name - Enter <code>JOBS</code>.</p> </li> <li> <p>Type - Select <span class="bold">Dynamic</span>.</p> </li> <li> <p>Click <span class="bold">Next</span>.</p> </li> </ol> </li> <li> <p>For Query or Static Values, replace the existing text with this:</p> <pre xml:space="preserve" class="oac_no_warn"> SELECT job_title d, job_id v FROM oehr_jobs ORDER BY d </pre> <p>Note that the first column selected is the one displayed to the user (d), and the second is the value stored in or retrieved from the database (v).</p> </li> <li> <p>Click <span class="bold">Create List of Values</span>.</p> <p>Shared Components do not appear on this Page Definition until they are explicitly added to this page. You add them later in this tutorial.</p> </li> </ol> </div> <!-- class="sect3" --> <div class="sect3"><!-- infolevel="all" infotype="General" --><a id="sthref229" name="sthref229"></a> <h3>Creating a List of Values for Employees</h3> <p>To create a list of values for employees:</p> <ol> <li> <p>Under Lists of Values, click the <span class="bold">Create</span> icon.</p> </li> <li> <p>For Source, accept the default, <span class="bold">From Scratch</span>, and click <span class="bold">Next</span>.</p> </li> <li> <p>For Name and Type:</p> <ol> <li> <p>Name - Enter <code>EMPLOYEES</code>.</p> </li> <li> <p>Type - Select <span class="bold">Dynamic</span>.</p> </li> <li> <p>Click <span class="bold">Next</span>.</p> </li> </ol> </li> <li> <p>For Query or Static Values, replace the existing text with this:</p> <pre xml:space="preserve" class="oac_no_warn"> SELECT first_name ||' '|| last_name d, employee_id v FROM oehr_employees ORDER BY last_name </pre></li> <li> <p>Click <span class="bold">Create List of Values</span>.</p> </li> </ol> </div> <!-- class="sect3" --> <div class="sect3"><!-- infolevel="all" infotype="General" --><a id="sthref230" name="sthref230"></a> <h3>Creating a List of Values for Departments</h3> <p>To create a list of values for departments:</p> <ol> <li> <p>Under Lists of Values, click the <span class="bold">Create</span> icon.</p> </li> <li> <p>For Source, accept the default, <span class="bold">From Scratch</span>, and click <span class="bold">Next</span>.</p> </li> <li> <p>For Name and Type:</p> <ol> <li> <p>Name - Enter <code>DEPARTMENTS</code>.</p> </li> <li> <p>Type - Select <span class="bold">Dynamic</span>.</p> </li> <li> <p>Click <span class="bold">Next</span>.</p> </li> </ol> </li> <li> <p>For Query or Static Values, replace the existing text with this:</p> <pre xml:space="preserve" class="oac_no_warn"> SELECT department_name d, department_id v FROM oehr_departments ORDER BY d </pre></li> <li> <p>Click <span class="bold">Create List of Values</span>.</p> </li> </ol> </div> <!-- class="sect3" --></div> <!-- class="sect2" --> <a id="BCEBFFAI" name="BCEBFFAI"></a> <div class="sect2"><!-- infolevel="all" infotype="General" --> <h2>Editing Items to Display as <a id="sthref231" name="sthref231"></a><a id="sthref232" name="sthref232"></a>Select Lists</h2> <p>After you create the lists of values, edit these items so they display as select lists. By default, the items display as text fields.</p> <p>You also rename the P4_JOB_ID, P4_MANAGER_ID, and P4_DEPARTMENT_ID items.</p> <p>To edit the job item:</p> <ol> <li> <p>Under Page Rendering, scroll down to the Items section.</p> <img src="img/item_sect.gif" alt="Description of item_sect.gif follows" title="Description of item_sect.gif follows" longdesc="img_text/item_sect.htm" /><br /> <a id="sthref233" name="sthref233" href="img_text/item_sect.htm">Description of the illustration item_sect.gif</a><br /> <br /> <p>Notice that the Items section lists all the items for this page. Currently all but two items show the default type of Text field.</p> </li> <li> <p>Click <span class="bold">P4_JOB_ID</span>.</p> <p>The Edit Page Item page appears.</p> </li> <li> <p>Under Name, select <span class="bold">Select List</span> from Display As.</p> </li> <li> <p>Under Label, change Label to <code>Job</code>.</p> </li> <li> <p>Scroll down to List of Values.</p> </li> <li> <p>From Named LOV, select <span class="bold">JOBS</span>.</p> </li> <li> <p>Click <span class="bold">Apply Changes</span>.</p> </li> </ol> <p>To edit the manager item:</p> <ol> <li> <p>Under Items, click <span class="bold">P4_MANAGER_ID</span>.</p> </li> <li> <p>Under Name, select <span class="bold">Select List</span> from Display As.</p> </li> <li> <p>Under Label, change Label to <code>Manager</code>.</p> </li> <li> <p>Under List of Values:</p> <ol> <li> <p>Named LOV - Select <span class="bold">EMPLOYEES</span>.</p> </li> <li> <p>Display Null - Select <span class="bold">Yes</span>.</p> </li> <li> <p>Null display value - Enter the following:</p> <pre xml:space="preserve" class="oac_no_warn"> - No Manager Assigned - </pre></li> </ol> <p>Note that you did not include this information for Jobs because the Job column is mandatory. For optional columns, such as Manager and Department, specify that the select list display a null record. You can also provide meaningful text to display to the user when this situation occurs.</p> </li> <li> <p>Click <span class="bold">Apply Changes</span>.</p> </li> </ol> <p>To edit the department item:</p> <ol> <li> <p>Under Items, select <span class="bold">P4_DEPARTMENT_ID</span>.</p> </li> <li> <p>Under Name, select <span class="bold">Select List</span> from Display As.</p> </li> <li> <p>Under Label, change Label to <code>Department</code>.</p> </li> <li> <p>Under List of Values:</p> <ol> <li> <p>Named LOV - Select <span class="bold">DEPARTMENTS</span>.</p> </li> <li> <p>Display Null - Select <span class="bold">Yes</span>.</p> </li> <li> <p>Null display value - Enter the following:</p> <pre xml:space="preserve" class="oac_no_warn"> - No Department Assigned - </pre></li> </ol> </li> <li> <p>Click <span class="bold">Apply Changes</span>.</p> </li> <li> <p>Run the page.</p> <img src="img/bldap_empeditfrm_lst.gif" alt="Description of bldap_empeditfrm_lst.gif follows" title="Description of bldap_empeditfrm_lst.gif follows" longdesc="img_text/bldap_empeditfrm_lst.htm" /><br /> <a id="sthref234" name="sthref234" href="img_text/bldap_empeditfrm_lst.htm">Description of the illustration bldap_empeditfrm_lst.gif</a><br /> <br /> <p>In the form, note that the Job, Manager, and Department fields now display as select lists.</p> </li> </ol> </div> <!-- class="sect2" --></div> <!-- class="sect1" --> <!-- Start Footer --> <div class="footer"> <table class="simple oac_no_warn" summary="" cellspacing="0" cellpadding="0" width="100%"> <col width="86%" /> <col width="*" /> <tr> <td align="left"><span class="copyrightlogo">Copyright © 2003, 2009, Oracle and/or its affiliates. All rights reserved.</span><br /> <a href="../dcommon/html/cpyr.htm"><span class="copyrightlogo">Legal Notices</span></a></td> <td align="center"><a href="td_bldedit.htm"><img src="../dcommon/gifs/leftnav.gif" alt="Previous" /><br /> <span class="icon">Previous</span></a> </td> <td align="center"><a href="td_bldlink.htm"><img src="../dcommon/gifs/rightnav.gif" alt="Next" /><br /> <span class="icon">Next</span></a></td> </tr> </table> </div> <!-- class="footer" --> </body> </html>
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de