简体   繁体   English

如何将自动完成功能添加到oracle apex表格形式报表中的列

[英]how to add autocomplete function to a column in oracle apex tabular form report

我想添加一个自动完成功能以在我的一列假设名称中工作。使用items。容易做到,但是我如何在报告中做到这一点。

Since a report doesn't contain Apex items, you can't do this with the built in features. 由于报表不包含Apex项,因此您无法使用内置功能执行此操作。 Ignoring any possible plugins that may already be available, you can do this with jQuery UI, specifically the Autocomplete widget. 忽略任何可能已经可用的插件,您可以使用jQuery UI,特别是Autocomplete小部件来实现。 Apex already includes some of the jQuery UI suite, but you may need to download the Autocomplete widget from the jQuery website. Apex已经包含了一些jQuery UI套件,但是您可能需要从jQuery网站下载Autocomplete小部件。

This will need some custom work on your end. 这将需要您进行一些自定义工作。 This really isn't that hard if you know how to use jQuery. 如果您知道如何使用jQuery,这确实并不难。

  1. Download the jQuery UI Autocomplete widget and include it on your page. 下载jQuery UI自动完成小部件并将其包含在您的页面中。 You can put just the .js file for that in your Application Shared Items. 您可以仅将.js文件放入应用程序共享项中。 I have the whole jQuery UI library in a separate place on the webserver because I use different parts for different projects. 我将整个jQuery UI库放在Web服务器上的单独位置,因为我为不同的项目使用了不同的部分。
  2. Source in that widget in the page properties. 页面属性中该小部件中的源。
  3. You'll need to create text items with apex_item.text in your report. 您需要在报告中使用apex_item.text创建文本项。
  4. You'll need an On Page Load dynamic action to attach the Autocomplete widget to your text items. 您需要“页面加载”动态操作才能将“自动完成”窗口小部件附加到文本项。
  5. For the autocomplete source, if it's short, you can just use a Javascript variable that you put on the Apex page. 对于自动完成源,如果简短,则可以只使用放在Apex页面上的Javascript变量。 If it's longer or you need to find the list at run time, you can use a function that calls apex.server.process. 如果更长,或者需要在运行时查找列表,则可以使用调用apex.server.process的函数。
  6. If your report has Partial Page Refresh turned on, make sure the DA in step 4 has Dynamic scope, not Static. 如果您的报表已打开“部分页面刷新”,请确保步骤4中的DA具有动态范围,而不是静态范围。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM