there is a problem using p:tabView and p:chart together

UI Components for JSF
Post Reply
vistek
Posts: 19
Joined: 21 Jul 2011, 15:57

22 Sep 2011, 10:13

Hi Guys,

I am in trouble with charts on a p:dialog with p:tabView. When i use a chart in p:tabView on a p:dialog, First tab chart is rendered but others are not rendered.

When i look the html code with firebug. I can see all html code for rendered chart on the first tab, however i only see below simple div for others

Code: Select all

<div style="height: 150px; width: 500px; position: relative;" id="j_idt212:j_idt216" class="jqplot-target"></div>

My facelet code is here:

Code: Select all

 <p:dialog id="odGroupPanel" header="dialog header"
	widgetVar="odGroupDialog" modal="true" width="600" minWidth="600">
	<p:tabView>
		<p:tab title="tab 1">
				<p:lineChart rendered="#{revenueSettingBean.panelData.tabDataList[0].chart ne null}"
					value="#{revenueSettingBean.panelData.tabDataList[0].chart}" 
					legendPosition="e"  minY="0" style="height:150px; width:500px"/>
		</p:tab>
		<p:tab title="tab 2">
				<p:lineChart rendered="#{revenueSettingBean.panelData.tabDataList[1].chart ne null}"
					value="#{revenueSettingBean.panelData.tabDataList[1].chart}" 
					legendPosition="e"  minY="0" style="height:150px; width:500px"/>
		</p:tab>
	</p:tabView>
</p:dialog>
Volkan.
Mojarra 2.0.3.FCS
Glassfish v.3.1.2 / JBoss 7.1.0
Primeface 3.4

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

22 Sep 2011, 13:34

You need to use a lazy chart and initialize on tab show. Similar to editor.

vistek
Posts: 19
Joined: 21 Jul 2011, 15:57

22 Sep 2011, 16:33

First of all thanks for your reply. I did not find layz propoerty for charts in 3.0.RC1-SNAPSHOT. I have tried to use remoteCommand according to following yigit.darcin post. However it is not work.

viewtopic.php?f=3&t=6949

Please add a simple lazy chart example.

Volkan
Mojarra 2.0.3.FCS
Glassfish v.3.1.2 / JBoss 7.1.0
Primeface 3.4

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 33 guests