Oracle Apex 4 - PREVIOUS 和 NEXT、CLEAR 按钮逻辑存在问题

发布于 2024-10-11 01:05:48 字数 268 浏览 1 评论 0原文

我正在尝试创建一个简单的表单,在打开表单时显示最后创建的记录。上一个和下一个按钮允许在表中导航,而清除按钮允许您清除屏幕并输入新记录。

我创建了一个工作页面,其中包含一个显示表中数据的区域。

我使用向导创建了两个名为“上一个”和“下一个”的按钮(确实出现了)。

但按钮不允许执行任何操作。

所以我认为我需要一个流程来查找请求中带有按钮名称的提交,但我不确定要放入其中的内容。

对于 Clear 我也很困惑。

感谢您的任何帮助。

I'm trying to create a simple form where the last record created displays when the form is opened. Previous and Next buttons allow navigation through the table and Clear button allows you to clear the screen and enter a new record.

I created a working page with a region that displays the data in the table.

I created two buttons called Previous and Next using the wizard (which do appear).

But the buttons don't allow do anything.

So I think I need a process that looks for a submit with the button names in the request but I am not sure what to put into them.

Also for Clear I'm stumped as well.

Thanks for any help.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

这样的小城市 2024-10-18 01:05:48

您需要保存页面项(或多个项)中显示的记录的主键,并使用它们来查找填充表单时要使用的记录。然后,在处理“下一个”和“上一个”按钮的过程中,您需要代码来确定下一个/上一个记录的主键并更新页面项目。然后,当页面重新加载时,将显示下一条/上一条记录。

代码可能类似于(对于“下一步”按钮流程):

select empno
from emp
where empno = (select min(empno) from emp
               where  empno > :p1_empno);

You need to hold the primary key of the record being displayed in a page item (or items), and use these to find the record to use when populating the form. Then in the processes to handle the Next and Previous buttons you need code to detemine the primary key of the next/previous record and update the page items. Then when the page reloads the next/previous record will be displayed.

The code may be something like (for Next button process):

select empno
from emp
where empno = (select min(empno) from emp
               where  empno > :p1_empno);
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文