具有多个返回项的值列表

发布于 2024-12-14 08:52:38 字数 1301 浏览 2 评论 0原文

值列表,在 Apex 中具有多个列和多个返回值。这是我在网上多次看到的一个问题,但我也在努力解决这个问题。

来自 Oracle Forms,现在将表单迁移到 Apex,这是我非常缺少的一个功能。内置的 popup-lov 是多么的基础,这仍然让我有点困惑。 例如,现在我正在制作一些较小的表单,每个表单都有大约 4 或 5 个多记录列,除了链接 2 个值之外没有什么其他的。第1列:某个值,例如在sap中使用,第2列:oracle数据库中的一条记录的id(与块的基表不同的另一个表)。在第 2 列上有一个 lov,带有来自列表的验证,并显示 3 列,但也返回 3 列。因此,您可以从 lov 中选择一条记录,并且将自动填写 id,以及该 id 的“名称”和“描述”。第 1 列和第 2 列构成块的基表。

现在,在 Apex 中,我默认会放弃此功能。所以现在,我主要用 javascript 编写 onchange 事件,并通过 ajax 回调过程获取值。在弹出窗口中,我连接了 3 列。然而,当您想强制用户从 lov 中选择一个值(“不可输入,显示显示值和存储返回值”)时,这看起来很愚蠢(以我最谦虚的观点):该项目将包含在爱,不仅仅是我更愿意显示的 id - 另外,我已经通过 ajax 回调填充了其他 2 个字段。

不得不处理这个问题有点刺痛。用户习惯于使用这些旧的(领先生成的)表单,只有 2 个可输入的列,其中一个有一个 lov。现在他们需要开始使用这项“新技术”,尽管需要进行一些调整,但这个领域有时确实感觉有点过时!

因此,我通过 onchange 事件的 Ajax 回调使其工作。因此,当通过 lov 更改值时,会填充额外的字段。这与自动行获取之后的标头处理后一起进行,因此在加载页面(或用户导航行)时获取值。

我还编写了一个自定义解决方案,它要求我创建一个带有搜索框的经典报告页面。然后,我在 iframe 中使用此页面,并通过模式将其弹出。当用户选择一条记录时,我返回所需的返回值和显示值列表。我通过一堆 javascript 来完成此操作,我将其打包在 JS 文件中,实际上只需要在页面上做很少的额外工作:在两个页面上都包含该文件,使用一些 post 元素文本创建一个项目,调用“open” ' 过程,并在我的 lov 页面上调用选择并关闭过程。我正在考虑创建一个小型项目类型插件,这样我就可以更轻松地配置我的调用项目。只是几个但是:我实际上还没有以某些形式使用它,在对标准工具感到沮丧之后,我在测试应用程序中设计了它。它还需要客户端维护这个 javascript 代码+记住这两个项目的配置,更不用说我编写一个小插件了。所以我很犹豫是否要实施这个。

TLDR:如果您已经使用 Apex 一段时间,并且可能完成了一些表格:您实际上如何使用弹出窗口。如果您了解表格:您如何应对这种变化?

我还在挣扎——给我一根骨头吧;)

List of values, with multiple columns and multiple return values in Apex. It's a question i've seen around the web quite a few times, but i'm struggling with it aswell.

Coming from Oracle Forms, and now migrating forms to Apex, this is a feature i'm missing quite well. It also still baffles me a bit how enormously basic the built-in popup-lov is.
For example, right now i'm making some smaller forms, each having about 4 or 5 multirecord columns, for not much else than having 2 values linked up. Column 1: some value, used in sap for example, column 2: the id of a record in the oracle database (another table than the base table for the block). On column 2 there is an lov, with validate from list, and displays 3 columns, but also returns 3 columns. So you can choose a record from the lov, and automatically, the id will be filled in, aswell as the 'name' and 'description' for said id. Column 1 and column 2 form the base table of the block.

Now, in Apex, i'd loose this functionality by default. So for now, i've mostly coded the onchange event in javascript, and get the values with an ajax callback process. In the popup i concatenate the 3 columns. This however looks stupid (in my most humble opinion) when you want to force the user to pick a value from the lov ('Not Enterable, Show Display Value and Store Return Value'): the item will contain the concatenated value used in the lov, not just the id i'd much rather show - plus, i'll already have my other 2 fields filled in by the ajax callback.

It rather stings a bit to have to deal with this. The users are used to working with these old (headstart generated) forms, with just 2 enterable columns, one of which has an lov. Now they need to start working with this 'new tech', and even though there is some adjustment required, this area does feels a bit archaic at times!

So, i've made it work through an Ajax callback on the onchange event. So, when the value is changed through the lov, extra fields are filled up. This goes together with an after header process, after the automated row fetch, so the values are fetched when the page is loaded (or a user navigates the rows).

I've also written a custom solution, which requires me to create a page with a classic report on it with a search box. I then use this page in an iframe, and pop it up through a modal. When the user selects a record, i return the required returnvalue and a list of displayvalues. This i do through a bunch of javascript, which i've packed in a JS file, and actually requires quite little extra work to do on the pages: include the file on both, make an item with some post element text calling an 'open' procedure, and calling a select-and-close procedure on my lov page. I'm quite considering creating a small item typep plug-in, so i can more easily configure my calling item. Just a couple of buts: i've not actually used this in some forms already, i've engineered this in a testing application after getting frustrated with the standard tool. It would also require the client to maintain this javascript code + remember the config of the 2 items, let alone me writing a small plugin. So i'm hesitant to implement this.

TLDR: if you've been using Apex for a while, and maybe done some forms: how do you actually work with the popups. And if you've known forms: how did you deal with this change?

I'm still struggling - throw me a bone ;)

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

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

发布评论

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

评论(1

孤寂小茶 2024-12-21 08:52:38

我自己还没有使用过它,但我相信 SkillBuilders Super LOV 插件 可能可以满足您的需求。

I haven't used it myself yet but I believe SkillBuilders Super LOV plug-in probably does what you need.

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