• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

rich:tab

 
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

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.
 
Ranch Hand
Posts: 139
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Kranthi Kondapaka
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Venkat Sadasivam
Ranch Hand
Posts: 139
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Kranthi, sorry to say still it is not clear.

Please provide some examples.
 
Kranthi Kondapaka
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Venkat,
this is the home page which constist of four tab and the code is like this

<body>
<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>
<rich:tab styleClass="category" label="Category" labelWidth="100px"
action="#{CategoryData.listOfCategories}" id="Category">
<%@ include file="/WEB-INF/jsp/category.jsp"%>
</rich:tab>
<rich:tab styleClass="community" label="Community"
labelWidth="100px" id="Community" action="#{CommunityData.communitiesGroup}">
<%@ include file="/WEB-INF/jsp/community.jsp"%>
</rich:tab>
<rich:tab styleClass="studio" label="Studio" labelWidth="100px"
action="" id="Studio">
<%@ include file="/WEB-INF/jsp/studio.jsp"%>
</rich:tab>
<rich:tab styleClass="favorities" label="Favorities" labelWidth="100px"
id="favorities" reRender="videomessage" action="#{FavoriteVideos.favoritevideos}">
<%@ include file="/WEB-INF/jsp/favoriteVideosimage.jsp"%>
</rich:tab>
</rich:tabPanel>
<%@ include file="/WEB-INF/jsp/player.jsp"%>
<%@ include file="/searchContent.jsp"%>
</h:form>
</body>


Now in this page i want to always keep the home tab enabled.
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.

 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic