如何添加按钮以返回到Oracle Apex交互式网格中的另一个页面 [英] How do add a button to go back to another page in oracle apex interactive grid

查看:267
本文介绍了如何添加按钮以返回到Oracle Apex交互式网格中的另一个页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在oracle apex交互式网格中添加一个自定义按钮,以允许用户返回上一页.有人可以解释我该如何使用javascript吗?谢谢

I want to add a customized button in oracle apex interactive grid to allow users to go back to the previous page. Can someone explain how I can do this in javascript? Thanks

推荐答案

不使用javascript(推荐):

Without javascript (recommended):

  1. 创建按钮,例如 BTN_PREVIOUS ,以及一个隐藏的页面项 P1_PREVIOUS_PAGE
  2. 创建一个新分支:
  1. Create your button, let's say BTN_PREVIOUS, and a hidden page item, P1_PREVIOUS_PAGE
  2. Create a new branch:

点:处理后

行为类型:按项目标识的页面(仅显示)

Behavior Type: Page Identified by Item (Show only)

项目:选择您在第1步(P1_PREVIOUS_PAGE)创建的隐藏项目

Item: Select your hidden item created on step 1 (P1_PREVIOUS_PAGE)

服务器端条件:按下按钮时,BTN_PREVIOUS

Server-side Condition: When Button Pressed, BTN_PREVIOUS

现在,对于每个调用此页面的页面,您都必须将 P1_PREVIOUS_PAGE 设置为调用页面的编号.有无数种方法(通过声明性列表条目,URL,javascript),我建议您阅读

Now for every page that calls this one, you have to set the item P1_PREVIOUS_PAGE with the number of the calling page. There's innumerable ways to to this (through declarative list entries, URL, javascript), I recommend you to read https://docs.oracle.com/cd/E59726_01/doc.50/e39147/concept_url.htm

obs :如果执行上述步骤,请确保其他所有进程,计算和分支都具有服务器端条件,因为此方法依赖于提交页面,并且您不希望上一个"按钮触发已创建的任何其他逻辑.

Obs: if you do the steps above, make sure that every other process, computation and branches have a server side condition, because this method relies on submitting the page and you don't want your "Previous" button triggering any other logic that you have already created.

使用javascript:

With javascript:

  1. 创建您的按钮,例如 BTN_PREVIOUS ;
  2. 创建动态动作

时间: 事件:点击

选择类型:按钮

按钮: BTN_PREVIOUS

Button: BTN_PREVIOUS

在动态动作中创建一个真实动作:

Inside the dynamic action create a true action:

操作:执行JavaScript代码

Action: Execute JavaScript code

代码: history.back()

Code: history.back()

尽管javascript方法更简单,但始终最好使用工具(APEX)所提供的工具.

Although the javascript way is simpler, it's always preferable to use what the tool (APEX) has to offer.

这篇关于如何添加按钮以返回到Oracle Apex交互式网格中的另一个页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