p:accordionPanel onClik to show modal

UI Components for JSF
Post Reply
danielortegaalves
Posts: 1
Joined: 27 Apr 2011, 16:24

27 Apr 2011, 16:32

Hello.

I am trying to catch tab's onclick event to show a 'p:dialog modal'.
I have accordionpanel container for my tabs.

Code: Select all

<p:accordionPanel disabled="true" collapsible="true" activeIndex="10" tabChangeListener="insert.show();" >
	<p:tab title="Insert">
	</p:tab>
</p:accordionPanel>

<p:dialog header="Modal Dialog" widgetVar="insert" modal="true"
	height="325" width="630" resizable="false" draggable="false"	position="center">
</p:dialog>

Have you any ideas how can i do it? Or have you got more correct ways ?

aliirawan
Posts: 26
Joined: 15 Nov 2010, 20:09
Location: Jakarta, Indonesia
Contact:

27 Apr 2011, 17:25

tabChangeListener is used for listener in the backing bean. not for client side. for client side try use onTabChange

Code: Select all

<p:accordionPanel collapsible="true" activeIndex="0" onTabChange="insert.show()">
			<p:tab title="Insert 1">
			    CONTENT 1
			</p:tab>
			<p:tab title="Insert 2">
			    CONTENT 2
			</p:tab>
		</p:accordionPanel>

		<p:dialog header="Modal Dialog" widgetVar="insert" modal="true"
			height="325" width="630" resizable="false" draggable="false"
			position="center">
		</p:dialog>
Hope it helps
I like to explore new things. There's a way for everything. I believe.

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 22 guests