Oracle Apex-将OnClick事件放在选项卡容器的选项卡上

发布于 2025-01-28 18:54:57 字数 755 浏览 2 评论 0 原文

我有一个带有三个选项卡的选项卡容器。他们在其上有精选的列表和复选框,其中以SQL查询为源。用户可以在列表中选择条目或编辑选中框,然后单击按钮将其保存到数据库中。此按钮还可以在保存后使用数据库中的当前数据重新填写选择列表和复选框。

我的问题是:当用户在选择列表中选择条目或编辑复选框并导航到Antoher选项卡时,而无需单击“保存”按钮时,当导航回到选项卡时,数据就会停留在此处。我想确保列表和复选框中所描绘的内容始终是当前数据,就像数据库中的表中的表格一样。

因此,我试图将onclick事件放在TabScontainer的标签上:

“

我没有工作,因为这些元素没有ID,我也无法为他们在顶点(至少我想是这样)。无论如何,有没有办法在Apex中执行此操作?

这是标签元素之一:

”

I've got a tabs container with three tabs. They have select lists and checkboxes on them which have sql queries as source. Users can select entries in the lists or edit the checked boxes and save this to the database by clicking a button. This button also re-fills the select lists and checkboxes with the current data from the database after saving it.

My problem is: When a user selects an entry in a select list or edits a check box and navigates to antoher tab without clicking on the "save" button, the data stays there when navigating back to the tab. I want to assure that what is depicted in the lists and check boxes is always the current data like it is in the tables in the database.

Therefore, I tried to put an onclick event on the tabs of the tabscontainer like this one:

tabs container

I didn't get it to work, becuase these elements do not have an ID and I can not set an ID for them in APEX (at least I guess so). Is there a way to do this in APEX anyway?

This is one of the tab elements:

html code

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

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

发布评论

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

评论(3

情绪失控 2025-02-04 18:54:57

以防万一其他任何人都遇到同样的问题:我通过在选项卡容器上进行自定义动态动作来解决它: “

每当用户在Tabs和Ehrefore之间切换并为我工作时,这会触发。:-)

有关更多信息,请查看本文:

Just in case anyone else is experiencing the same problem: I solved it by putting an custom dynamic action on the tabs container: enter image description here

This fires whenever the user switches between the tabs and ehrefore worked for me :-)

For more information check this article: https://medium.com/@pierre.yotti/tabs-region-javascript-api-in-oracle-apex-37e20bc9f68f

吻泪 2025-02-04 18:54:57

您可以将静态ID放在标签区域(例如#Some_Static_ID),然后使用jQuery选择器选择元素:

$("#SOME_STATIC_ID a.t-Tabs-link")

You can put a static ID to your tab region (for example #SOME_STATIC_ID) and then select the elements with a jQuery selector:

$("#SOME_STATIC_ID a.t-Tabs-link")
回眸一笑 2025-02-04 18:54:57

您还可以在选项卡的文本上定义单击“侦听器”:

$(".t-Tabs-label:contains('Tab 1')").click(function(){alert('Doing something on click of Tab 1 !!!')});

它可能不是最干净的解决方案,但它有效。

You could also define an on click listener on text of the tab:

$(".t-Tabs-label:contains('Tab 1')").click(function(){alert('Doing something on click of Tab 1 !!!')});

It might not be the cleanest solution but it works.

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