By default, content of first tab of the accordian is always displayed. Is it possible to show only tabs of the accordian and show content of any tab of the accordian only when a user clicks on it?


Accordion is basically a TabSheet with different client side implementation. In TabSheet you can set the selected tab using the setSelectedTab method. Unfortunately you cannot call that method with null parameter, that could be thought as not showing any tab, and in Accordion’s case to close all the sheets.

So to answer to your question: No, you cannot close all the sheets from the Accordion.

Have you tried using the Melodion component in the Directory? I’m not sure but it could be what you’re looking for:

Another option is to implement your own accordion component that is basically made of Layouts inside VerticalLayout. Each inner layout would have a Button as the accordion caption and the contents of the layout would be hidden or shown when the button is clicked. That way in the ‘all closed state’ you could set all the layouts hidden and then by clicking the button open the wanted items again. There it would be easy to implement functionality if you want to allow only one sheet to be visible at a time.