I need to create jQueryUI accordion region based on APEX list / list template. The list will be loaded with SQL query that contains list level information:
SELECT select_level "level" -- 1 or 2
,select_label label
,select_target target
FROM custom_menu
ORDER BY menu
,select_level
I created list template using <h3> element for main level entry and <a> elements for level 2 data.
List template (current and non-current):
<h3 class="selected">
<u>#TEXT#</u></h3>
Sublist template (current and non-current):
<img src="#IMAGE#" #image_attr#="" style="vertical-align:middle;margin:2px;margin-right:4px;">#TEXT# sublist
In order to make jQUI accordion work, I wrapped my sublist elements with <div> tag.
Sublist Template Before Rows: <div>
Sublist Template After Rows: </div>
Unfortunately, this doesn't work very well. It seems that APEX doesn't print sublist before/after rows <div> snippets but handles sublist elements properly. In the end, my links aren't wrapped with <div> and jQuery UI doesn't know how to handle HTML code. It takes only first sublist elements and creates accordion content.
You can check it for your self and see the code http://apex.oracle.com/pls/apex/f?p=4550:1:0:::::
Workspace: ilijasic
Username: demo
Password: demo
First list uses expected list template and second one uses patched list template
I found a way to solve this problem. I made new a list template in which I entered </div> <div>tag on main list entry but this solution works only if I'm sure that every main entry has child elements.
My question is: why APEX doesn't print <div> sublist tags. I have to say this template works properly if I'm using static list. It seems to me that APEX doesn't know how to handle parenting by using dynamic SQL list.
Thank you in advance.