I have a problem and i need some ideas to solve it:
I have a JSF wep page. The index have only ui:decorate and display some pages.
Each link in the webpage call the index.xhtml and all parts reload.
One of these parts is a menu and it can be displayed or hidden thanks a JQuery code with the SlideToggle function (Thanks to BalusC for help).
I have in the menu 4 sections with slidetoggle(). All of them starts closed (display: none).
The problem is when i click in some link in one of these sections (now displayed) the web refresh and now …. they are hidden again….
i think you know what i want. How can i solve that problem?
Thanks for all our help 🙂
Use ajax links instead of regular links and re-render only the portions which do not contain those panels
E.g. replace
by
By the way, instead of hassling with raw jQuery, you can also use just a JSF component which uses jQuery under the covers. For example, PrimeFaces
<p:panel>:That’s all.