This tip was posted in Oracle Apex Knowledge Group by Richard Martens. Its my sincere pleasure in thanking the author for this simple tip.
The original blog is available here. I am posting the steps first, and a slight deviation which makes the setup one time only through this article.
The idea is to create a region first and all sub-regions as tabs. If this design suits your application then its simple as copy-paste.Create a template
The original blog is available here. I am posting the steps first, and a slight deviation which makes the setup one time only through this article.
The idea is to create a region first and all sub-regions as tabs. If this design suits your application then its simple as copy-paste.Create a template
- Go to Shared Components
- Navigate to Templates
- Press the Create Button
- Choose Region
- Choose From Scratch
- Provide the name jQuery Tabs
- Choose Custom 1 for template class
- Press Create button
- Once the template is created, find the jQuery tabs from the list and click to edit.
- Paste both the following codes in Definition Section:
<div id="#REGION_STATIC_ID#" #REGION_ATTRIBUTES#> #BODY##SUB_REGION_HEADERS##SUB_REGIONS# <div style="clear:both;"></div> </div> <link rel="stylesheet" href="#IMAGE_PREFIX#libraries/jquery-ui/1.8/themes/base/jquery.ui.tabs.css" type="text/css" /> <script src="#IMAGE_PREFIX#libraries/jquery-ui/1.8/ui/minified/jquery.ui.tabs.min.js" type="text/javascript"></script>
<script type="text/javascript"> apex.jQuery(function() { apex.jQuery("##REGION_STATIC_ID#").tabs(); }); </script>
- Paste the following in Sub Regions > Header Template
<ul style="height: auto;">#ENTRIES#</ul>
- Paste the following in Sub Regions > Header Entry Template
<li><a style="overflow:auto;" href="##REGION_STATIC_ID#-tab-#SUB_REGION_ID#">#SUB_REGION_TITLE#</a></li>
- Paste the following in Sub Regions > Template
<div id="#REGION_STATIC_ID#-tab-#SUB_REGION_ID#">#SUB_REGION#</div>
The template is now ready. Now you are ready to create regions in your page. While creating the Parent region, choose the template as jQuery Tabs.
If you are wondering what is the improvisation I have done, its present in Step 10.2
In Richard Martens blog the step 10.2 is mentioned to be done for every page. I have modified it to be included in the page template itself. A very small and negligible improvisation.
No comments :
Post a Comment