eyalc

refresh chart using a4j

Recommended Posts

Hi

I have a JSP that consists of JSF components. In addition, I have a refresh mechanism that uses a4j inorder to rerender some of the components and not the whole page:

<a4j:region>
<h:form style=[i]"display:none;"[/i]>
<a4j:poll id=[i]"poll"[/i] interval=[i]"5000"[/i] enabled=[i]"true"[/i]
reRender=[i]"pieCharts"[/i] action="#{HomePageBean.doRefreshCurrentChunk}"/>
</h:form>
</a4j:region>

<table id=[i]"pieChartsTable"[/i] border=[i]"0"[/i] cellspacing=[i]"0"[/i] cellpadding=[i]"0"[/i] width=[i]"100%"[/i]>
<tr>
<td class=[i]"bgWhite"[/i]>
<jsp:include page=[i]"charts/FusionChartsHTMLRenderer.jsp"[/i] flush=[i]"true"[/i]>
<jsp:param name=[i]"chartSWF"[/i] value=[i]"charts/Pie2D.swf?registerWithJS=1&ChartNoDataText= "[/i] />
<jsp:param name=[i]"strURL"[/i] value=[i]"charts/Data.xml"[/i] />
<jsp:param name=[i]"strXML"[/i] value="#{HomePageBean.chartData}" />
<jsp:param name=[i]"chartId"[/i] value=[i]"myFirst"[/i] />
<jsp:param name=[i]"chartWidth"[/i] value=[i]"800"[/i] />
<jsp:param name=[i]"chartHeight"[/i] value=[i]"400"[/i] />
<jsp:param name=[i]"showBorder"[/i] value=[i]"false"[/i] />
<jsp:param name=[i]"debugMode"[/i] value=[i]"false"[/i] />
<jsp:param name=[i]"registerWithJS"[/i] value=[i]"true"[/i] />
</jsp:include>
</td>
</tr>
</table>
 

However the above code doesn't seem to work. What am I doing wrong? how can I refresh only the pie chart?

 

Edited by Guest

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now