1 2 3 Previous Next 34 Replies Latest reply: Apr 25, 2011 10:16 PM by 718222 RSS

    Vertical scroll bar in a tree node

    718222
      Hi Friends,

      I am trying to create a tree in Apex 4.0. I need a vertical scroll bar in my tree nodes if the no: of values is greater than 8. For example i am having a tree with customers and sites. When i press the customers it will list the sites under that customer. I need a vertical scroll bar to be displayed for sites if the no: of sites is greater than 8, so that i can limit the size of the tree. Is there any ways to achieve this in Apex 4.0. Any input for this will be appreciated.

      Thanks,
      Nav
        • 1. Re: Vertical scroll bar in a tree node
          ATD
          Hi,

          You could put your tree in a DIV tag that handles scrolling - that would require updating the template settings used by the tree.

          I have done that here: http://apex.oracle.com/pls/otn/f?p=33642:200 - collapse all of the nodes and the scrollbars disappear, expand them and it will re-appear

          Andy
          • 2. Re: Vertical scroll bar in a tree node
            718222
            Hi Andy,

            Thanks.


            1.Actually I am trying to put the scrollbar inside the tree region. for example in my case a customer may contain 50-100 sites. In this case i want to display a scrollbar if the number of sites is more than 10 (for that particular customer). Is there any way to achieve this?

            2. How can we edit the tree template. I am not able to see any option for this in Apex 4.0.

            regards,
            Nav
            • 3. Re: Vertical scroll bar in a tree node
              ATD
              For your point 2...

              It seems to be missing from the Shared Components page - which is where it should be!

              To get to it, click on the "Tree" link on your page.

              I'll have a look about point 1 and get back to you

              Andy
              • 4. Re: Vertical scroll bar in a tree node
                718222
                Sorry Andy, when i am clicking on the "tree link" i got

                1.Display setting
                and
                2.Query parts. In the display setting there is a dropdown to select "Tree template" having 1.Default 2.Blue and 3.Classic option. But no option to edit template. :(. I am using the Apex 4.0 online workspace.

                Could you please elaborate the steps to achieve the tree in your example

                Thanks,
                Nav

                Edited by: Navarannan on Jan 3, 2011 7:06 AM
                • 5. Re: Vertical scroll bar in a tree node
                  ATD
                  ok

                  BIG problem... My scrolling tree page is from an old version of Apex that has been upgraded. I can edit the template for it and add a DIV into the settings. The region type is "TREE" (note the upper-case).

                  I have created an entirely new tree page and there is nothing that allows me to link to the tree's template (either from the page or via Shared Components). Not only that, but the tree seems to be rendered AFTER the page has finished loading, so even jQuery can not affect it. The region type of this is "Tree" (note the title-case) - so, presumably, Apex knows that this is a new type of tree and won't allow editing of the template. The old "TREE" regions can be edited by clicking on the "Tree" link on the page - the new ones? Nothing!

                  I have no idea whatsoever why this has been done as there doesn't seem to be any way now for us to style trees as we want.

                  Perhaps someone from Apex can explain this - please!?!?!

                  Andy
                  • 6. Re: Vertical scroll bar in a tree node
                    ATD
                    The tree is constructed using a widget and the javascript code for that is added right at the bottom of the page - immediately before the /BODY tag. Even if I update the page template to add my own stuff there, the widget code is still placed after it. So, I can't see a way of getting to anything on the tree to be able to style it or tweak it's template :(
                    • 7. Re: Vertical scroll bar in a tree node
                      718222
                      Hi Andy,

                      My application is currently in Apex 3.2 and I am planning to upgrade to Apex 4, so i tried in Apex 4.0 online workspace. If i make the changes in the Apex 3.2 env and export the application to Apex 4.0, will it work?.

                      If it works how can i make the changes. Can you please elaborate the steps.

                      Thanks,
                      Nav
                      • 8. Re: Vertical scroll bar in a tree node
                        ATD
                        Hi,

                        My test page was upgraded to version 4 along with the rest of the OTN workspaces. I still have access to the tree template but can not guarantee how long that will last as I have no idea behind the reasoning for removing access to new tree's templates. You can access existing old trees by changing the app:page in the URL to 4000:28 - but, note, that new Apex 4 trees are not included on this page as they are generated by widgets not by templates.

                        For my old tree, to add the scrolling around the entire tree, I edited the tree's template - by clicking on the Tree link in the region - and added the following at the top of the "Before Tree" setting:
                        <div style="height:200px; width:300px; overflow-y:auto;">
                        and add the following to the bottom of the "After Tree" setting:
                        </div>
                        I have not, as yet, been able to find a way of adding scrollbars within a list when there are more than x number of entries.

                        Andy
                        • 9. Re: Vertical scroll bar in a tree node
                          718222
                          Hi ,

                          Thanks Andy, can you please give me the credentials for logging in to the workspace for accessing the below link.

                          http://apex.oracle.com/pls/otn/f?p=4000:28

                          Regards,
                          Nav
                          • 10. Re: Vertical scroll bar in a tree node
                            ATD
                            Hi,

                            You don't need credentials as that is accessible when you are logged in as a developer.

                            Go to any page in your application and then change the URL to use 4000:28 - keep the rest of the URL as it is.

                            For example, if I go to page 282 in one of my applications, the URL is:

                            http://apex.oracle.com/pls/otn/f?p=4000:4150:6894391996534306::NO::FB_FLOW_ID,FB_FLOW_PAGE_ID,F4000_P4150_GOTO_PAGE:33642,282,282

                            I just change this to:

                            http://apex.oracle.com/pls/otn/f?p=4000:28:6894391996534306::NO::FB_FLOW_ID,FB_FLOW_PAGE_ID,F4000_P4150_GOTO_PAGE:33642,282,282

                            and I can now see all of the trees in that application

                            Andy
                            • 11. Re: Vertical scroll bar in a tree node
                              718222
                              Thanks Andy.

                              Anyone from Apex, could you plz include the option to edit the tree template in the next version of Apex or a method to apply the stylings such as "including scrollbars" as this will help us to modify the default trees for our custom needs.

                              Thanks,
                              Nav
                              • 12. Re: Vertical scroll bar in a tree node
                                ATD
                                Hi,

                                Given that the old style trees still work, the coding for it must still exist within Apex. Perhaps, what we need is an option to pick either the old template-based method or the new widget-based method? Or, as you suggest, ways of customising the output - otherwise, we are stuck with 3 fixed styles! It would help if the widget javascript code wasn't added as the last thing on the page so the jQuery (or plain javascript for that matter) can actually work on the tree.

                                Andy
                                • 13. Re: Vertical scroll bar in a tree node
                                  718222
                                  Hi Andy,

                                  Could you please suggest a way to achieve the below in Apex 3.2 when you get some time

                                  1.Actually I am trying to put the scrollbar inside the tree region. for example in my case a customer may contain 50-100 sites. In this case i want to display a scrollbar if the number of sites is more than 10 (for that particular customer). Is there any way to achieve this?
                                  Thanks,
                                  Nav

                                  Edited by: Navarannan on Jan 4, 2011 8:51 PM

                                  Edited by: Navarannan on Jan 4, 2011 8:51 PM
                                  • 14. Re: Vertical scroll bar in a tree node
                                    ATD
                                    Sorry, but I don't think that is possible. Each node on the tree is within its own TR tag and you can not "group" TR tags to add scrolling.

                                    You may have to either keep what you have or rethink using a tree for this

                                    Andy
                                    1 2 3 Previous Next