P:AccordionPanel ExpandAll

UI Components for JSF
Post Reply
captainmorgan
Posts: 20
Joined: 17 Sep 2010, 16:44

17 Sep 2010, 16:47

I was wondering if it is possible to have an accordion panel expand all tabs so they are all visible when you open the page? If so, how is this done?

venkideshmukh
Posts: 10
Joined: 27 Apr 2011, 11:19

13 Jul 2011, 08:42

I am also looking for similar kind of functionality. showing all tabs expanded when page loads for the first time.
is it possible ?

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

13 Jul 2011, 08:44

No.

jwtillmanjx
Posts: 22
Joined: 18 Jul 2012, 00:01
Location: Jacksonville, FL

03 Aug 2012, 22:00

It is possible now using activeIndex. Start with zero and add all indexes for the # of panels that you need opened, separated by commas. You can hard code reference it from a bean.

Example:

Code: Select all

<p:accordionPanel
	value="#{bean.listOfRecords}"
	var="record"
	activeIndex="0,1,2,3,4,5,6,7,8,9,10">
	<p:tab>
		content here
	<p:tab>
</p:accordionPanel>
<p:accordionPanel
	value="#{bean.listOfRecords}"
	var="record"
	activeIndex="#{bean.activeIndexes}">
	<p:tab>
		content here
	<p:tab>
</p:accordionPanel>

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 23 guests