This discussion is archived
14 Replies Latest reply: Nov 29, 2007 10:41 AM by 607359 RSS

Tree Location

605553 Newbie
Currently Being Moderated
Hi everyone,

I started to study apex a few days ago and i have some doubts.
When i put the treeview on region 3 it doesn´t load and nothing appears. Is there a problem?
I wanna create a form (form 1) on region 1 with some informations. On region 3, i wanna have a treeview with pages that i will access. On click event of treeview, i want to show on region 2 another form using a primary key defined on form 1. How do i do this?

thanks
Ricardo
  • 1. Re: Tree Location
    Earl Lewis Journeyer
    Currently Being Moderated
    Ricardo,

    If you're just starting out I would go a bit slower than what you're attempting. You're trying to do a lot of things on one page. Try doing just one of those things, making sure you know exactly how it's working, then move to the next step.

    To tell you how to do all of those things in one forum posting would probably end up being quite lengthy.

    Also, when you say "...i put the treeview on region 3 it doesn´t load and nothing appears. Is there a problem?" it's really hard for anyone to answer that question without more detailed information. You need to describe what your query looks like, including the query code itself if possible, what steps you followed to create the tree and whether you have any constraints on your data that might be complicating the problem.

    Hope these suggestions help you in your Apex ventures and improve your time here on the forum.

    Earl
  • 2. Re: Tree Location
    605553 Newbie
    Currently Being Moderated
    Earl

    Thank you for your suggestions.
    I did some simple pages using apex wizards like reports and forms and i understood how it works. When i test treeview it works normally, but when i put it on region 3 of page (i am using theme #13) it doesn´t work. You could simulate this building a treeview of emp (empno and mgr). I don´t know whether is correct this behavior.

    This treeview contains the name of pages that i could choose.

    After, i want to put on region 1 and 2, two forms. At form 1, i have, for example, client´s information. I had selected one client on previous page. At form 2, i have informations about client´s orders or client´s invoices depending on item selected on treeview.
  • 3. Re: Tree Location
    Earl Lewis Journeyer
    Currently Being Moderated
    Ricardo,
    Thank you for your suggestions.
    I did some simple pages using apex wizards like
    reports and forms and i understood how it works. When
    i test treeview it works normally, but when i put it
    on region 3 of page (i am using theme #13) it doesn´t
    work.
    So you're building a treeview page as a test with nothing else on the page and it works fine?

    Then you take the same treeview and put it in region 3 of a new/different page and it doesn't work any more?

    How about showing us the SQL you're using for the treeview that doesn't work?
    You could simulate this building a treeview of
    emp (empno and mgr). I don´t know whether is correct
    this behavior.
    This won't really help solve your problem. What I do could be very different from what you did.
    This treeview contains the name of pages that i could
    choose.

    After, i want to put on region 1 and 2, two forms. At
    form 1, i have, for example, client´s information. I
    had selected one client on previous page. At form 2,
    i have informations about client´s orders or client´s
    invoices depending on item selected on treeview.
    We'll get to the rest of this when you get the treeview working.

    Earl
  • 4. Re: Tree Location
    605553 Newbie
    Currently Being Moderated
    Earl,

    Thank you for your help, it had been great

    My test is working now. I really don´t know what i have done wrong. I did all steps again and it worked fine.

    Let me explain you what I wanna do.
    I have a table of client, a table of orders and a table of invoices. Also, i have a table of pages. On this one, i have names of pages about clients, order and invoices. I will build a treeview page with this informations depending on table that i am showing. If i was showing client page, on treeview, i will see links of orders and invoices. When i click on treeview item i choose which page i want to show. The page of client is on region 1. The treeview, on region 3 and on region 2 wanna change page depending on treeview´s item i click. The view will run like a navigation bar, but dynamically. I want to show at treeview format because these information have a hierarchy.

    regards
    Ricardo
  • 5. Re: Tree Location
    591018 Newbie
    Currently Being Moderated
    Ricardo

    Are you saying that the treeview is now displaying in the region you wanted or that your test is working?
  • 6. Re: Tree Location
    591018 Newbie
    Currently Being Moderated
    Ricardo,

    Allow me if I may ask a couple more questions so as I can better understand where you are in this process.

    First - what did you select for each of the following:
    *DISPLAY POINT
    *SEQUENCE
    *COLUMN
    and after these selections you should have been given the option to choose a Tree. It is here that perhaps we might find the answer to your issues.
    How did you build the Tree for selection?

    I am no expert but perhaps a second pair of eyes can help to find a soluiton.
  • 7. Re: Tree Location
    Earl Lewis Journeyer
    Currently Being Moderated
    Ricardo,
    Thank you for your help, it had been great
    You're certainly welcome, however I don't feel like I've done much yet.
    My test is working now. I really don´t know what i
    have done wrong. I did all steps again and it worked
    fine.
    Great! Glad you got something working.
    Let me explain you what I wanna do.
    I have a table of client, a table of orders and a
    table of invoices. Also, i have a table of pages. On
    this one, i have names of pages about clients, order
    and invoices. I will build a treeview page with this
    informations depending on table that i am showing. If
    i was showing client page, on treeview, i will see
    links of orders and invoices. When i click on
    treeview item i choose which page i want to show. The
    page of client is on region 1. The treeview, on
    region 3 and on region 2 wanna change page depending
    on treeview´s item i click. The view will run like a
    navigation bar, but dynamically. I want to show at
    treeview format because these information have a
    hierarchy.
    This is all (probably) very doable, from a technical/Apex point of view. However, you haven't yet posted any of your SQL or table structures that are really key to anyone being able to help you with this.

    If I could make another suggestion: if you don't already have one, get an account on the apex.oracle.com demo site and put an example there. That way we can see more of what you're trying to do and give suggestions or in many cases code examples that will help.

    Earl
  • 8. Re: Tree Location
    605553 Newbie
    Currently Being Moderated
    Splash,

    Thank you for your help.

    I will create on Apex site demo part of my application for your analysis. I rebuilt the treeview because i had to change table structure. Then a built other treeview and i put it on region 3 (that i want) to continue my development and it doesn´t work anymore...

    I really don´t know what´s going on. I will translate to english cause everything was written in portuguese.
  • 9. Re: Tree Location
    605553 Newbie
    Currently Being Moderated
    Earl

    I had to change table structure and I rebuilt a treeview. When i try to put it on region 3 , it didn´t work... I really done what´s going on...

    I will put a part of my application on apex site demo for you analysis.

    Thanks
    Ricardo
  • 10. Re: Tree Location
    607359 Newbie
    Currently Being Moderated
    I'm having the same problem! Try to rebuild and rebuild my tree, my query, my region. It never shows anything unless I put it in region 4. Even error text doesn't show up unless it's in region 4.

    Any help would be appreciated. I'd hate to have to dig into mod_plsql. Maybe I'll check the template... ?

    John

    Apex 3.0.1.00.08
  • 11. Re: Tree Location
    135285 Oracle ACE
    Currently Being Moderated
    Hi John,

    is it possible that you create a test application on apex.oracle.com where the problem reproduces? That would save some time.

    Please provide workspace, username and password so that I can have a look.

    Thanks
    Patrick
  • 12. Re: Tree Location
    607359 Newbie
    Currently Being Moderated
    http://apex.oracle.com/pls/otn/f?p=31881:1

    The same tree is created twice. Once in region 2 (sidebar) and once in region 4. I notice that also when I try "Copy Item" the original tree was not listed. In fact, there was no list of items to choose from.

    Thanks I just want this out there. I'm out for the weekend now. I will look into templates and flows next week.

    Good weekend.
  • 13. Re: Tree Location
    607359 Newbie
    Currently Being Moderated
    I just noticed that when I click on a different tab and go back to my tree page, the tree works until the end of my session. When I log back in, I need to view a separate tab again to start the tree. The only thing I can think of is that viewing a page with a sidebarless template makes it work. Weird.

    Try the sample again. Click tab "Sidebarless" and go back to tab "Sidebar." Tree will work until you leave the application.
  • 14. Re: Tree Location
    607359 Newbie
    Currently Being Moderated
    I've managed a sloppy fix around my problem. For some reason, my statically defined items are not being initialized like they should be. I've even tried selecting a constant from a sql query instead. The only way I've gotten it to work is by manually initializing my tree root as an additional part of the login procedure.

    I do so thusly:
    APEX_UTIL.set_session_state('TREE_ROOT', 100);

    Strange how this is even allowed on a statically defined item.