I have pl/sql function returning table of inherited objects keys: function get_class_inheritors(p_cclassname varchar2) return sys_refcursor
it returns className, inheritorClassName, InheritorCaption
so I call it for some rootClassName, then iterate over it result and call function for result items and so on, until result has no rows.
I need to recursevly build tree of inheritors and show it on page, interactively, when user selects new object from table
1) how to build model of TreeModel?
I can create Entity for it or generate it programaticaly, but I reealy do not understand the point to start :(
In case of Entity I realy do not get how to build tree binding :( I cant select root for the tree
2) where to put moddel building (backing bean or appModule)?
Ok. (btw, I am using Avrom's Package API-based framework)
1) I created Inheritors VO based on pl/sql function with binded variable
2) I created ViewLink from Class VO to Inheritors VO
it works GREAT, it worked like this few days already :), I can get inheritors list fine. but it just one level, I need to get in 2-3 levels down recursevly, displaying it like a tree
when I try to bind a tree I get this: screen
And do not know what to do next.
I will change my question a little bit.
I have pl/sql func: get_class_inheritors_tree(className)
Result is like this:
CCLASSNAME CCLASSNAME_SUPER LEVEL
child1 parent 1
child2 parent 1
grandChild21 child2 2
grandChild22 child2 2
grandChild11 child1 2
grandChild12 child1 2
How can I display this using af:tree like this: