create or replace package odwatree as procedure reset_tbl ; -- procedure opens an HTML table, writes the current tree and closes the table -- only support for Node-Display-labels, -- no support for Open/Close Folders or Inflate Nodes procedure draw_tree ; procedure populate_tree ( p_start_idx in number default 0 -- where in foldersTree array; 0 means at the start , p_node_index_offset in number default 0 -- node index offset , p_frame_locator in varchar2 default null -- if statements are included in other frame than which contains foldersTree and appendChild, the frame locator needs to be provided ); function get_number_of_nodes return number ; procedure write_inflate_code ( p_node_index in number , p_num_of_nodes in number , p_frame_locator in varchar2 -- path to the frame that contains the foldersTree , p_entry_point in number default null -- typically equal to p_node_index, although sometimes slightly beyond p_node_index ); procedure add_node ( p_display_label in varchar2 , p_node_level in number -- start at 1 (root-level) , p_has_children in boolean , p_is_expanded in boolean default false , p_value in varchar2 , p_additional_label in varchar2 default '' , p_is_inflatable in boolean default false , p_classification in varchar2 default '' ); -- this procedure will walk through the tree table and set the has_children property -- where it is not set while in fact children DO exist procedure find_folder_nodes ; procedure js_tree ( p_codeFrameName in varchar2 -- e.g. treeLogicFrame , p_treeFrameName in varchar2 -- e.g. folderFrame , p_treeFramePath in varchar2 -- e.g. top.selector.folderFrame , p_xchangeFramePath in varchar2 -- e.g. top.appsBottom.rightSide.dataXchange , p_js_action in varchar2 -- the JavaScript function to be called when a node is selected , p_node_href in varchar2 -- the JavaScript Call to be made to p_js_action when a node is selected -- elId and idx can be referred to in the call; they the node value and index respectively -- name and additionalLabel are also available , p_inflate_request in varchar2 default null -- name of PL/SQL procedure to be called to provide inflation data; e.g. 'odwa_fol.inflate_Node' , p_inflate_parameters in varchar2 default null -- additional parameters to be passed upon inflation (if more than one parameter, they must be separated by Ampersands) -- e.g. 'p_session_id='||to_char(odwactxt.get_session_id)||chr(38)||'p_root_node="+getParentNodeAbsolute( foldersNodeIndex, 0) , p_refresh_tree in varchar2 default null -- what is the PL/SQL procedure (incl.parameters) to be called to refresh the entire tree -- if not null, this parameter will results in a function refreshTree() -- that performs: p_codeFrameName.location = p_refresh_tree ) ; procedure tree_frame ; end; /