5 Replies Latest reply: Jan 21, 2009 2:30 AM by Jes RSS

    Drag and drop - like the builder?

    j4john
      Hi team,

      It's nice to have drag-and-drop repositioning in the builder. It would be even nicer to be able to offer it to my users.

      Is there any sort of guidance available on how to replicate the functionality of P5150 of the builder?

      Thanks

      jd
        • 1. Re: Drag and drop - like the builder?
          Jes
          Hi JD,

          Yes absolutely you can do that in APEX, however there is not really built-in support for it (although you can refactor the code used in the builder if you choose), but instead of doing that I would recommend using a 3rd party javascript library to make it much easier, two of the most commonly used for that type of drag-drop effect (generally speaking) are -

          Yahoo UI Library - http://developer.yahoo.com/yui/dragdrop/

          jQuery UI Library - http://ui.jquery.com/demos/draggable

          I've used both and my preference is the jQuery library (for a few different reasons that I won't go into here), however if you follow their demos/guide you should be able to see just how easy it is to incorporate it into APEX (there is little APEX-specific coding you need to do really).

          Hope this helps,

          John.
          --------------------------------------------
          Blog: http://jes.blogs.shellprompt.net
          Work: http://www.apex-evangelists.com
          Author of Pro Application Express: http://tinyurl.com/3gu7cd
          REWARDS: Please remember to mark helpful or correct posts on the forum, not just for my answers but for everyone!
          • 2. Re: Drag and drop - like the builder?
            j4john
            Thanks John

            I'll take a look at the jQuery library (I've already integrated other jQuery stuff).

            I just thought that since it's already present in the builder (ly.js being very light and easily integrated), the dev team might have - or have plans to - put their tech out there for the community to appreciate.

            Cheers

            jd
            • 3. Re: Drag and drop - like the builder?
              Jes
              Hi JD,

              The difference is that whilst the ly.js (and other associated scripts) are indeed pretty lightweight and work well, they were designed for a specific purpose. In contrast the jQuery library was built from the ground up to be reusable in a variety of situations.

              I'm not saying you couldn't use the shipped APEX libraries to achieve what you want (you could), however at some point you might need to step outside what the shipped libraries provide and you'd end up looking at the jQuery anyway, so in my opinion it would be no bad thing to use it in the first instance.

              John.
              --------------------------------------------
              Blog: http://jes.blogs.shellprompt.net
              Work: http://www.apex-evangelists.com
              Author of Pro Application Express: http://tinyurl.com/3gu7cd
              REWARDS: Please remember to mark helpful or correct posts on the forum, not just for my answers but for everyone!
              • 4. Re: Drag and drop - like the builder?
                j4john
                Good points well made.

                Thanks for the wisdom John,

                Case closed.

                jd
                • 5. Re: Drag and drop - like the builder?
                  Jes
                  Hello,
                  Case closed.
                  Don't forget you can award points on here for helpful or correct answers ;)

                  No pressure...

                  John.
                  --------------------------------------------
                  Blog: http://jes.blogs.shellprompt.net
                  Work: http://www.apex-evangelists.com
                  Author of Pro Application Express: http://tinyurl.com/3gu7cd
                  REWARDS: Please remember to mark helpful or correct posts on the forum, not just for my answers but for everyone!