How to populate left side of shuttle in Oracle Apex

百般思念 提交于 2020-06-29 03:58:13

问题


I decided the reformulate the question I asked here into a simpler way.

Is there any way to populate the left hand side of a shuttle dynamically in Oracle Apex ?

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.

For now I tried : :P1_MY_SHUTTLE := list_of_values but it obviously populates the shuttle's right side.

Any suggestion on how to do so ? I'm using Apex 19.1


回答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()

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.

But a hack for this is

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.



来源:https://stackoverflow.com/questions/62550312/how-to-populate-left-side-of-shuttle-in-oracle-apex

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!