Table listening to a tree...

Hello

I'm new to ADF and I'm doing a user interface similar to the demo of the ADF file Explorer.

I have a folder/file type of hierarchical objects, and I want to show the tree on the left side of a separator Panel. When the user clicks on a node in the tree, I want to see the/update a table that appears on the right side of the separator Panel with the content of the file clicked on the tree. Identical to the file Explorer. (I haven't decided what to do when the user clicks on a node without issue. Is this ok to show nodes leaf in the tree? This is another question)

I have successfully created a TreeModel extending a ChildPropertyTreeModel in which I have a method getTreeModel() which statically built a bunch of nodes and returns the node root.

I replaced the isContainer() method to return TRUE if getChildren() method of the current node returns one or more nodes.

That's all I have in this bean.

In the file JSFX, I created the required separator Panel with tree view on the left and a table on the right. I'm able to tie the tree to the TreeModelBean and able to see the tree filled very well with nodes on the left side of the separator Panel successfully. But honestly, I don't know how to link the selected node to the Table so that when the user clicks on a node, the table refresh themselves with the content of nodes.

Could someone shed some light on how to do it? What Miss me and how to bind the children of the node selected in the collectionModel of the table?

Any help would be appreciated.

Thanks in advance
Gopal

Published by: kidney on October 1st, 2008 16:52

... of a second to the

-create a JSF binding between the tree and the managed bean
-in the separator, add an af:switcher and delete the tables for each VO represented by the tree (assuming that you use ADF with ADF BC)
-the reference of the tree, you get the depth of the tree, you can map to the facets created in FY: switcher
-using the PPR you refresh the selector to display the correct table
-to set the line in a table, get the key of the currently selected in the tree line and set it in the table

Frank

Tags: Java

Similar Questions

  • Of the data in the table to get a tree using declarative and perform operations above.

    Hello

    I use Jdeveloper 11.1.2.4.

    I'm creating a declarative component. The component is supposed to display the data in a table and allow the user to remove entries of it.

    The table should be included in a pop-.

    From now on, I made a picture of the tree within a collection of panels. I'm creating a tree in the pagedefinition of the ViewController project file and passing the tree of the same model to the component attribute declarative. After binds the attribute passed to table component tree declarative, I am able to fill lines. First please let me know if my approach is correct or not. The user can select any row of the table and press delete. The button must remove the entry from the table. Is it possible to remove operation on the table in the declarative component.

    Thank you

    First of all, please let me know if my approach is correct or not.

    Seems ok

    The user can select any row of the table and press delete. The button must remove the entry from the table. Is it possible to remove operation on the table in the declarative component.

    You have several ways to do this:

    (a) similar to the declarative component attribute, you can bind methods, for example: ADF Essentials eCourse - declarative components ADF: work with methods

    (b) pass the name of the iterator to your component and then use it to remove programmatic in backing bean

    (c) create pageDef declarative component for, something similar to this: ADF practice: liaison for component container declarative

    Dario

  • Fill the table of the hierarchy tree of XML data

    Hi experts

    I have an XML file and I want to create a hierarchy tree in a single table.
    Say the following XML:

    < Note >
    < to > < /pour > Mary
    < from > John < / from >
    < title > call < / section >
    < body > don't forget me this weekend < / body >
    < / note >

    Expected to generate these documents:

    TAG ID PARENT_ID VALUE
    Note 1 null null
    2 1 Marie
    3 1 John
    4 1 position of reminder
    5 1 body remember me this weekend

    How can I achieve this?

    Thanks in advance
    Oscar

    Hi Oscar,.

    These discussions should be of interest to you:

    {: identifier of the thread = 2210708}

    {: identifier of the thread = 2195072}

  • How to develop the Table of Backing Bean tree nodes?

    I have a requirement where I want my table to be expanded all three nodes. InitiallyExpanded = True develops alone.
    Is it possible to have all the Backing Bean nodes?

    Code snippet will be very useful.

    Thanks in advance,
    TK

    For all nodes in a treetable can be expanded, you will need to add all the rows of the disclosedRowKeySet.

    (1) create a binding for the treetable in average managed code as "treeTable.
    (2) create a CommandButton named "Expand" (under the picture of the tree) and Visible set to false and create a link to a page named expandButton & in the get accessor for the commandButton control method, call the following method:

    public RichCommandButton getExpandButton() {}
    this.expandTreeTable ();
    }

    private RowKeySet disclosedTreeRowKeySet = new RowKeySetImpl();

    private void expandTreeTable() {}
    If (this.treeTable! = null) {}
    disclosedTreeRowKeySet = new RowKeySetImpl();
    Model CollectionModel = (CollectionModel) treeTable.getValue ();
    JUCtrlHierBinding = treeBinding
    (JUCtrlHierBinding) model.getWrappedData ();
    JUCtrlHierNodeBinding RootNode = treeBinding.getRootNodeBinding ();
    disclosedTreeRowKeySet = treeTable.getDisclosedRowKeys ();
    If (disclosedTreeRowKeySet == null) {}
    disclosedTreeRowKeySet = new RowKeySetImpl();
    }
    List = firstLevelChildren
    rootNode.getChildren ();
    for (node JUCtrlHierNodeBinding: firstLevelChildren) {}
    List ArrayList = new ArrayList();
    List.Add (node.getRowKey ());
    disclosedTreeRowKeySet.add (list);
    expandTreeChildrenNode (node, treeTable, list);
    }
    treeTable.setDisclosedRowKeys (disclosedTreeRowKeySet);
    }
    }

    Private Sub expandTreeChildrenNode (RichTreeTable, rt,
    JUCtrlHierNodeBinding node,
    The list parentRowKey) {}
    ArrayList children = node.getChildren ();
    List rowKey;
    If (children! = null) {}
    for (int i = 0; i)< children.size();="" i++)="">
    rowKey = new ArrayList ();
    rowKey.addAll (parentRowKey);
    rowKey.add (((JUCtrlHierNodeBinding) children.get (i)) .getRowKey ());
    disclosedTreeRowKeySet.add (rowKey);
    If (((JUCtrlHierNodeBinding) (children.get (i))) .getChildren () is
    null)
    continue;
    expandTreeChildrenNode (rt,
    (JUCtrlHierNodeBinding) (node.getChildren () .get (i)),
    rowKey);
    }
    }
    }

    Thank you
    Nini

  • Table of campus Solution 9.0 academic organization and his tree

    People,

    Hello. I implement 9.0 Solution Campus of a college.

    I am confused on how to type in data between the academic organization Table and his tree to tree Manager. 2 Navigations are below:

    Implemented AWAR > Foundation Table > academic Structure > academic > academic organization Table

    Tree Manager > create a new tree > tree: my academic organization

    According to the document - Campus Solution 9.0 Basic Application to Page 152 - academic organization of understanding:

    "Before you start using academic institutions, you must first use PeopleSoft tree handler to set academic organizations themselves, the hierarchy and the levels of each of the academic institutions and the relationships between academic institutions in the hierarchy."

    The document at Page 153: "system displays information entered through organizing academic Manager tree to tree in PeopleSoft." You can edit this information. »

    The document to Page 154: '' you should add new academic organization through PeopleSoft tree Manager. ''

    The meaning above, it seems that we create the tree first and then type in the data in the Table academic organization after him. But the 2 Navigations above don't work that way. The Navigations 2 above work the way below:

    Tree Manager > create a new tree > tree: my academic organization

    Step 1: Add level - a level tree name lookup table arrives.

    Step 2: Root node - table of correspondence of school organization coming up.

    Set Up AWAR > Foundation Table > academic Structure > academic organization Table: this table has no place to link to the tree of academic organizations.

    Navigation, we must enter data in the Table of level names tree and Table organization academic at first and then when to create the tree, 2 tables come tables selected data. After this, I run Set Up AWAR > Security > Secure Student Administration > process > update security - Acad Org. But this process gets the error and does not swell report SQR.

    My question is:

    Because document instruction does not work with sailing, all folk can me the concrete way to enter data in the Table, academic organization and his tree to tree Manager?  What is the first? What's the second? Where is Navigation?

    Thanks in advance.

    People,

    Hello. The problem is solved by myself.

    Academic Board works with the Manager of her tree now. Thank you.

  • By default, all nodes expanded in table tree jsff page in adf

    Hi all

    I have a jsff page there is a table on this subject tree. I can't be expanded in charge (or to the default behavior).

    How I reach.

    It is worth noting that this jsff page so I can't use before or after the phase.


    There is a property in the array of tree which is expandAllEnabled he developed tree nodes.
    There is a property more tree table which is first expanded it shows only the first table developed tree node.

    Thank you and best regards,
    Vikas

    Published by: vikasadf on May 16, 2013 08:02

    Hi Timo,

    Thanks for your quick response.

    I can't use listeners phase because I use jsff jspx.

    in any case, I found the solution by using the approach below
    creating a default method on the flow of task 1) and storage and by setting this method as the default activity in the workflow
    class Test
    {
    private RowKeySetImpl ps;

    public void initTreeTableNode() / * this method is used to develop all of the tree nodel.
    {
    if(PS==null)
    PS = new RowKeySetImpl (true);
    PS = new RowKeySetImpl (true);
    }
    }

    and store a page flow scope and usage disclosedRowKeys = "#{pageFlowScope.expanedAllNodes}" in treetable jsff on page "

    Thank you best regards &,.
    Vikas

  • Get the values of default table row when the page loads

    Hello

    I am running JDev 11.1.1.7. We have a page that contains two tables in a relationship of the master / detail of nickname. We can do a real master ADF / detail with view items related because the query for the 2nd table is complex and works best when queries with binding settings. The View object for the 2nd table has a request with 2 link params as it can get in the first table. Thus, when a line is selected in the first table we want to execute ExecuteWithParams on the object from view of the table 2. We do it in the Bean managed for the page in a method that is the selection to the first table listener. It works fine except when the page initially loads, the first line is selected by default. When the default value is selected the selection listener is not triggered.

    I've seen the suggestion of not having a line selected by default when the page loads by removing the value selectedRowKeys on the table. However, we do not want that the 1st row of the table secondary master to be selected by default and we as the table of detail to show the correct corresponding lines.

    Steve

    Steve,

    Not really sure when you say that the 2nd table is complex and may not use the master detail. If the settings link in the parent table, you can set the ViewLink accordingly and it should work, right?

    In any case, if you're after the execution of methods on the loading of the page, you will find the links below.

    If it's a working group, you can add a methodCall as activity by default and UTF, you can use phase listener (if listener server does not).

    https://blogs.Oracle.com/aramamoo/entry/an_epic_question_how_to

    Advice from the Oracle Johny: ADF: how to run the ViewObject with a ViewCriteria on the PageLoad in Application Web ADF

    It will be useful.

    See you soon

    AJ

  • Forms - calculation of percentages are based on the percentages of parent in a tree structure

    Hello

    We have a scenario where we build a tree using a standard package available in oracle forms when new block and fill a tree structure of multi Instance.

    The block is based on a single table.

    The tree is is filled. The problem is with the percentage calculations. As the percentage of the child dependent parent

    PERCENTAGE of PARENT- CHILD LEVEL

    1                101                       0                                 45

    1                102                      0                                  35

    1                103                      0                                   30

    2 201 101 PERCENTAGE OF PARENTS 101

    2 202 101 PERCENTAGE OF PARENTS 101

    2 203 102 PERCENTAGE OF PARENTS 102

    2 204 102 PERCENTAGE OF PARENTS 102

    3 301 201 PERCENTAGE OF PARENTS 201

    You can get the percentages to level 2, level 3.

    I was wondering how this can be done in oracle forms... for example... .to child 201, is the percentage of the 101 level... but level 101 is also filled in the buffer of the block as well as all Level1s...

    All entries are appreciated.

    Thanks and greetings

    S

    The solution me. Idea is to use the 'Post' at the time be called in a loop. Then POST will write in the validation of the database but strict.

    The idea is that at the time of execution, we would be able to select "Not ENGAGED" current session data in the database and use it more for treatment.

    Concerning

    S

  • Neat application to create a tree?

    Hi all

    If I'm in a table:

    Step Dependent_Step

    100 0
    140 100
    200 100
    200 140
    250 100

    Can someone suggest a query that would create a nice tree showing the dependencies? (not sure if this is possible)

    In this example:

    100 is not dependent on the measures
    140 depends on 100
    200 depends on 100 and 140
    250 depends on 100
    create table tree (
           father      integer ,
           son      integer
      4  );
    
    Table created.
    
    insert into tree values (100, NULL);
    
    1 row created.
    
    insert into tree values (100, 140);
    
    1 row created.
    
    insert into tree values (100, 200);
    
    1 row created.
    
    insert into tree values (140, 200);
    
    1 row created.
    
    SQL> insert into tree values (100, 250);
    
    1 row created.
    
    SQL>
    SQL>
    SQL> commit;
    
    Commit complete.
    
    SQL>
    SQL> select son||' is dependent on '|| father from tree
      2  connect by prior father = son;
    
    SON||'ISDEPENDENTON'||FATHER
    --------------------------------------------------------------------------------
    140 is dependent on 100
    200 is dependent on 100
    200 is dependent on 140
    140 is dependent on 100
    250 is dependent on 100
     is dependent on 100
    
    6 rows selected.
    
    SQL> 
    
  • Rules of naming on several tables

    Is there a quick way to the application of several tables-naming rules both in a relational model? The only way to do it, I found is to click with the right button on a table on the diagram canvas, choose Properties and click on the button 'Naming Rules. It is fine for a single table, but it's a bit tedious if there are many. If I select more than one table and apply the rules naming this method that the rules only get applied to the last table selected, not all the tables. While I can choose several tables in the browser tree there is no context menu right-click Allow me to do anything.

    I looked in the help of the naming rules and get 9 hits, none help. Nothing at Universal help either (aka Google).

    Probably I'm missing something really obvious...

    You can apply naming rules in the relational model all - it is in the context menu for the node of relational model in the browser - "apply naming key standards and constraints."

    Philippe

  • How the comprehensibility of the tables gets reduced?

    How comprehensibility of the tables gets reduced if Gets the size of the table and relational tree depth increases. How can I show that the size of the table and the depth of relatonal tree increase reduced the comprehensibility.

    user1151621 wrote:
    How the clarity of the schema gets reduced if the size of the table and the relational tree depth increases.

    You started with a very vague and confusing issue. When asked for clarification, you didn't change the word 'table' to the 'schema '. The question is still vague and confused. When asked further clarification, you didn't repeat the same question.

    Go back to the drawing board and rephrase the question.

    We do not know what you mean by "understanding of the schema.
    We do not know what you mean by 'reduction' of "understanding of the schema.
    We do not know what you mean by "relational tree depth."
    We do not know how the size of the table or the "relational tree depth" refers to "understanding of the schema.

  • to find brothers and sisters to other tree trunk

    Hello

    I have a Table with objects [T (identification number, the field number)].
    I have another table that links these objects in a structure tree [L (up_id number, down_id number)]. ~ (I need the child of beeing objects in more than one parent) ~.

    Get the ID of a certain object (not the root, but it guaranteed not to have only one path to the root).

    I have to find all the objects in the entire tree with the same value in the name attribute.

    Usully I would go for connect prior down_id = up_id start with up_id is null but in my case there is no entry in L have up_id NULL. : () o

    How can I select all nodes in a tree?
    Is this possible with a single statement?

    Good bye
    DPT

    Hello

    T.PD wrote:
    ... I was wondering if the name that (...), select help here...

    Subqueries certainly help. They do not have to be in a WITH clause. views online would work in this case.

    I have to respect the tree structure, because the table contains several separate trees...

    In a tree, each node has only one parent (if any). In my_tree_links, id = 26 has two parents (10 and 20), so this isn't a tree. You not helping yourself or someone else if you say it is.

    INSERT INTO my_objects
    SELECT LEVEL
    , mod (LEVEL,7)
    FROM DUAL
    CONNECT BY LEVEL < 27;
    /
    

    When end you a statement with a semicolon followed immediately by a slash, then the statement is executed twice. I suppose that this isn't what you wanted. If my_objects.id is not unique, the solution below will have some minor changes.

    To limit the results to the nodes that have an ancestor with the target node, you can do a Query of Yo-Yo , where you do a query of bottom-up first, to find all the ancestors without parents of the target node, then do a query from top to bottom, to find all their descendants, like this:

    VARIABLE     target_id     NUMBER
    EXEC  :target_id := 26;
    
    WITH     got_roots     AS
    (
         SELECT     id_up
         FROM     my_tree_links
         WHERE     CONNECT_BY_ISLEAF     = 1
         START WITH     id_down     = :target_id
         CONNECT BY     id_down     = PRIOR id_up
    )
    ,     got_descendants     AS
    (
         SELECT     id_down
         FROM     my_tree_links
         START WITH     id_up     IN (
                             SELECT     id_up
                             FROM     got_roots
                           )
         CONNECT BY     id_up     = PRIOR id_down
    )
    SELECT DISTINCT
         mo.*
    FROM     my_objects     mo
    JOIN     got_descendants     gd  ON     mo.id     = gd.id_down
    WHERE     mo.value     = (
                        SELECT     value
                        FROM     my_objects
                        WHERE     id     = :target_id
                     )
    AND     mo.id          != :target_id     -- If wanted
    ;
    

    Output (where: target_id = 26):

    `       ID      VALUE
    ---------- ----------
            12          5
            19          5
             5          5
    

    Always tell what version of Oracle you are using. The query above works in Oracle 10 (and), but could be adapted to run on Oracle 9.

    Whevever you need to do a CONNECT BY query as a join, it is faster if you can CONNECT BY first, in a separate subquery and join the results for the other tables. This is what the second auxiliary request, got_descendants, is for.

    What results would you if: target_id = 8?
    The query above, as written, would not include id = 1. If you want, you will need to somehow enter the root ID for example 1, which are never id_down, in the same column with all the id_downs. You can do it with a UNION in the query, but you can change permanently my_tree_links so that these roots have some parent (themselves or some dummy, like NULL).

  • Tree nodes are duplicated

    Hello
    I want to create a relationship of the master / detail between a tree (master) and a table (detail) reading. Tree consists of three levels, Status (parent), FormType (child), FormNumber (grandchild). The SQL in the t for each query is as follows,
    Parent - status-> SELECT DISTINCT CREATED_BY, STATE of LCS_NAVIGATION_TREE_V WHERE CREATED_BY =: pCREATED_BY
    Child - FornType--> SELECT DISTINCT FORM_NAME, $form_id, CREATED_BY, LCS_NAVIGATION_TREE_V STATUS
    A grandchild - FormNumber-> SELECT $form_id, FORM_NAME, TRACKING_NUMBER, CREATED_BY, CREATED_DATE, LAST_UPDATE_DATE, SUBMITTED_DATE, STATUS, FINILIZED_DATE OF LCS_NAVIGATION_TREE_V

    When I run my page, the tree shows as many child nodes because child nodes.
    For example, I,
    project
    > Form9
    123 >
    > 456
    > 789
    > Form9
    123 >
    > 456
    > 789
    > Form9
    123 >
    > 456
    > 789

    Why the child node displays three times when it should only appear once. Any help will be greatly appreciated.
    I use Jdev 11.1.1.3.

    Oh and the keys are such...
    Status of parent - CreatedBy,
    Child - CreatedBy, status, FormName
    A grandchild - CreatedBy, status, FormName, FormId

    Hello

    Oh and the keys are such...

    Status of parent - CreatedBy,
    Child - CreatedBy, status, FormName
    A grandchild - CreatedBy, status, FormName FormId >

    I guess that your master / detail ViewLinks are based on the following attributes:
    Parent/child: CreatedBy, status
    Child/Grantchild: FormName CreatedBy, status,

    As the FormId is no attribute not part of the key to the child, you should include it in the motion of the child because it is SEPARATE from Basic. By inlcuding you get "Form9" tripled in the request of the child (because of 3 different FormId values corresponding to the "Form9").

    Open the query of the child as well, and try again:
    SELECT FORM_NAME, CREATED_BY, STATUS OF LCS_NAVIGATION_TREE_V

    Dimitar

  • can bind us a single external table with multiple files in OWB 11 g?

    Hello

    I wanted to ask if it is possible to link an external table with several source files in same or different places? Or an external table must be bound to a single source file and one place.

    Thanks in advance,
    Ann.

    Published by: Ann on October 8, 2010 09:38

    Hello Ann,.

    Can you please help me by telling me the steps to achieve this.

    Right-click on the external table in the project tree, from the menu choose Configure.
    then open right clock the node data files dialog Configuration properties and choose from the menu - Create
    you will get a new record for the file - name of file data property

    Also the link of the OWB user guide
    http://download.Oracle.com/docs/CD/B28359_01/OWB.111/b31278/ref_def_flatfiles.htm#i1126304

    Kind regards
    Oleg

  • Flash tree component

    Hello! To begin with, I am very sorry for my English for.

    I created a tree called myTree and im using this actionscript:



    XML

    create the xml object
    var xml = new XML();
    ignore all white space
    xml.ignoreWhite = true;
    xml OnLoad function
    xml.onLoad = function() {}
    tree link to the xml file database
    myTree.dataProvider = this.firstChild;
    }
    load the xml file
    XML. Load ("/etc/gconf/gconf.Xml.defaults/%gconf-tree.xml");
    create obj to the listener of the tree
    var treeListener:Object = new Object();
    the event listener function
    treeListener.change = function() {}
    What is clicked on in the tree
    var point = myTree.selectedItem;
    the url of the item attribute
    var myurl = item.attributes.url;
    var mylarare = item.attributes.larare;
    If there is an element
    and is not a folder


    {if (MyURL)}




    loader.contentPath = "" http://www.XXXXX.se/db/lektioner/ ' + myurl + "/ preview.swf"; "

    trace ("Selected:" + myurl);

    }
    }
    Save the receiver with the function and purpose
    myTree.addEventListener ("change", treeListener);



    When im using it, it works perfectly when I select my first object. The charger charge it, but when I try to change to the next object and loader "swf number 2" just becomes empty. If I reload the SWF and select "swf number 2" first of all, I won't be able to switch to 'swf nummber 1 ".

    Please help me!

    I found some interesting new things on this problem. If I change the code to:

    Box.Text = "" http://www.xxxxx.se/db/lektioner/ ' + myurl + "/ preview.swf"; "
    loader.contentPath = box.text;

    He always gives the same result, but the text box named 'box' allways gives me the right URL! So the box.text is right, but it seems that I can not load in the charger: S

Maybe you are looking for

  • Satellite M40X-149 - typing question

    My wife is having a problem with some letters by typing on the internal keyboard, the keyboard was changed, but the problem persists. If it uses the following keys that several letters are typed, but not every time, I thought it was the heat associat

  • Envy 17 j108tx: Envy 17 j100 usually power up BUT led is steady white

    So I folded myaelf ovwr barrel here. I borrowed my old mans laptop to do some last minute changes to my online store.He had worked for about 5 hours right before that I have connected to my user account.WALKED FOR LESS THAN 3 MINUTES RETURNED TO FIND

  • Showing my IMac on my tv Flight Simulator

    I have an iMac running 3 year apples latest version of the software and uses Parrellls to run Windows XP.  I have a flight of the Rea flight simulator program and want to project it on my TV using Apple TV. Is this possible?

  • iPad hands continually

    After upgrading to IOS 9.2 iPad 3 resets (hangs) after a short period automatically. A soft-reset (Home button & sleep) has made no changes. A hard reset is not possible, because the ipad faster resets that itunes should recognize the ipad connected

  • On adding folder items to get the new name for the item?

    I really have no idea what I'm doing but I'm trying to capitalize on the addition of items in folder / about items in folders to follow or not removing a specific directory exists but cannot for the life of find me a way. Basically I want it to look