+ Start a Discussion
NisseKnudsenNisseKnudsen 

Rerender GoogleViz Component on Dashboard VF-Page

Hello Community!

 

I got a problem that I can't solve! I created a VisualForce-Page that shall be used as a Dashboard element. I integrated a selectList including a controller and a google viz piechart.

The idea was, when the user clicks an item in the list, that the piechart is being rerendere and therefore up-to-date. But it does NOT work. I don't know why, no errors, Firebug says I get a response which is actually exactly that what I wanted. ONLY the piechart doesnot rerender, at least not properly. This means after selecting an random item the outputpanel with the piechart disappears and never returns.

 

Anybody knows where my problem could be?

 

Thanks a lot, here's my code:

 

 

<apex:page controller="S2X_vfDashboard" >
	<apex:pageBlock id="projectprogress">
		<apex:form >
			<apex:selectList value="{!ProjectId}" multiselect="false" size="2">
			<apex:actionSupport event="onclick" action="{!getProjectProgress}" rerender="piechart" />
				<apex:selectOptions value="{!ProjectOptions}" />
			</apex:selectList>
		
		</apex:form>
		<apex:outputPanel id="piechart">
			<c:PieChart jsondata="{!ProjectProgressJson}" title="Project Progress"/>
	    </apex:outputPanel>
    </apex:pageBlock>

</apex:page>

 

 

paul-lmipaul-lmi

try changing your actionsupport to onchange instead of onclick.  onclick will fire it as soo as your mouse clicks the item, not when you select the new item.