Edit D:\app\Administrator\product\11.2.0\dbhome_1\apex\images\doc\AEAPI\apex_item008.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>POPUP_FROM_QUERY 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="POPUP_FROM_QUERY 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_item008.htm" title="POPUP_FROM_QU..." type="text/html" /> <link rel="prev" href="apex_item007.htm" title="Previous" type="text/html" /> <link rel="next" href="apex_item009.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> > POPUP_FROM_QU...</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_item007.htm"><img src="../dcommon/gifs/leftnav.gif" alt="Previous" /><br /> <span class="icon">Previous</span></a> </td> <td align="center"><a href="apex_item009.htm"><img src="../dcommon/gifs/rightnav.gif" alt="Next" /><br /> <span class="icon">Next</span></a></td> </tr> </table> <p><a id="CHDEBCCI" name="CHDEBCCI"></a></p> <hr /> <div class="refsect1"> <h1><a name="AEAPI201" id="AEAPI201"></a>POPUP_FROM_QUERY <a id="sthref556" name="sthref556"></a>Function</h1> <p>This function generates an HTML popup select list from a query. Like other available functions in the <code>APEX_ITEM</code> package, the <code>POPUP_FROM_QUERY</code> function is designed to generate forms with <code>F01</code> to <code>F50</code> form array elements.</p> <a id="sthref557" name="sthref557"></a> <p class="subhead2">Syntax</p> <pre xml:space="preserve" class="oac_no_warn"> APEX_ITEM.POPUP_FROM_QUERY( p_idx IN NUMBER, p_value IN VARCHAR2 DEFAULT NULL, p_lov_query IN VARCHAR2, p_width IN VARCHAR2 DEFAULT NULL, p_max_length IN VARCHAR2 DEFAULT NULL, p_form_index IN VARCHAR2 DEFAULT '0', p_escape_html IN VARCHAR2 DEFAULT NULL, p_max_elements IN VARCHAR2 DEFAULT NULL, p_attributes IN VARCHAR2 DEFAULT NULL, p_ok_to_query IN VARCHAR2 DEFAULT 'YES', p_item_id IN VARCHAR2 DEFAULT NULL, p_item_label IN VARCHAR2 DEFAULT NULL) RETURN VARCHAR2; </pre> <a id="sthref558" name="sthref558"></a> <p class="subhead2">Parameters</p> <p><a href="#CHDCIFFG">Table: POPUP_FROM_QUERY Parameters</a> describes the parameters in the <code>POPUP_FROM_QUERY</code> function.</p> <div class="tblformal"><a id="sthref559" name="sthref559"></a><a id="CHDCIFFG" name="CHDCIFFG"></a> <p class="titleintable">POPUP_FROM_QUERY Parameters</p> <table class="Formal" title="POPUP_FROM_QUERY Parameters" summary="This table describes the parameters available in POPUP_FROM_QUERY." dir="ltr" border="1" width="100%" frame="hsides" rules="groups" cellpadding="3" cellspacing="0"> <col width="31%" /> <col width="*" /> <thead> <tr align="left" valign="top"> <th align="left" valign="bottom" id="r1c1-t10">Parameter</th> <th align="left" valign="bottom" id="r1c2-t10">Description</th> </tr> </thead> <tbody> <tr align="left" valign="top"> <td align="left" id="r2c1-t10" headers="r1c1-t10"> <p><code>p_idx</code></p> </td> <td align="left" headers="r2c1-t10 r1c2-t10"> <p>Form element name. For example, <code>1</code> equals <code>F01</code> and <code>2</code> equals <code>F02</code>. Typically, <code>p_idx</code> is a constant for a given column.</p> </td> </tr> <tr align="left" valign="top"> <td align="left" id="r3c1-t10" headers="r1c1-t10"> <p><code>p_value</code></p> </td> <td align="left" headers="r3c1-t10 r1c2-t10"> <p>Form element current value. This value should be one of the values in the <code>p_lov_query</code> parameter.</p> </td> </tr> <tr align="left" valign="top"> <td align="left" id="r4c1-t10" headers="r1c1-t10"> <p><code>p_lov_query</code></p> </td> <td align="left" headers="r4c1-t10 r1c2-t10"> <p>SQL query that is expected to select two columns (a display column and a return column). For example:</p> <pre xml:space="preserve" class="oac_no_warn"> SELECT dname, deptno FROM dept </pre></td> </tr> <tr align="left" valign="top"> <td align="left" id="r5c1-t10" headers="r1c1-t10"> <p><code>p_width</code></p> </td> <td align="left" headers="r5c1-t10 r1c2-t10"> <p>Width of the text box.</p> </td> </tr> <tr align="left" valign="top"> <td align="left" id="r6c1-t10" headers="r1c1-t10"> <p><code>p_max_length</code></p> </td> <td align="left" headers="r6c1-t10 r1c2-t10"> <p>Maximum number of characters that can be entered in the text box.</p> </td> </tr> <tr align="left" valign="top"> <td align="left" id="r7c1-t10" headers="r1c1-t10"> <p><code>p_form_index</code></p> </td> <td align="left" headers="r7c1-t10 r1c2-t10"> <p>HTML form on the page in which an item is contained. Defaults to 0 and rarely used.</p> <p>Only use this parameter when it is necessary to embed a custom form in your page template (such as a search field that posts to a different Web site). If this form comes before the <code>#FORM_OPEN#</code> substitution string, then its index is zero and the form opened automatically by Oracle Application Express must be referenced as form 1. This functionality supports the JavaScript used in the popup LOV that passes a value back to a form element.</p> </td> </tr> <tr align="left" valign="top"> <td align="left" id="r8c1-t10" headers="r1c1-t10"> <p><code>p_escape_html</code></p> </td> <td align="left" headers="r8c1-t10 r1c2-t10"> <p>Replacements for special characters that require an escaped equivalent.</p> <ul> <li> <p><code>&lt;</code> for <code><</code></p> </li> <li> <p><code>&gt;</code> for <code>></code></p> </li> <li> <p><code>&amp;</code> for <code>&</code></p> </li> </ul> <p>Range of values is <code>YES</code> and <code>NO</code>. If <code>YES</code>, special characters will be escaped. This parameter is useful if you know your query will return illegal HTML.</p> </td> </tr> <tr align="left" valign="top"> <td align="left" id="r9c1-t10" headers="r1c1-t10"> <p><code>p_max_elements</code></p> </td> <td align="left" headers="r9c1-t10 r1c2-t10"> <p>Limit on the number of rows that can be returned by your query. Limits the performance impact of user searches. By entering a value in this parameter, you force the user to search for a narrower set of results.</p> </td> </tr> <tr align="left" valign="top"> <td align="left" id="r10c1-t10" headers="r1c1-t10"> <p><code>p_attributes</code></p> </td> <td align="left" headers="r10c1-t10 r1c2-t10"> <p>Additional HTML attributes to use for the form item.</p> </td> </tr> <tr align="left" valign="top"> <td align="left" id="r11c1-t10" headers="r1c1-t10"> <p><code>p_ok_to_query</code></p> </td> <td align="left" headers="r11c1-t10 r1c2-t10"> <p>Range of values is <code>YES</code> and <code>NO</code>. If <code>YES</code>, a popup returns the first set of rows for the LOV. If <code>NO</code>, a search is initiated to return rows.</p> </td> </tr> <tr align="left" valign="top"> <td align="left" id="r12c1-t10" headers="r1c1-t10"> <p><code>p_item_id</code></p> </td> <td align="left" headers="r12c1-t10 r1c2-t10"> <p>ID attribute of the form element.</p> </td> </tr> <tr align="left" valign="top"> <td align="left" id="r13c1-t10" headers="r1c1-t10"> <p><code>p_item_label</code></p> </td> <td align="left" headers="r13c1-t10 r1c2-t10"> <p>Invisible label created for the item.</p> </td> </tr> </tbody> </table> <br /></div> <!-- class="tblformal" --> <a id="sthref560" name="sthref560"></a> <p class="subhead2">Example</p> <p>The following example demonstrates a sample query the generates a popup select list from the <code>emp</code> table.</p> <pre xml:space="preserve" class="oac_no_warn"> SELECT APEX_ITEM.POPUP_FROM_QUERY (1,deptno,'SELECT dname, deptno FROM dept') dt 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_item007.htm"><img src="../dcommon/gifs/leftnav.gif" alt="Previous" /><br /> <span class="icon">Previous</span></a> </td> <td align="center"><a href="apex_item009.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