我在primefaces5和水平条形图中有滑块的数据表。通过移动滑块,图表中的条形将移动。这是正常的。现在的问题是数据表是否有多个页面。如何根据当前页面获取图表。
<h:panelGrid columns="2" columnClasses="label, value" style="width:100%">
<h:panelGrid columns="1" columnClasses="label, value" style="width:40%">
<p:dataTable value="#{improvementManageBean.lazyModel}" var="entryList" varStatus="status" rows="10" paginator="true" paginatorTemplate="{RowsPerPageDropdown} {CurrentPageReport} {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} "
rowsPerPageTemplate="5,10,15" style="margin-bottom:20px" id="SCS2_tbl" widgetVar="pan2Tbl" lazy="true">
<p:column style="width:200px">
<h:outputText value="#{entryList.sourceName}: #{entryList.sourceType}"/>
</p:column>
<p:column style="width:200px">
<p:slider for="input2" style="width:200px" id="srd2" minValue="" maxValue="454544">
<p:ajax event="slideEnd" listener="#{improvementManageBean.onSlideEnd2}" update=":form:scope2Chrt,:form:panDtl"/>
</p:slider>
</p:column>
<p:column style="width:80px">
<p:inputText id="input2" value="#{entryList.co2Emission}" style="width:40px"/>
</p:column>
<p:ajax event="page" listener="#{improvementManageBean.update}" />
</p:dataTable>
</h:panelGrid>
<h:panelGrid columns="1" style="width:60%; height:100%;" >
<div>
<p:barChart id="scope2Chrt" value="#{improvementManageBean.horizontalBarChartScope2}" orientation="horizontal"
style="width:700px;height:900px;" animate="false" xaxisAngle="-30"
widgetVar="chartScp2" />
</div>
</h:panelGrid>
</h:panelGrid>