Hi,
as we have a lot of problems with original apex trees, we decided to build our own tree using the jQuery Treeview Plugin.
We want to populate the tree by executing an OnDemand Application Process, which would return the HTML hierarchy like :
<ul id="browser" class="filetree">
<li><span class="folder">Folder 1</span>
<ul>
<li><span class="file">Item 1.1</span></li>
</ul>
</li>
<li><span class="folder">Folder 2</span>
<ul>
<li><span class="folder">Subfolder 2.1</span>
<ul id="folder21">
<li><span class="file">File 2.1.1</span></li>
<li><span class="file">File 2.1.2</span></li>
</ul>
</li>
<li><span class="file">File 2.2</span></li>
</ul>
</li>
</ul>
I just started coding the ODP :
DECLARE
CURSOR cur IS
select
op_descript,
op_id,
op_parent_op_id,
level
from operations
connect by prior op_id = op_parent_op_id
start with op_id = 0;
BEGIN
htp.p('<ul id="browser" class="filetree">');
FOR c IN cur LOOP
/* etc... */
end loop;
END;
As the content of the loop seems a little complicated, and as I don't want to reinvent the wheel, I ask you if you think of an other way to populate the tree, or if one of you have already tried a similar thing.
Thanks !
Yann.