create or replace package odwahelp is -- this procedure writes a JavaScript function into the HeadSection of an HTML document -- the function, showHelp( id), can be called to bring up a window with help on a specific topic -- calls to this function can be retrieved from the function odwahelp.help_url procedure js_invoke_help ; -- this function returns the JavaScript call to be made to invoke the help for the indicated item function help_call ( p_him_id in number ) return varchar2 ; -- this function will return a url to show the help for the indicated item -- note that this url should only be used in a document that contains the showHelp function function help_url ( p_him_id in number , p_icon in boolean default true , p_text in varchar2 default null , p_alt_text in varchar2 default null , p_top in boolean default false -- is the JavaScript function to be located in the Top (Window) frame (instead of the current frame) ) return varchar2 ; -- procedure display the result of a Search in the helpItemFrame as initiated from the Search item -- in the helpBarFrame procedure searchHelp ( searchString in varchar2 , p_session_id in number ); procedure helpBarFrame ( p_session_id in number default null , p_him_id in number -- the help item id (refers to table ODWA_HELP_ITEMS.id) , p_hnd_id in number default null -- the node id ODWA_HELP_NODES table ); -- this procedure will write a framework HTML document -- fleshed out with the text stored for the current Help Item p_him_id -- in the table ODWA_HELP_TET. procedure helpItemFrame ( p_session_id in number default null , p_him_id in number -- the help item id (refers to table ODWA_HELP_ITEMS.id) , p_hnd_id in number default null -- the node id ODWA_HELP_NODES table ); -- this procedure writes the JavaScript function that is necessary to be able to invoke -- a viewlet from within the current document -- IF this procedure is called between htp.headOpen and htp.headClose, Viewlets can be linked -- to in the HTML page using the following URL: -- href="javascript:parent.openViewlet('')" procedure js_invoke_viewlet; -- main procedure -- ------------------------------- -- | helpBarFrame | -- | | -- | | -- |-----------------------------| -- | | -- | helpItemFrame | -- | | -- ------------------------------- -- -- procedure show_help_item ( p_session_id in number default null , p_him_id in number -- the help item id (refers to table ODWA_HELP_ITEMS.id) , p_hnd_id in number default null -- the node id ODWA_HELP_NODES table ); -- this procedure displays an existing or new help item in editable form items procedure editHelpItem ( p_session_id in number , p_him_id in number default null , p_hnd_id in number default null -- the node id ODWA_HELP_NODES table ); -- this procedure receives the Form Post with the edited help item and will update the database tables -- subsequently, it will display the help item in the current document (frame) using helpItemFrame procedure saveHelpItem ( p_session_id in number , p_hnd_id in number default null -- the node id ODWA_HELP_NODES table , him_id in number default null , p_description in varchar2 , p_document in varchar2 default null , p_keywords in varchar2 default null , p_parent_node in number default null , p_seq_in_parent in number default null , txt1 in varchar2 default null , txt2 in varchar2 default null , txt3 in varchar2 default null , txt4 in varchar2 default null , txt5 in varchar2 default null , txt6 in varchar2 default null , txt7 in varchar2 default null , txt8 in varchar2 default null ); procedure node_selected ( p_session_id in number , p_node_value in varchar2 default null , p_node_type in varchar2 default null , p_root_value in varchar2 , p_root_classification in varchar2 default null ); procedure inflate_Node ( p_node_index in number , p_node_level in number -- level of node-to-be-inflated (all its children will have p_node_level + 1 or higher) -- node levels in client are number 0..(highest level-1). in server 1..highest level , p_num_of_nodes in number , p_node_value in varchar2 default null , p_node_type in varchar2 default null , p_entry_point in number default null , p_session_id in number , p_root_value in varchar2 , p_root_classification in varchar2 default null ); procedure dataXchange ( p_session_id in number ); procedure rightSide ( p_session_id in number , p_him_id in number default null ); procedure topSide ( p_session_id in number ); procedure helpTree ( p_session_id in number ); -- main procedure for the select WA and Folder screen -- sets up a frame that ultimately will look as follows: -- ------------------------------- -- | | -- | | -- | | | -- | helpTree | helpFrame | -- | |------------- | -- | | dataXchange | -- ------------------------------- -- { rightSide } -- this procedure renders the ODWA On line help system, consisting of a tree with all topics -- and a display panel for the current topic procedure odwa_help ( p_session_id in number default null , p_him_id in number default null ); end; -- odwahelp /