问题描述
我决定重新定义问题我在更简单的方式中问到这里.
有什么方法可以在Oracle Apex中动态填充穿梭的左侧吗?
Is there any way to populate the left hand side of a shuttle dynamically in Oracle Apex ?
我编写了一个PL/SQL流程,该流程计算出我想在穿梭机左侧使用的值列表,但是我无法设法将其附加到列表中.演算基于班车之前的选择列表项 P1_MY_LIST
.当该选择列表上发生更改时,过程将被触发.
I wrote a PL/SQL process that calculates the list of values I want to use for the left side of my shuttle, but I can't manage to append it to it. The calculus is based on a select list item P1_MY_LIST
just before the shuttle. The process is triggered when a change happens on that select list.
现在我尝试了::P1_MY_SHUTTLE := list_of_values
,但是它显然填充了航天飞机的右侧.
For now I tried : :P1_MY_SHUTTLE := list_of_values
but it obviously populates the shuttle's right side.
有关如何操作的任何建议?我正在使用Apex 19.1
Any suggestion on how to do so ? I'm using Apex 19.1
推荐答案
所以我玩了一些航天飞机,这就是我的想法.
so I played around with shuttles a bit and here is what I came up with.
var left = $("#P1_MY_SHUTTLE ")[0].children[0].children[0].children[0].children[0].children[0]
var right = $("#P1_MY_SHUTTLE ")[0].children[0].children[0].children[0].children[2].children[0]
这两个应该标记出航天飞机的左窗格和右窗格.然后您需要的是
These two should mark out the left and right panes of the shuttle. Then what you need is
left.appendChild()
但是您不能仅添加其他内容"您可以进一步研究这些东西并弄清楚如何正确添加它,这可能意味着用构造函数或类似的东西创建一个新的var.
But you cannot just append 'Something'You could play around with this stuff some more and figure out how to correctly add it, it probably means creating a new var with the constructor or something, I dont know.
但这是一个黑客
left.appendChild(right.children[0])
将第一个元素从右侧移到右侧.意味着您可以在右侧添加内容,然后将其移至左侧.
Which just moves the first element on the right side to the right. Meaning you can add stuff to the right and move it to the left.
您还可以执行一些代码,在右侧添加一些内容,然后遍历右侧的所有选项,找到刚添加的选项,然后将其移至左侧.
You could also do some code that adds something to the right side, then go through all the options on the right and find which one you just added, and then move it to the left.
显然,这不是一个优雅的解决方案,可惜它甚至不能很好地工作.但这只是一个开始,因此,现在您有了一个开始,可以在控制台中进行更多操作,并希望为您的问题找到完美的解决方案.
Obviously this isnt an elegant solution, hell it might not even work well. But its a start, so now that you have a start you can play around in the console some more and hopefully figure out a perfect solution for your problem.
这篇关于如何在Oracle Apex中填充航天飞机的左侧的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!