7 Replies Latest reply: Oct 22, 2013 12:58 AM by Elad RSS

    Get the value of tree node

    Elad


      Hi,

      I use hierarchical tree for build a menu (in oracle forms 11g).

      I need to retrieve the value of the selected node (child_id), and when I write the following statement, I get an error: frm-47307:cannot get the properties of the tree root node .

      the statement is:

      l_node_value := Ftree.Get_Tree_Node_Property(htree , :SYSTEM.TRIGGER_NODE , Ftree.NODE_VALUE);

       

       

      I use this query to populate the tree (and It work fine...):

       

      select case

                when connect_by_isleaf = 1 then

                 0

                when level = 1 then

                 1

                else

                 -1

             end as status

            ,level

            ,name as title

            ,null as icon

            ,CHAILD_ID as value

      from

        (

          SELECT  TO_CHAR(CUO.OBJECT_ID) CHAILD_ID ,

                  TO_CHAR(NULL)   PARENT_ID ,

                  CUO.OBJECT_PROMPT  NAME,

                  'G' OBJECT_TYPE

          FROM CRDX_USER_OBJECT CUO

          WHERE GROUP_ID = -1

        UNION

          SELECT  TO_CHAR( CGO.OBJECT_ID) CHAILD_ID,

                  TO_CHAR(CGO.FOLDER_ID) PARENT_ID,

                  CGO.OBJECT_PROMPT NAME,

                  OBJECT_TYPE

          FROM CRDX_GROUP_OBJECT CGO

        )

      start with parent_id is null

      connect by  parent_id  = prior   CASE OBJECT_TYPE WHEN 'G' THEN CHAILD_ID END

       

      Can anybody help me?

       

      Thanks in advanced,

      Elad