How to highlight a selected tab(link) implemented by <h:commandLink> inside <rich:toolBar>?
Joined: Nov 10, 2010
I have a xhtml page, with following code
This page defines top level navigation, the page corresponding to these links gets displayed when user clicks on the link.
My requirement is that I want to highlight the selected link (tab). This code is existing and i can not change it to use <rich:tabPanel>.
A toolbar is a variation of a menu, and what you're asking to do is (in effect) jam a menu. I'm not sure why gimmicking up a toolbar is going to be easier than converting to a tabbed panel, though.
Your best bet might be to see if you can embed a set SelectOneRadio controls in the toolbar.
Customer surveys are for companies who didn't pay proper attention to begin with.
Joined: Nov 10, 2010
I couldn't exactly get as how can I embed SelectOneRadio to the toolbar. sorry about that, I am new to JSF.
I tried to set the CSS class for the commandLink, programmatically.
I have now given IDs to my form and commandLink. So my xhtml page which contains this top level bar looks like:
On click of the commandLink on this top level navigation bar, the control goes to a results page that appears up under the bar. This results page is a different xhtml page that contains a rich:dataTable. This dataTable appears under this page. So what I want is that when this dataTable appears, the commandLink that opened this page should get highlighted so that user can clearly see on which page he is.
In the getter of this dataTable I have written following code:
And in the rich:dataTable tag, I have given reRender="navigation:user". In my css I have written:
When the toolBar appears, i can see the "userOld" class applied to the commandLink, the after clicking on it when the new page opens, the font remains the same i.e. the css doesnt seem to be getting applied.
One more thing I wanted to mention is that on the console i can see:
Earlier Style class:userOld
New Style class:userNew
If I click the button again, the same messages gets displayed on the console. shouldn't it display only "userNew" in both the lines, the second time I click the commandLink, because it should have been set to "userNew" on the first click?