Add Double Click to Oracle APEX Shuttle Widget

Do you want to improve the usability of the Oracle APEX Shuttle Widget a little bit?

Let’s enhance it by adding support for double click. It will allow users to double click on an entry in one of the two lists of the shuttle, to move the selected entry to the other list as they would normally do with the corresponding icons. I think that’s a little bit more convenient and faster than using the icons.

There comes the necessary code.

  1. Create a Page Item of type “Shuttle”
  2. Add the following code into the “Post Element Text” property of that page item.
    <script type="text/javascript">
    (function(){
      var vName = "#CURRENT_FORM_ELEMENT#".substr(2);
      $x("#CURRENT_ITEM_NAME#").ondblclick   = new Function("g_Shuttlep_"+vName+".remove();");
      $x("#CURRENT_ITEM_NAME#_2").ondblclick = new Function("g_Shuttlep_"+vName+".move();");
    })();
    </script>
  3. That’s it, you are done. Quite simple and easy, isn’t it?

I already tried to influence Carl a little bit to add that small little feature to Oracle APEX 3.1, let’s see if I was successful :-)

9 thoughts on “Add Double Click to Oracle APEX Shuttle Widget

  1. If I have two identical shuttle items.
    I want when I move an entry from the first shuttle, to be removed from the second shuttle…

  2. Hi Patrick,

    do you have any similar solution for the datepicker? My users wish to choose the date with a doubleclick instead of clicking on the OK button.

    Best regards,
    Ales

  3. Hi Patrick,

    My client says that logically he sees everything included on left and anything excluded on left..
    so this works fine on 1st screen which is the exclusion screen..
    now on the second screen i.e inclusion screen..

    he wants that the selected items should move from left to right instead of right to left…(i.e default behaviour of a shuttle list)

    Is that possible..If yes can you pls help me out.

  4. Hi Abhinav,

    I’m not sure if I can follow, the default behavior for a shuttle is to more the values from the left list to the right list. The right list is considered as being the picked values.

    Regards
    Patrick

  5. Hi Patrick,

    Sorry for the confusion..he wants that values should appear in right box and then on clicking they should move to left box.

    Thanks
    Abhinav

Comments are closed.