Create a tree with recursive call for sub-rows

Hello,
I would like to create a generated menu dynamically created from values returned by sql.
Structure is as follow :
Menu
  |
  +-- MenuItem <--+
         |        |
         +--------+I can't know the maximum depth of the menu.
How can I create a dynamic tree for ADF to display a tree or a hierarchical view properly without having to define a ViewLink / level ? (i.e. without hardcoding the maximum depth)
I created a simple Application Module with VO:
MenuVO
  + MenuItemVO (using VL1 between MenuItem and Menu)
      + SubMenuItemVO (using VL2 between MenuItem and MenuItem, father / child link)Using the Oracle BC Navigator to test this, I can see that a dynamic tree is available, how can I have it in a JSP page ?
Using the hierarchy viewer component it's possible, but how can I do this with an ADF Tree ?

You can easily create a recursive tree level rule on the MenuItemVO via a parent/child view link (get rid of SubMenuItemVO). Look at this example http://www.oracle.com/technetwork/developer-tools/adf/learnmore/32-tree-table-from-single-vo-169174.pdf
The only difference is your recursion is going to be at MenuItemVO level.
Edited by: 948181 on 2012/07/31 4:07 PM

Similar Messages

  • Creating a range with Substitution Variables for Report Script

    Is it possible to create a range with substituion varables for use in a report script. For example instead of listing "Jan" "Feb" "Mar" "Apr" in the report script can I use a sub varaible like Jan:Apr that will list them all out?

    while I have not had luck with ranges in report scripts, others have. You could have a substitution variable the is "Jun" "Jul " "Aug" or whatever you want the members to be. and it will replace jusr fine

  • CLOSED- Recursive Tree with Recursive Table and seperate Relationship table

    Hi All,
    I am trying to achieve a adf recursive tree with recursive table but relationships are stored in separate table like
    Table A:
    id name
    1 Val1
    2 Val2
    3 Val3
    4 Val4
    5 Val5
    Table B:
    fromid rel_type toid
    1 Parent-of 2
    2 Parent-of 3
    3 Parent-of 4
    1 Parent-of 5
    I did lots of reading from forum and various posts but couldn't make it work.
    Any suggestion what would be best approach and/or sample code for this ?
    Thanks

    I think that you can get this done by defining a VO that fetches all the top level nodes and have a view link to a VO that has all the details with a self recursive viewlink
    Query for the top level
    Select A.id, A.name
    from A
    Where A.id not in (select disctinct toid from B)
    Query for the detail level
    Select A.id, A.name, B.from, B.to
    from A,b
    where a.id = b.toid;
    ViewLink is going to be:
    detail.from=master.id
    and another viewlink for the recursive relationship
    detail.from=detail.to

  • Programatically creating ADF Tree with nodes,child nodes & links?

    Hi,
    Currently I am using Build JDEVADF_11.1.1.3.PS2_GENERIC_100408.2356.5660. Please provide me detailed code for programatically creating ADF Tree with nodes, child nodes and links in it.
    Thanks,
    Vik

    You need to create a model for the tree. ADF has a build in model that you can use to build your own tree.
    This is what you need to write in your JSPX:
    <af:tree summary="Navigation" id="treeNav" value="#{pageFlowScope.treeNavigationBackingBean.model}"
               var="node" contextMenuSelect="true" rowSelection="single" fetchSize="30">   
           <f:facet name="nodeStamp">
          <af:outputText id="txtText" value="#{node.text}"/>
        </f:facet>
    </af:tree>This is the code to retreive the model:
      public TreeModel getModel() {
        if(model == null)
            model = new ChildPropertyTreeModel(instance,"children");
        return model;
      }instance contains the actual tree. I build it in the constructor of my managed bean:
        public BeanTreeNavigation() {
          ArrayList<TreeItem> rootItems = new ArrayList<TreeItem>();
          TreeItem node1 = new TreeItem("Root node");
             ArrayList<TreeItem> level1 = new ArrayList<TreeItem>();
             TreeItem level1Node1 = new TreeItem("Level1 Node1");
              level1.add(level1Node1);
           node1.setChildren(level1);
           rootItems.setChildren(node1); 
          this.setListInstance(rootItems);
          root = rootItems;
      public void setListInstance(List instance) {
        this.instance = instance;
        model = null;
      }The TreeItem class is not a default one. I created it myself. You can make of it whatever you want:
        public class TreeItem {
          private String text;
           private List<TreeItem> children = null;
           public TreeItem(String text){
            this.text = text;
            public void setText(String text) {
                this.text = text;
            public String getText() {
                return text;
            public void setChildren(List<TreeItem> children) {
                this.children = children;
            public List<TreeItem> getChildren() {
                return children;
            }I wrote the TreeItem as an inner class of the managed bean.
    The most important part is the getModel methode. There you need to specify an Object and the name of the getter that will return a List of the children.
    Hope this helps.
    Edited by: Yannick Ongena on Feb 22, 2011 7:30 AM

  • HOW CAN I CREATE A GROUP WITH MY CONTACTS FOR TEXTING

    HOW CAN I CREATE A GROUP WITH MY CONTACTS FOR TEXTING

    Olga, this is not a default feature in iPhone. You need a 3rd party application. I have created a free one, Easy Group, for group texting and group emailing.
    http://itunes.apple.com/fr/app/easy-group/id461469079?mt=8
    Rémi
    Note: I may receive some form of compensation, financial or otherwise,from my recommendation or link.

  • Is it possible to create a tree with drag-and-drop functionality using ajax

    I saw these samples;
    Scott Spendolini's AJAX Select List Demo
    http://htmldb.oracle.com/pls/otn/f?p=33867:1:10730556242433798443
    Building an Ajax Memory Tree by Scott Spendolini
    http://www.oracle.com/technology/pub/articles/spendolini-tree.html
    Carl Backstrom ApEx-AJAX & DHTML examples;
    http://htmldb.oracle.com/pls/otn/f?p=11933:5:8901671725714285254
    Do you think is it possible to create a tree with drag-and-drop functionality using ajax and apex like this sample; http://www.scbr.com/docs/products/dhtmlxTree/
    Thank you,
    Kind regards.
    Tonguç

    Hello,
    Sure you can build it, I just don't think anyone has, you could also use their solution as well in an APEX page it's just a matter of integration.
    Carl

  • Reference for writing COBOL prog with DB2 with ATMI calls for Oracle Tuxedo

    Hi..
    Am using IBM COBOL for AIX 2.0.0 on Oracle Tuxedo10g R3..
    And for database IBM DB2 Version 8.2..
    I have to write a program in Cobol with queries and with ATMI calls for Tuxedo..
    I need some reference manuals for this or some sample program..
    I also need the connectivity from cobol-DB2 to Tuxedo..
    Can anyone send me link for the same?
    The tutorial CSIMPAPP and STOCKAPP was really helpful..
    Am searching for the similar kind..
    Thanks in advance..
    Edited by: user8103349 on Mar 19, 2009 8:43 PM

    Hi,
    Hopefully someone has some DB2 COBOL code to share. But in any case, using Tuxedo with COBOL and DB2 should be very similar to simply writing normal DB2 COBOL programs. The major difference is that Tuxedo will take care of making the connection to the database and should normally be allowed to perform all transaction management.
    From a configuration standpoint you'll need to add the appropriate line in the Tuxedo RM file that lists how Tuxedo needs to link DB2 XA libraries into the application. The connection information is provided in the OPENINFO string passed along to the TMS that you need to build for DB2 with the buildtms command, and finally you'll need to build your servers with the -r switch to tell Tuxedo which XA libraries need to be linked into the application.
    Regards,
    Todd Little
    Oracle Tuxedo Chief Architect

  • How to create a menu with pages linked as sub menu in ADF?

    Hi Experts,
    I'm new to ADF and trying to create a menu like below in ADF.
    Actions Menu
    |
    |
    Option 1 -- A page with some static text and links.
    Option 2 - A different page with some static text and links.
    Have evaluated options like panelGroupLayout and menu components, requesting experts opinion on the best way to do it.
    Thanks in advance..

    Thanks AP.
    Not like outlook. Here's some more details on what I'm looking for.
    Create a menu bar.
    Create a menu called "Actions"
    Create two items under it called "Option1" and "Option2".
    When I move the mouse over "Option1", I want a page to be shown on the right (just like how a sub menu will be displayed usually).
    When I move the mouse over "Option2", I want to show a different page on the right (just like how a sub menu will be displayed usually).
    Thanks in advance.
    Edited by: Muruhanantham C on Dec 28, 2012 12:51 PM

  • Can't create a tree with mm:treenode tag in DWCS4 Mac

    Hi,
    I try to migrate my extension from Windows to Mac. I create a tree in the floater. In Windows, it display well. But in Mac, it display nothing.
    Please give me some help.
    Thanks
    Window
    Mac

    Your treenode should be inside a form, otherwise DW may not display this correctly.
    It may also be better to create a folder (called mac), and place a file with the extension htm inside this to ensure compatibility with the mac, (not always required, only testing will ensure if required or not).
    If you get compatability problems then check the layout engine no (your current = layout-engine 10.0), as the one shown is for CS3 and may not work in older versions.
    PZ

  • Build a tree with recursion

    I need to Create a tree and with recursion (not to use SAP FM)
    and i have a tree like the following
    assume i have a root like
    root is level  1 -> customer 
    child level 2 -> like contact person & address
    child level 3 like visiting hours (contact person ) & Email address (adress )
    e.g. of the table that i need to provide as output is
    item              parent_key   child_key         
    customer                 0001         
    contant person         0001         0002
    address                   0001         0002
    vist                        0002         0003
    email                      0002         0003
    etc...
    let say i get as input always the root and i check for his child and for this node i
    look for his child etc how can i provide a table like the above table
    Thanks and Regards
    James

    Hi,
    build your tree step-by-step:
    -root node is always shown -> initially add it to the node table of your alv-tree
    ->user expands root node
    ->event expand_no_children has to be handled
    ->check which node threw that event
    ->if root node, select all persons
    ->add the person nodes to your alv-tree node-list, as parent use the root node
    ->refresh alv tree
    ->user expands person-node
    ->event expand_no_children has to be handled
    ->check which node threw that event
    ->if person node, select all visiting hours
    ->add the visiting hour nodes to your alv-tree node-list, as parent use the person node
    ->refresh alv tree
    Greetings,
    dsp

  • How can I create a Tree with Color Picker icons?

    I'm a newbie to Flex. I want to create a tree which has color
    picker icons.
    As an analogy for the Mac users out there, I envision a
    control like the Calendars section in iCal, where you can specify
    the color for each individual node. These colors are then used in
    other parts of the application.
    The Flex 3 documentation specifies four methods for setting
    node icons on a Tree control, none of which seems to suit my needs:
    -The folderOpenIcon, folderClosedIcon, and defaultLeafIcon
    properties
    -Data provider node icon fields
    -The setItemIcon() method
    -The iconFunction property
    In other words, I want to "setItemIcon" to an mx:ColorPicker,
    if that makes any sense.
    Is there a standard way of doing this? If not, how can I go
    about implementing such a control? Thanks in advance!

    well, Network UI should be used.

  • How to Create a table with numeric trigger for INSERT

    Let me start off by saying that I am very new to DBMS.
    I need to create a Table with INSERT Trigger. I am not exactly sure if I need to have a BEFORE ot AFTER insert trigger but leanning towards AFTER.
    I have a Java code that will need insert a row each time that piece of code is executed. I would also like an oracle trigger to insert a unique numeric value (REC_ID) for that that record.
    I am totally lost and I am not sure how to go about it. Can you point me to the right direction?
    Basically my table will have the following 3 columns
    REC_ID NUMBER NOT NULL (uniquie value inserted by the trigger)
    PROPERTY_NAME VARCHAR2(100 BYTE)
    PROPERTY_VAL VARCHAR2(100 BYTE)
    Thank you in advance
    Eric

    Take a look at the following: Also please do a search in this forum.
    http://infolab.stanford.edu/~ullman/fcdb/oracle/or-jdbc.html

  • What is the easy way to create a crossword with InDesign CS5 for a interactive pdf?

    I mean I want to create a pdf magazine and i like to include a crossword. I read somewhere that one way is create a crossword with an external software and include it in the ID project but I don't know any crossword software and if I add in my ID project, I only need to export like a interactive pdf? I would like that the users can use the crossword in online version.
    Regards from Lima, Perú

    Hi.
    I'm not sure about what to you mean. But I create first the crossword with Excel, I mean to put the words in the right order and the questions and/or cue too. Then I create a table in InDesign and format some cells with black background and some borders. I upload both captures, from Excel and from InDesigne. Then with Adobe X Pro I create a form, so I can create singles inputs for the crossword.
    I hope i understand your question.
    Regards from Lima, Perú

  • Skype with Video Calling for nokia c5-00-2

    I have nokia c5-00-2 with 5MP camera. I'm looking for a skype version with video call option.. As one of my friend had it when he was in Suadi Arabia and used to call me video chat from his c5. Unfortunately he need that software but could not find it??? Does any body knows where we can download it??? Waiting for you replies.............

    Skype for Symbian has been discontinued and stopped working. Since the Nokia C5 works with Symbian S60 you won't be able to use Skype any longer. Please read this:
    https://support.skype.com/en/faq/FA10389/has-skype-for-symbian-been-discontinued

  • Can i use DLL file created by Fortran with the call libary function node

    Can i use a DLL created by Fortran (Compaq Visual Fortran) with the call library function node in labview. If yes how do i create the DLL file if i have the Fortran code.
    Thanks

    Yes! Maybe these old post will help:
    http://forums.ni.com/ni/board/message?board.id=170&message.id=88786
    http://forums.ni.com/ni/board/message?board.id=170&message.id=109150
    Good luck!
    Message Edited by altenbach on 03-21-2006 02:35 PM
    LabVIEW Champion . Do more with less code and in less time .

Maybe you are looking for