Databases Reference
In-Depth Information
)
RETURN VARCHAR2
IS
v rownum VARCHAR2 (20);
v item VARCHAR2 (20);
v script VARCHAR2 (1000);
BEGIN
v rownum := p rownum;
v item := p item || ' ' || v rownum;
v script :=
'<script type="text/javascript">'
|| '$(document).ready( function() {'
|| '$("#'
|| v item
|| '").autocomplete(''APEX'', {'
|| 'apexProcess: '''
|| p process
|| ''','
|| 'width: '
|| p width
|| ','
|| 'multiple: false,'
|| 'matchContains: true,'
|| 'cacheLength: 1,'
|| 'max: 100,'
|| 'delay: 150,'
|| 'minChars: 1,'
|| 'matchSubset: false'
|| '});'
|| '});'
|| '</script>';
RETURN v script;
END get autocomplete;
There are only three more things you need to add or change to get your autocomplete list working:
Modify the SQL created for the Tabular Form and include a call to the function
get autocomplete
Create an On-Demand Process in the Application Processes:
get job
Modify the HTML Expression for the affected column JOB
The modified SQL is shown in Listing 3-15.
Listing 3-15. Tabular Form— SQL for Simple Autocomplete
SELECT empno,
empno
|| tab form emp pkg.get autocomplete ('f04', '#ROWNUM#', 85, 'get job') empno display,
 
Search WWH ::




Custom Search