Search code examples
javatabsliferayportletjsr286

How in liferay's tabs element control which tab to open


In liferay's tabs, liferays version is 6, element, how to control which tab to open, for example, if I go from one tab to another .jsp page, and return back, I need to be opened, the tab, from which I leave page? In tabs element I use sections.


Solution

  • Which version of Liferay? If 6 than you use param and value of tabs taglib

    So

    <liferay-ui:tabs names="Tab 1,Tab 2" tabsValues="tab1,tab2" param="tab" value="tab2" url0="<%= tab1URL %>" url1="<%= tab2URL %>" />
    

    would set second tab active