Forums Register Login

i just want to know how to keep enable a tab for all the time(whether it is clicked or not).

Anyone please provide me a solution.
By default <rich:tab> tag persist the tab selection at session scope.

"I don't understand what you mean enable a tab all the time".

If you have 2 tabs in a TabbedPanel, only one can be enabled at a time.
Hi venkat,
actually i have four tabs and the first tab is home tab.
when the application is loaded the home tab will be enabled by default.
Under the home tab(which includes many pages) i have many links which will navigate me to other pages.
Once i navigate to other page(by clicking on one of the link) and want to come back to home page,it should be done by clicking on home tab which I am not able to achieve.

It means i should be able to keep alive the home tab all the time.
i think this information is some what clear than the previous one.
so please help me in achieving the solution.
Kranthi, sorry to say still it is not clear.

Please provide some examples.
Hi Venkat,
this is the home page which constist of four tab and the code is like this

<h:form id="formMain">
<%@ include file="header.jspf"%>
<rich:spacer height="1" />
<rich:tabPanel headerAlignment="center" switchType="ajax">
<rich:tab styleClass="home" label="Home" labelWidth="100px"
action="" id="Home" >
<%@ include file="/WEB-INF/jsp/home.jsp"%>
<%@ include file="/WEB-INF/jsp/seemorevideos.jsp"%>
<rich:tab styleClass="category" label="Category" labelWidth="100px"
action="#{CategoryData.listOfCategories}" id="Category">
<%@ include file="/WEB-INF/jsp/category.jsp"%>
<rich:tab styleClass="community" label="Community"
labelWidth="100px" id="Community" action="#{CommunityData.communitiesGroup}">
<%@ include file="/WEB-INF/jsp/community.jsp"%>
<rich:tab styleClass="studio" label="Studio" labelWidth="100px"
action="" id="Studio">
<%@ include file="/WEB-INF/jsp/studio.jsp"%>
<rich:tab styleClass="favorities" label="Favorities" labelWidth="100px"
id="favorities" reRender="videomessage" action="#{FavoriteVideos.favoritevideos}">
<%@ include file="/WEB-INF/jsp/favoriteVideosimage.jsp"%>
<%@ include file="/WEB-INF/jsp/player.jsp"%>
<%@ include file="/searchContent.jsp"%>

Now in this page i want to always keep the home tab enabled.
Dear Kranthi,
We can permanently select our selected tab by giving
<rich:tabPanel selectedTab="#{nameofmanagedbean.selectedTab}" whereas selectedTab is the property of managed bean. In managed bean we can permanently select our selected tab by hardcoding it to

selectedTab = "name of tab you want to select";

Hope this might help you.

This thread has been viewed 7915 times.

All times above are in ranch (not your local) time.
The current ranch time is
Oct 18, 2018 14:08:52.