Created
May 23, 2013 11:24
-
-
Save testforti/5635393 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<p:tabView> | |
<p:ajax event="tabChange" listener="#{bean.onTabChange}" /> | |
<p:tab title="Tab 1" id="tab1"> | |
//chart1 | |
</p:tab> | |
<p:tab title="Tab 2" id="tab2"> | |
//chart2 | |
</p:tab> | |
<p:tab title="Tab 3" id="tab3"> | |
//chart3 | |
</p:tab> | |
</p:tabView> | |
function renderTheChart(tabIndex) { | |
var categories= []; | |
var categories= []; | |
<ui:repeat var="data" value="#{bean.dataList}"> | |
categories[categories.length] = "#{data.id}"; | |
values[values.length] = #{data.value}; | |
</ui:repeat> | |
renderChart(values, categories, tabIndex); | |
} | |
PP | |
Hacking | |
PSOE | |
BBVA | |
Santader | |
<p:tabView onTabChange="handleTabChange(event, index)"> | |
function handleTabChange(event, index) { | |
renderTheChart(index); | |
} | |
RequestContext context = RequestContext.getCurrentInstance(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment