Monday, 27 February 2012

vertical tabs/pages in obiee dashboards


  1. After creating dashboard pages, access the speed menu and "View Source"...locate the table with id="TabsTable", which consists of all dashboard pages & is unique within a dashboard.
  2. In above table tag add style attribute, i.e. style="position: absolute; top: 90px; left: 0px;".  In here the table is removed from normal workflow by specifying absoulte position. Customize other options.
  3. TabsTable consists of only a single row, which must be changed to accomodate all the tabs. Just add multiple row tags leaving all td tags as is. In the sample script below assume there exists two pages:   1-My Page, & 2-Page Under Construction... as highlighted in blue & My Page is active tab.
    [table cellspacing="0px" cellpadding="0px" border="0" style="position: absolute; top: 90px; left: 0px;" id="TabsTable"]
    [tbody]
    [tr]
    [td class="TabHiCell"][a class="TabHiFontLink" href="javascript:void(null)" id="HighTab" target="_self" onclick="return DashboardChangePage('saw.dll?Dashboard&_scid=e55KyvQkYnQ&PortalPath=/users/xxxxxx/_portal&Page=My\x2520Page')" title=""][span class="TabHiFont"]My Page[/span][/a][/td][/tr]
    [tr]
    [td class="TabDimCell"][a class="TabDimFont" href="javascript:void(null)" target="_self" onclick="return DashboardChangePage('saw.dll?Dashboard&_scid=e55KyvQkYnQ&PortalPath=/users/xxxxxx/_portal&Page=Page\x2520Under\x2520Construction...')" title=""]Page Under Construction...[/a][/td][/tr]
    [/tbody]
    [/table]
  4. From the script, id="HighTab" can be removed, which does not have any side effects. Also note the classes of the two defined tabs. It is sufficice to just pass
    saw.dll?Dashboard&PortalPath=xxxx&Page=yyyy as an argument to DashboardChangePage shown in the above script. I did leave as is to illustrate the example.
  5. Place the above script in a text object on My Page. Place the text object at last.
  6. Now, before placing the same script on Page Under Construction... toggle all the classes & add span tag to the innerHTML text of the anchor tag. As this tab is being activated currently, the previous tab looses focus. Changes are highlighted in black i.e.
    [table cellspacing="0px" cellpadding="0px" border="0" style="position: absolute; top: 90px; left: 0px;" id="TabsTable"] 

    [tbody]
    [tr]
    [td class="TabDimCell"][a class="TabDimFont" href="javascript:void(null)" id="HighTab" target="_self" onclick="return DashboardChangePage('saw.dll?Dashboard&_scid=e55KyvQkYnQ&PortalPath=/users/xxxxxx/_portal&Page=My\x2520Page')" title=""]My Page[/a][/td][/tr]
    [tr]
    [td class="TabHiCell"][a class="TabHiFontLink" href="javascript:void(null)" target="_self" onclick="return DashboardChangePage('saw.dll?Dashboard&_scid=e55KyvQkYnQ&PortalPath=/users/xxxxxx/_portal&Page=Page\x2520Under\x2520Construction...')" title=""][span class="TabHiFont"]Page Under Construction...[/span][/a][/td][/tr]
    [/tbody]
    [/table]
  7. The final step involves hiding the already existing horizontal tabs....you do this simply by adding additional dashboard text object. Make sure you add this dashboard text object ABOVE the text object containing above scripts.
    [script type="text/javascript"]

    document.getElementById('TabsTable').style.display="none";
    [/script]
  8. Thus, all the tabs are displayed vertically. Make sure you align your dashboard objects with respect to the vertically displayed tabs. If not aligned properly, content overlaps.
  9. A sample screen shot of the dashboard pages are shown on the right. Note: Tabs can be formatted in anyway as per the requirement.

No comments:

Post a Comment

Thanks to Comment
--Add--