Edit D:\app\Administrator\product\11.2.0\dbhome_1\apex\images\doc\AEAPI\apex_item012.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>SELECT_LIST Function</title> <meta name="generator" content="Oracle DARB XHTML Converter (Mode = ohj/ohw) - Version 5.1" /> <meta name="date" content="2009-04-14T17:32:16Z" /> <meta name="robots" content="noarchive" /> <meta name="doctitle" content="SELECT_LIST Function" /> <meta name="relnum" content="Release 3.2" /> <meta name="partnum" content="E12510-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" title="Home" type="text/html" /> <link rel="up" href="apex_item.htm" title="APEX_ITEM" type="text/html" /> <link rel="up" href="apex_item012.htm" title="SELECT_LIST Function" type="text/html" /> <link rel="prev" href="apex_item011.htm" title="Previous" type="text/html" /> <link rel="next" href="apex_item013.htm" title="Next" type="text/html" /> </head> <body> <p id="BREADCRUMBING"><a href="preface" title="Home">Home</a> > <a href="apex_item.htm" title="APEX_ITEM">APEX_ITEM</a> > SELECT_LIST Function</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="apex_item011.htm"><img src="../dcommon/gifs/leftnav.gif" alt="Previous" /><br /> <span class="icon">Previous</span></a> </td> <td align="center"><a href="apex_item013.htm"><img src="../dcommon/gifs/rightnav.gif" alt="Next" /><br /> <span class="icon">Next</span></a></td> </tr> </table> <p><a id="CHDHJJAB" name="CHDHJJAB"></a></p> <hr /> <div class="refsect1"> <h1><a name="AEAPI205" id="AEAPI205"></a>SELECT_LIST <a id="sthref577" name="sthref577"></a>Function</h1> <p>This function dynamically generates a static select list. Similar to other functions available in the <code>APEX_ITEM</code> package, these select list functions are designed to generate forms with <code>F01</code> to <code>F50</code> form array elements.</p> <a id="sthref578" name="sthref578"></a> <p class="subhead2">Syntax</p> <pre xml:space="preserve" class="oac_no_warn"> APEX_ITEM.SELECT_LIST( p_idx IN NUMBER, p_value IN VARCHAR2 DEFAULT NULL, p_list_values IN VARCHAR2 DEFAULT NULL, p_attributes IN VARCHAR2 DEFAULT NULL, p_show_null IN VARCHAR2 DEFAULT 'NO', p_null_value IN VARCHAR2 DEFAULT '%NULL%', p_null_text IN VARCHAR2 DEFAULT '%', p_item_id IN VARCHAR2 DEFAULT NULL, p_item_label IN VARCHAR2 DEFAULT NULL, p_show_extra IN VARCHAR2 DEFAULT 'YES') RETURN VARCHAR2; </pre> <a id="sthref579" name="sthref579"></a> <p class="subhead2">Parameters</p> <p><a href="#CHDCBBHG">Table: SELECT_LIST Parameters</a> describes the parameters available in the <code>SELECT_LIST</code> function.</p> <div class="tblformal"><a id="sthref580" name="sthref580"></a><a id="CHDCBBHG" name="CHDCBBHG"></a> <p class="titleintable">SELECT_LIST Parameters</p> <table class="Formal" title="SELECT_LIST Parameters" summary="This table describes the parameters available in SELECT_LIST." dir="ltr" border="1" width="100%" frame="hsides" rules="groups" cellpadding="3" cellspacing="0"> <col width="21%" /> <col width="*" /> <thead> <tr align="left" valign="top"> <th align="left" valign="bottom" id="r1c1-t14">Parameter</th> <th align="left" valign="bottom" id="r1c2-t14">Description</th> </tr> </thead> <tbody> <tr align="left" valign="top"> <td align="left" id="r2c1-t14" headers="r1c1-t14"> <p><code>p_idx</code></p> </td> <td align="left" headers="r2c1-t14 r1c2-t14"> <p>Form element name. For example, <code>1</code> equals <code>F01</code> and <code>2</code> equals <code>F02</code>. Typically the <code>P_IDX</code> parameter is constant for a given column.</p> </td> </tr> <tr align="left" valign="top"> <td align="left" id="r3c1-t14" headers="r1c1-t14"> <p><code>p_value</code></p> </td> <td align="left" headers="r3c1-t14 r1c2-t14"> <p>Current value. This value should be a value in the <code>P_LIST_VALUES</code> parameter.</p> </td> </tr> <tr align="left" valign="top"> <td align="left" id="r4c1-t14" headers="r1c1-t14"> <p><code>p_list_values</code></p> </td> <td align="left" headers="r4c1-t14 r1c2-t14"> <p>List of static values separated by commas. Displays values and returns values that are separated by semicolons.</p> <p>Note that this is only available in the <code>SELECT_LIST</code> function.</p> </td> </tr> <tr align="left" valign="top"> <td align="left" id="r5c1-t14" headers="r1c1-t14"> <p><code>p_attributes</code></p> </td> <td align="left" headers="r5c1-t14 r1c2-t14"> <p>Extra HTML parameters you want to add.</p> </td> </tr> <tr align="left" valign="top"> <td align="left" id="r6c1-t14" headers="r1c1-t14"> <p><code>p_show_null</code></p> </td> <td align="left" headers="r6c1-t14 r1c2-t14"> <p>Extra select option to enable the NULL selection. Range of values is <code>YES</code> and <code>NO</code>.</p> </td> </tr> <tr align="left" valign="top"> <td align="left" id="r7c1-t14" headers="r1c1-t14"> <p><code>p_null_value</code></p> </td> <td align="left" headers="r7c1-t14 r1c2-t14"> <p>Value to be returned when a user selects the NULL option. Only relevant when <code>p_show_null</code> equals <code>YES</code>.</p> </td> </tr> <tr align="left" valign="top"> <td align="left" id="r8c1-t14" headers="r1c1-t14"> <p><code>p_null_text</code></p> </td> <td align="left" headers="r8c1-t14 r1c2-t14"> <p>Value to be displayed when a user selects the NULL option. Only relevant when <code>p_show_null</code> equals YES.</p> </td> </tr> <tr align="left" valign="top"> <td align="left" id="r9c1-t14" headers="r1c1-t14"> <p><code>p_item_id</code></p> </td> <td align="left" headers="r9c1-t14 r1c2-t14"> <p>HTML attribute ID for the <<code>input</code>> tag.</p> </td> </tr> <tr align="left" valign="top"> <td align="left" id="r10c1-t14" headers="r1c1-t14"> <p><code>p_item_label</code></p> </td> <td align="left" headers="r10c1-t14 r1c2-t14"> <p>Invisible lable created for the item.</p> </td> </tr> <tr align="left" valign="top"> <td align="left" id="r11c1-t14" headers="r1c1-t14"> <p><code>p_show_extra</code></p> </td> <td align="left" headers="r11c1-t14 r1c2-t14"> <p>Shows the current value even if the value of p_value is not located in the select list.</p> </td> </tr> </tbody> </table> <br /></div> <!-- class="tblformal" --> <a id="sthref581" name="sthref581"></a> <p class="subhead2">Example</p> <p>The following example demonstrates a static select list that displays <code>Yes</code>, returns <code>Y</code>, defaults to <code>Y</code>, and generates a <code>F01</code> form item.</p> <pre xml:space="preserve" class="oac_no_warn"> SELECT APEX_ITEM.SELECT_LIST(1,'Y','Yes;Y,No;N')yn FROM emp </pre> <p>The following example demonstrates the use of <code>APEX_ITEM.SELECT_LIST</code> to generate a static select list where:</p> <ul> <li> <p>A form array element <code>F03</code> will be generated (<code>p_idx</code> parameter).</p> </li> <li> <p>The initial value for each element will be equal to the value for <code>deptno</code> for the row from <code>emp</code> (<code>p_value</code> parameter).</p> </li> <li> <p>The select list will contain 4 options (<code>p_list_values</code> parameter).</p> </li> <li> <p>The text within the select list will display in red (<code>p_attributes</code> parameter).</p> </li> <li> <p>A null option will be displayed (<code>p_show_null</code>) and this option will display <code>-Select-</code> as the text (<code>p_null_text</code> parameter).</p> </li> <li> <p>An HTML ID attribute will be generated for each row, where <code>#ROWNUM#</code> will be substituted for the current row <code>rownum</code> (<code>p_item_id</code> parameter). (So an ID of '<code>f03_4</code>' will be generated for row 4.)</p> </li> <li> <p>A HTML label element will be generated for each row (<code>p_item_label</code> parameter).</p> </li> <li> <p>The current value for <code>deptno</code> will be displayed, even if it is not contained with the list of values passed in the <code>p_list_values</code> parameter (<code>p_show_extra</code> parameter).</p> </li> </ul> <pre xml:space="preserve" class="oac_no_warn"> SELECT empno "Employee #", ename "Name", APEX_ITEM.SELECT_LIST( p_idx => 3, p_value => deptno, p_list_values => 'ACCOUNTING;10,RESEARCH;20,SALES;30,OPERATIONS;40', p_attributes => 'style="color:red;"', p_show_null => 'YES', p_null_value => NULL, p_null_text => '-Select-', p_item_id => 'f03_#ROWNUM#', p_item_label => 'Label for f03_#ROWNUM#', p_show_extra => 'YES') "Department" FROM emp; </pre></div> <!-- class="refsect1" --> <!-- 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="apex_item011.htm"><img src="../dcommon/gifs/leftnav.gif" alt="Previous" /><br /> <span class="icon">Previous</span></a> </td> <td align="center"><a href="apex_item013.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