Hi,
I am currently building a plugin for Oracle APEX 4.0 based on jstree. There's already a native tree plugin inside APEX but it's using an old beta version of jstree.
How things works:
The HTML pages are rendered by PL/SQL. Inside a jQuery UI Accordion menu, I want to create many trees.
- I am using "JSON_DATA plugin" to get the nodes of my trees. At render time, the DOM already have the first level of nodes (root). Also, the DOM contains the object to set the "types plugin".
Example of the variables:
var arbre_ajax_R8423316772622788_json = [{"attr":{"id":"R8423316772622788_C21","rel":"COMPT_COURL"},"data":{"title":"Support [Partagé]","attr":{"href":""}},"state":"open","children":[{"attr":{"id":"R8423316772622788_D7786","rel":"BOITE_RECPT"},"data":{"title":"Boite de réception","attr":{"href":""}}},{"attr":{"id":"R8423316772622788_D7789","rel":"BOITE_ENVOI"},"data":{"title":"Boîte d'envoi","attr":{"href":""}}},{"attr":{"id":"R8423316772622788_D7788","rel":"MESG_ENVOY"},"data":{"title":"Messages envoyés","attr":{"href":""}}},{"attr":{"id":"R8423316772622788_D7787","rel":"BROUI"},"data":{"title":"Brouillons","attr":{"href":""}}},{"attr":{"id":"R8423316772622788_D7790","rel":"COUR_INDES"},"data":{"title":"Courrier indésirable","attr":{"href":""}}},{"attr":{"id":"R8423316772622788_D7791","rel":"CORBL"},"data":{"title":"Corbeille","attr":{"href":""}}}]}];
var arbre_ajax_R8423316772622788_json_type_noeud = {valid_children:"all",type_attr:"rel",types:{"cour_indes":{valid_children:"all",select_node:true,open_node:false,close_node:false,create_node:false,delete_node:false,icon:{image:"/res/sem/images/cour_indes.png"}},"boite_envoi":{valid_children:"all",select_node:true,open_node:false,close_node:false,create_node:false,delete_node:false,icon:{image:"/res/sem/images/boite_envoi.png"}},"broui":{valid_children:"all",select_node:true,open_node:false,close_node:false,create_node:false,delete_node:false,icon:{image:"/res/sem/images/broui.png"}},"mesg_envoy":{valid_children:"all",select_node:true,open_node:false,close_node:false,create_node:false,delete_node:false,icon:{image:"/res/sem/images/mesg_envoy.png"}},"corbl":{valid_children:"all",select_node:true,open_node:false,close_node:false,create_node:false,delete_node:false,icon:{image:"/res/sem/images/corbl.png"}},"compt_courl":{valid_children:"all",select_node:true,open_node:true,close_node:true,create_node:false,delete_node:false,icon:{image:"/res/sem/images/compt_courl.png"}},"boite_recpt":{valid_children:"all",select_node:true,open_node:false,close_node:false,create_node:false,delete_node:false,icon:{image:"/res/sem/images/boite_recpt.png"}}}};
For FF and Chrome, the nodes have the correct icons. Things are different in IE 8/9. Icones are the default one.
Thanks for you help,
Louis-Guillaume