The following have been tested and used in Oracle 10g rev2 with APEX 3.1 installed.
One may find it difficult to work with the standard Oracle APEX tree, but with a few small tweaks you can surely do what you want.
Please check how a standard Oracle APEX tree is done here:
So, here's the hypothesis of the problem:
- We want to have a tree next to or inside an APEX form.
- There is one tree node that is currently highlighted and the user can select/highligth other nodes as he/she wants WITHOUT interfering and/or loosing the form data typed.
Lets proceed to the demonstration:
The second idea included in the hypothesis is pretty much easy to solve, provided that one may find this other link:
Now that we solved half the problem, we may want to solve this "nasty" bug: keeping/persisting the form data as the tree is browsed.
To do that, we first need to be perfectly knowledgeable of the format that APEX uses for its links:
But how does that help ?
Well, from the above page about APEX links, we can find out that we could pass on variables through the link (basicly using HTTP GET vars), but how to do that from the tree ?
A small example:
select CURRENT_TREE_NODE_ID id,
CASE when CURRENT_TREE_NODE_ID = :CURRENT_FORM_ITEM THEN
ELSE LEAF_INFO END name,
and we can now put the persistFormData function inside the header or even a separate region:
link2 = ':'+passVal1;
/*and so on for the entire form*/
window.location = link1+link2;
The tricky part in the function above ?
- The link format that is completely described in the refferenced tutorial (note that I used page number 1 for this example).
- The usage of enclosing '%5C' (or /) for the variable values to be able to pass on commas or any special characters !
- The link gets appended all the name and values for the entire form !
Thats about all,
I hope this will really help ppl as other blog tutorials really helped me.