Trouble with Frank Nimph Building a hierarchical tree from recursive table

I copy the example, but when i run it i get the error:
javax.faces.el.EvaluationException: javax.faces.FacesException: javax.faces.FacesException: Can't instantiate class: 'vuo.view.TreeHandler'.. class vuo.view.TreeHandler : java.lang.ClassCastException: oracle.jbo.domain.Number
Caused by: java.lang.ClassCastException: oracle.jbo.domain.Number     at vuo.view.TreeHandler.populateTreeNodes(TreeHandler.java:58)
This is line 58 of TreeHandler.java : employeeNode.setEmployee_id((Number)row.getAttribute("EmployeeId"));
The problem is that i couldn't import oracle.jbo.domain.Number; like in the files TreeHandler.java and GenericTreeNode.java because when i type import oracle.jbo.domain.Number;on my java classes It doesn't compile, in GenericTreeNode does not recongnize:
private Number employee_id;
private Number manager_id;
private Number salary;
and in TreeHandler it said Number not found.
So i comment the import oracle.jbo.domain.Number; on both classes and compile ok, but when i run the page i get the error:
javax.faces.el.EvaluationException: javax.faces.FacesException: javax.faces.FacesException: Can't instantiate class: 'vuo.view.TreeHandler'.. class vuo.view.TreeHandler : java.lang.ClassCastException: oracle.jbo.domain.Number
So what can i do?
Thanks.

Hi,
as you copied the code, male sure that your classes import statement has oracle.jbo.Number and not java.lang.Number in it. It seems that you try to cast oracle.jbo.Number to java.lang.Number. Note that oracle.jbo.Number requires the ADF Business Component runtime libraries to be selected for the ViewLayer project (see project libraries)
Frank

