Reputation: 10598
Below is the snapshot of the layout I'm trying to achieve.
I have two questions/problems here:
Right now,the page loads with all the accordian panels open. I want it initially to be in the closed state (like in option 1).
On click of the Radio button near the tab, the tab should expand. If I click on another radio button, the new tab associated with the radio button should expand, and the other one should close.
How do we accomplish this ?
I don't see any toggle function or anything associated with PrimeFaces accordian. There is only widgetVar.show() function, but it's not helping me.
Upvotes: 0
Views: 4485
Reputation: 33
To begin with your accordion panel tabs closed try setting activeIndex to -1 (or any value that does not correspond to an existing panel). I have not tested this with multiple tabs in an accordion panel, but it should work:
<p:accordionPanel activeIndex="-1">
Upvotes: 1