Using my experience, Apex beginners always has a trouble with creating Two Level Tabs. That’s why I decided to post this blog.
First of all some words about the structure of Two Level Tabs.
This is a schema of Apex structure of Tabs
For example:
“Parent Tab Set” is – “Main”
“Tab Set + Parent Tab” is – “Parent 1” and “Parent 2”
“Standard Tab” is – “Page 1” and “Page 2”
Now let’s create a sample two level tabs:
1. Go to Shared components -> Tabs
2. Click on “Create New Standard Tab”
3. Creating Standard Tab Set
a. Check “Create a new tab set and a new tab within the tab set.”
b. Enter name for your tab set, for example “TS1”
c. Enter the name of parent tab set, for example “PTS1”
d. Enter tab label, for example “page 1”
e. Enter page number, for example “1”
f. ………..
g. Push “Create Tab” button.
4. Now you have only One Level Tab
If you include this tab to your page you will have the next view:
5. Lets add Parent Tab, by clicking on “Add” link (add new parent tab)
a. Enter parent tab label, for example “Parent 1”
b. ……….
c. Push button “Create Parent Tab”
6. Go to page “Display Attributes“, Select page template to “Two Level Tabs” and Standard Tab Set, in our example it is “TS1(page 1)”
7. If you run your application you can see the next tabs:
8. Now lets add one more standard tab.
a. Click on “Add” link (add new standard tab)
b. Enter tab label, for example “page 2”
c. ……..
d. Click on “Create Tab” button
e. Go to page 2 and do the same thing as in point 6.
9. At this step you have one parent tab and two standard tabs. The next step is adding another parent tab. It was the main reason for writing this report because each novice has a problem with it. You will see it later.
a. Reproduce point 5 (example Parent 2)
b. Click on created parent tab (Parent 2) and, and reproduce point 8
c. Go to the page which you have just associated with standard tab. And reproduce point 6 (standard Tab Set -> T_PARENT2(Page 3))
d. Lets run our application
If you go to “Parent 2” the page 3 will be opened, but there would be one level tab:
This is because your Standard Tabs should be in one Parent Tab Set
10. Lets add Tab Set with page 3 to Parent Tab Set of page 1 and 2.
a. Open Shared Components -> Tabs
b. Go to “Edit Standard Tabs” link
c. Click on Edit icon of new tab set. (note that the value of Parent Tab Set is (null) )
d. Go to Parent Tab Set
e. Change it to your Parent Tab Set (TS1)
f. Click Apply Change button.
11. Now everything works perfectly
12. At the end of my post I would like to show you how do I drop Parent Tabs and Parent Tab Sets
a. Click on Edit icon on parent tab:
b. Press “Delete” button
c. You can find that tab set is still exist
d. Go to Edit Standard Tabs and delete it in the same way.
That’s all
P.S. One more reason that the parent tabs were not being displayed was because, the target page for the parent tab was not set as a target (set current) for any of the standard tabs that belonged to that parent tab .
SO what happened was whenever a parent tab was clicked the app loaded the target page with the standard tabs properly, but since none of the standard tabs itself was set to be current for that target page, the parent tab itself was not current and hence not displayed. (user581875)
26 comments:
That is really helpful, cheers!
Thanks! The current implementation of tabs is terrible and completely inconsistent with other areas of Apex. I really hope they improve this in future versions.
Your blog helped me finally figure out how to navigate this quagmire after floundering helplessly for about two weeks.
Bill Ferguson
Konstantin - thanks so much for this blog entry. It was extremely helpful, especially your emphasizing "the main reason for writing this report", which finally openend my eyes!
Hi,
This is Etay from Oracle Isr support centers.
Thanks for the information. very helpful.
We all hope that Tabs interface , will be changed in the up-coming versions.
Regards
Etay G (etay.gudai@oracle.com)
Kostja,
This is a good posting. I think, it will help many developers to solve their problems with two level tabs.
Denes Kubicek
Thank you, Thank you, Thank you!
I tried to make something useful for Apex developers.
And It seems this post is widely adopted.
Phew ! Thanks to you, Konstantin, I could finish my changes, instead of trying to figure it out endlessly!
:)
Hi Konstantin,
This blog is excellent & Good reference for the Apex-newbies.
It helped me to learn, to create two level tabs.
cheers!!!
bye
Kavita
The one thing I wanted to mention and missed out was that point # 6 and #10.d in your explanation are, in my opinion, the 'traps'/mistakes that a novice can most likely commit.
i.e
1. ensure that the page's template is set
2. ensure that the parent tab set it set.
Thanks a lot ! It finally helped me to understand the tab implemetation.
Regards, Peter
Hi,
thanks for the article, it's great,
I just want to add one more trap that I had a problem with,
I created a tab set, and i wanted to create a parent tab using Add button,
however... if I create parent tab in that way... apex also created parent tab set with the same name, which I couldn't change... although i chose main as parent tab set
Solution for me was to first click on the Manage parent tabs in the right sidebar, and then to click on the Create New Parent Tab also in the sidebar...
after I created parent tab in that way... it worked perfectly...
(parent tab set was set to main as I choose)
I'm using Application Express 3.1.1.00.09 installed on Oracle XE
Uhum, feeling like an idiot.
Thanks for your explanation. It's great
Is there any way to align the parent tabs to the left instead of to the right?
It depends of your page template. You have to change HTML (CSS) code in your page template. Look for #PARENT_TAB_CELLS# and #TAB_CELLS# substitution strings.
Hi Kostya,
your post is visual and helpful! Thank you!
Did you get a chance to see how parent tabsets can be used in ApEx apps? The thing is I can see that it is possible to create several parent tabsets, then select them in the definition of the standard tabs, but I can not see any need or benefit coming out of them. Basically the question is why Oracle needed them in the first place... Any observations/thoughts/comments are appreciated.
Thanks,
Andrew
Thank you!
This was an immensly useful post.
The part about having to choose the parent tab set for each standard tab, yeah that was really helpful! I have been fiddling with this for hours, wondering why my parent tabs just does not show. The problem sounds simple but its not.
But, if a standard tab belongs to a parent tab, and that parent tab belongs to the parent tab set, why does ORACLE APEX insists that we perform the above step? I don't get that.
thx ... that last part was what i was missing =]
Dear Konstantin - thank you so much. I cannot tell you how many hours I have wasted.... :-(. Your description is very very helpful.
I had a really annoying issue where only the lower set of tabs was displaying. This was fixed buy editing the page settings and selecting "Two Level Tabs" for the page template.
I totally agree with what you stated!
The same factor occurred to me and a lot more or less I did the same issue.
Nice post.
I have a detailed example about this if you want to share. Thanks
http://rodenthood.blogspot.com/2010/07/as-many-new-developers-in-apex-find-it.html
Thank you. Was looking for hours on this problem.
Dear Konstantin, i am very greatful to you to give step by step procedure for creating tabs. it is very helpful for me. i waste lot of time already..so thankyou
Dear Konstantin,
thank u so much for step by step procedure of creating tabs. it is very helpful to me.
again thank you
hi, good site very much appreciatted
Post a Comment