Similar Messages

  • It's possible to make Hierarchical Tree from multiple tables ?

    the famous example for Hierarchical Tree is about employee_id and manager_id field in employees table ............ so I was wondering it's possible to make[b] Hierarchical Tree from multiple tables ? and How ??
    if the answer associate with example that will be so kind of you :D
    and thanks in advance.

    HI
    use curose in when new form instance or procedure then u can got data more then one table like that
    DECLARE
    htree ITEM;
    top_node FTREE.NODE;
    new_node FTREE.NODE ;
    child_node ftree.node ;
    item_value VARCHAR2(30);
    cursor prime_cur is select main_desc mgr_name, main_code dept
    from pur_item_group_mst;
    cursor child_cur(v_dept number) is select sub_desc,sub_code
    from pur_item_group_dtl where main_code = v_dept ;
    BEGIN
    htree := Find_Item('tmp.tree4');
    for dummy in prime_cur loop
    new_node := Ftree.Add_Tree_Node(htree,
    ftree.root_node,
    Ftree.PARENT_OFFSET,
    Ftree.LAST_CHILD,
    Ftree.EXPANDED_NODE,
    dummy.mgr_name,
    'D:\ORYX_POLYBAGS\accept',
    dummy.dept);
    for child in child_cur(dummy.dept) loop
         child_node := Ftree.Add_Tree_Node(htree,
    new_node,
    Ftree.PARENT_OFFSET,
    Ftree.LAST_CHILD,
    Ftree.EXPANDED_NODE,
    child.sub_desc||' '||'('||child.sub_code||' '||')',
    'D:\ORYX_POLYBAGS\next',
    child.sub_code);
    end loop;
    end loop;
    END;
    Rizwan Shafiq
    www.rizwanshafiq.blogspot.com

  • I am having trouble with iMessages. I cannot connect iMessage from my iPhone to my macbook air. This happened after I changed my apple id and keychain password last night.

    I am having trouble with iMessages. I cannot connect iMessage from my iPhone to my macbook air. This happened after I changed my apple id and keychain password last night.

    Hi geraldinefromjersey city,
    I'm sorry to hear you are having issues with Messages. If you are having issues linking your Messages accounts between your iPhone and MacBook Air, you may find the information and troubleshooting steps outlined in the following articles helpful:
    iOS and OS X: Link your phone number and Apple ID for use with FaceTime and iMessage - Apple Support
    Connect your iPhone, iPad, iPod touch, and Mac using Continuity - Apple Support
    Regards,
    - Brenden

  • Problem with Pre-Popup-Menu in Hierarchical Tree

    Hi,
    In Forms 10g I have made an application with an Hierarchical Tree. All works well, except the use of the Pre-Popup-Menu trigger.
    In that trigger when I read the values of Node_Label and Node_Value I get the values of the previous selected node, not the values of the node on which I issue the right mouse click. So, it seems that by clicking the node I need is not selected.
    Does anyone have any clues to solve this problem?
    Thanks in advance.

    Right clicking does not change the current selection. The tree has no way to report what node was right clicked. Only work around is to left click the node you wish then right click it.
    --pat                                                                                                                                                                                                                                                                                                                                                                                                       

  • Can I use Hierarchical Tree from Forms6.0 in Forms5.0

    Hello
    The Oracle Custumer Support tell me that it should be possible to
    use Hierarchical Trees also in Forms5.0
    I look for a possibility to build a Navigator in Forms5.0
    with Symbols. (look and feel like the Navigator in Forms6.0 if I
    use Symbols in the Record Group).
    I Description should be on
    http://developer.us.oracle.com
    but either i have no access to this side or
    the URL is false.
    Sure is that there is a description over this Problem.
    And i have to get this description ;-)))
    Thanks for Help
    JK
    null

    That is not recommended. The new code editing features do not play well with an old workspace.
    Please create a new workspace and import your projects into that.
    -Anirudh

  • Building a binary tree from a string

    I'm having trouble building a binary tree with shape described in a string.
    00 - means both left and right subtrees are empty;
    01 - means that the left is empty, and the right is not;
    10 - right is empty, left is not
    11 - neither are empty
    public BinaryTree(String s, Iterator it) {
    This constructor is supposed to build the binary tree of the specified shape and fills it with values. THe values come from Iterator it, and are placed into the tree in preorder fashion.
    I have to complete this constructor but I don't really know what to do. I was thinking I could use indexOf somehow. Any help would be greatly appreciated.
    Thanks,
    Mike

    I'd build it like this (this is from the top of my head, so no typo-free-warranties etc.) -- public class Tree {
       private Object data;
       private Tree left= null;
       private Tree right= null;
       private Tree(StringReader sr, Iterator di) {
          char l= (char)sr.read(); // left and right subtree indicators
          char r= (char)sr.read();
          data= di.next(); // set data for this node
          if (l == '1') left= new Tree(sr, di); // build left subtree
          if (r == '1') right= new Tree(sr, di); // build right subtree
       public Tree(String s, Iterator di) {
          this(new StringReader(s), di);
    } Note that the private constructor (the one that does all the work) doesn't handle incorrect strings
    at all, i.e. it'll crash horribly when the string passes contains, say an odd number of characters
    is is simply passing incorrect construction information. Also note that the Iterator must be able
    to iterate over enough elements to be set.
    kind regards,
    Jos

  • I'm having trouble with ABS kernel build

    I built a kernel, as per https://wiki.archlinux.org/index.php/Cu … n_with_ABS .  It seemed pretty straight forward.
    The goal was to set CONFIG_PREEMPT=n so I could compile and native install ZFS.  I managed to get the kernel compiled and installed with the modification.
    Now, when I run configure on the SPL, I get the following error:
    checking kernel source version... Not found
    configure: error: *** Cannot find UTS_RELEASE definition.
    It looks like I've done something wrong on the kernel build but I don't know what.

    I'm sorry I didn't see this before, but anyway I'm leaving this here in case someone else finds this through a search.
    I encountered this error while configuring spl as well, though I had not built my own kernel. The definitions are provided by the kernel26-headers package.
    For those interested in trying out zfs, there is as of 2011-05-31 an issue with zfs-0.6.0-rc4 + the Archlinux kernel (2.6.37 and 2.6.38 confirmed), that causes a deadlock when writing to a zfs pool, effectively making zfs unusable. There seems to be a way of configuring oneself out of this by recompiling the kernel. I shall update if I manage to get it to work.
    More info here: https://github.com/behlendorf/zfs/issues/167

  • Build a hierarchical structure from a ordered table

    Hi guys,
    say I have a table A with 3 columns, each column represents a level in a hierarchical structure. Is it possible to make a recursive query (connect by) to retrieve the info in a hierarchically way?
    TABLE A.
    COL1 COL2 COL3
    1 2 3
    1 2 4
    1 2 5
    The tree I want should be something like:
    1
    2
    3
    4
    5
    Thanks for your help!.

    Not really, there was a display problem. What happen is that I want to display a tree in Forms based on the info I have in my table, so the tree(implemented with FTREE) has to look like this:
    +1
    --+2
    ----3
    ----4
    ----5
    As you can see, if the table would be with only 2 columns with an pig ear relationship this would be very easy, however my hierarchy of my table is based on the position of the columns:
    COL1 father of COL2
    COL2 father of COL3
    and so on...
    My problem is that I don4t know how the query I have to fill in the Data Query property of my tree has to be.
    I tried on Forms forum but didn't get any answer, so I hope you sql guys may give a clue, as I know you're very smart in this area.
    Thanks for your sooner input.!

  • Troubles with opening Finder, System Preferences, and others from dock

    I am having problems with Finder, System Preferences, applications like Word, Excel, and Firefox. When I click on their icons in the dock, the menu bar appears with the name of the application and file, edit, etc. but the application does not open a window on the screen. I just see my background pic. Some of the items in the menu bar that pop down don't work. However, apps like my mail, Safari, Itunes and others work properly.
    If anyone can help me with some suggestions, that would be great!
    tannikca

    Hello t:
    Welcome to Apple discussions.
    Do those applications open from the application folder? If they do:
    Try trashing a preference file and restarting (com.apple.dock.plist).
    If that does not help, drag the icons that do not work off the dock (poof sound). Then go to the application folder and drag the appropriate icon to the dock.
    Barry

  • Hierarchical Query from 4 tables

    Hi,
    I'm using database 10.2.0.1.0.
    I have 4 tables . The data
    SQL> select * from table1;
          TT1
            1
            2
            3
            4Where tt1 is a number column
    SQL> Select * from table2;
          TT1 TT2
            1 x
            1 y
            2 a
            3 testing search
    SQL> Select * from table3;
          TT1 TT2                            TT3
            1 x                              xy
            1 x                              xz
            1 y                              yn
            2 a                              ax
    SQL> Select * from table4;
          TT1 TT2        TT3        TT4
            1 x          xy         testing for the width expansion
            1 x          xz         testing
            1 y          yn         ynx
            2 a          ax         axy
            2 a          ax         axzFrom these table i want to write a hierarchichal query to populate a tree , such that the tree looks like
    1
       -- x
           --  testing for the width expansion
           --  testing
       -- y
           -- ynx
    2
       -- a
           -- axy
           -- axz
    3
       -- testing search
    4Note: Table3's data is not shown in the tree, but is used indirectly to get the data from table4.
    Please help
    Thanks

    Yes, that's the script.
    Sample output for you:
    SQL> SELECT LPAD(' ', 2*level) || granted_role "USER PRIVS"
    FROM (
    SELECT NULL grantee, username granted_role
    FROM dba_users
    WHERE username LIKE UPPER('system')
    UNION
    SELECT grantee, granted_role
    FROM dba_role_privs
    UNION
    SELECT grantee, privilege
    FROM dba_sys_privs)
    START WITH grantee IS NULL
    CONNECT BY grantee = prior granted_role;
    USER PRIVS
      SYSTEM
        AQ_ADMINISTRATOR_ROLE
          CREATE EVALUATION CONTEXT
          CREATE RULE
          CREATE RULE SET
          DEQUEUE ANY QUEUE
          ENQUEUE ANY QUEUE
          MANAGE ANY QUEUE
        CREATE MATERIALIZED VIEWWould this work?
    //Johan

  • Displaying data in a tree from database table

    Hi,
    I want to display data from a database table (mara-matnr) in a tree structure. I went through the coding of SBSPEXT_HTMLB. There static data was taken in to wa_tab. But there I want to bring data from a database table into wa_tab. For this I created an internal table without headerline by taking a work area, now how can I move data from this work area to wa_tab record by record.
    I hope some one might have worked on this. Plz help me....
    Thanks in advance,
    Ravindra.

    Hi,
    take a look at this <a href="/people/tomas.altman/blog/2004/12/13/sdn-blog-how-to-do-internal-tables-in-bsp which explains how internal tables work in ABAP OO.
    Furthermore I think you want to do this:
    insert <yourWorkarea> into table wa_tab.
    A complete mara example would be:
    data tab_mara type table of mara.
    data wa_mara type mara.
    select * from mara into table tab_mara.
    *or you can use:
    select * from mara into wa_mara.
       insert wa_mara into table tab_mara.
    endselect.
    regards
    Thomas

  • Query for hierarchical tree

    I am trying to build a hierarchical tree and tried various option but is unable to show the tree. I have tried using record group and also query text. When I used
    Ftree.Set_Tree_Property(htree, Ftree.query_text, 'SELECT 1, hierarchy_level, hierarchy_code, '', hierarchy_desc FROM oms_cust_hierarcy_tree_vw
    connect by prior hierarchy_code = hierarchy_parent
    start with hierarchy_parent is null');
    I got following error:
    "FRM-47313: invalid query for hierarchical tree".
    I am stuck now. Any help will be appreciated.
    Thanks
    Brinder

    dear member try this query
    SQL>
    1 SELECT level, LPAD(' ',2*level-2)||emp.ename ename, emp.empno, emp.mgr, emp.deptno
    2 FROM Emp
    3 CONNECT BY PRIOR emp.empno = emp.mgr
    4* START WITH emp.empno = 7839
    SQL> /
    LEVEL ENAME EMPNO MGR DEPTNO
    1 KING 7839 10
    2 BLAKE 7698 7839 10
    3 MARTIN 7654 7698 10
    3 ALLEN 7499 7698 10
    3 TURNER 7844 7698 10
    3 JAMES 7900 7698 10
    3 WARD 7521 7698 10
    2 CLARK 7782 7839 10
    3 MILLER 7934 7782 10
    2 JONES 7566 7839 10
    3 FORD 7902 7566 10
    4 SMITH 7369 7902 10
    5 Ken 999 7369 10
    3 SCOTT 7788 7566 10
    4 ADAMS 7876 7788 10
    M Rizwan

  • URGENT *** Hierarchical Tree in Forms 9i *** URGENT

    Hello everybody,
    for my company I need to build a hierarchical tree item, that will display static data over three levels. Let's say: departments, employees and employee projects.
    How do I fill the Item?
    When do I fill the Item?
    Where do I fill the Item?
    What are the elements of the SQL query, that fills the hierarchical tree?
    Any help will be appreciated
    [email protected]

    Note:210663.1 helped a bit.
    I used the database column as the third element in the select part and put NULL as the fifth element. Then it worked.
    Now I am looking for the way to add the employees, when the user selects / activates a department node.

  • Finding proper help on Hierarchical Trees

    Have spent a couple of hours trying to navigate the sprawling website of oracle.com with the purpose finding and then downloading the appropriate help file. I downloaded
    Oracle9i Developer Suite Release 2 Documentation Library
    from
    http://www.oracle.com/technology/documentation/ids.html
    Its about 130Mb, installed it, but could i find comprehensive documentation on using Forms 9i (in particular Hierarchical Trees) no, but everything else it seemed yes. The original doc that pre-installed with the 9i DS 'online help' is reasonably helpful but like some others on this forum I could not find proper help on how to use Hierarchical Trees all i could find was few descriptive portions of text and believe me i have looked.
    Others have said they found examples of Hierarchical Trees usage i can only assume they are using 10g. So this is a desperate plea to you. Can you point me to an online resource that deals with Hierarchical Trees in Forms 9i (intro, usage, examples, etc). If you can i would deeply appreciate it.
    Mr Frustrated :)

    Hi,
    You have a lot of sample With the Forms Help.
    If you search in the index with "htree."
    The command hierarchical tree complete list appear.
    L.

  • I am having trouble with hdmi from MacBook to TV

    Having trouble with the sounds when I connect  hdmi from MacBook to TV

    This is the iPad forum. Do you have a question about iPad? If not, I'll ask that your post be reassigned.
    BTW, you will need to provide more detail than that for someone to help. How are you connecting the two? What have you already done to troubleshoot? What was the result?

Maybe you are looking for