jsf - JSF2.2 Templating site menu with <ul> -


using jsf2.2 have list menu in maintemplate this:

 <ul>     <li class="selected">home</li>     <a jsf:outcome="new"><li>new</li></a> </ul> 

i want put class="selected" according jsf current page, otherwise puts link.

what best practise?

thanks attention. have nice day.

this way worked:

<h:panelgroup rendered="#{view.viewid == '/new.xhtml'}">     <li class="menuselected">new</li> </h:panelgroup> <h:panelgroup rendered="#{view.viewid != '/new.xhtml'}">     <a jsf:outcome="new"><li>new</li></a> </h:panelgroup> 

is practise? don't work using bean. (sorry english)


Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

Python ctypes access violation with const pointer arguments -