23 nov 2012

Showing first tab always in a ADF panelTabbed

Oracle ADF panelTabbed component has the capability of remember the last Tab that the user keeps opened.

When the user get back to the page or taskflow that contains the af:panelTabbed, the last tab opened will be shown instead of the first tab.

If you want to show always first tab as "opened", there is a couple of parameters at the af:showDetailItem that will help us.

This  is a sample code that will make the trick:

<af:panelGroupLayout id="pgl1" layout="vertical">
  <af:panelTabbed id="ptab1" position="above">
    <af:showDetailItem text="First" id="sdi1" persist="disclosed" disclosed="true"/>
    <af:showDetailItem text="Second" id="sdi2" persist="disclosed" disclosed="false"/>
    <af:showDetailItem text="Third" id="sdi3" persist="disclosed" disclosed="false"/>
  </af:panelTabbed>
</af:panelGroupLayout>  


 Check ADF Tag Library

Big thanks to my co worker María for finding the solution :-)

Download sample project