I want to make dynamic charts with google API, populated with JSON data from servlet.
On a page I have selectManyCheckbox:
<h:selectManyCheckbox id="xxx" value="#{panelB.foo}">
<f:selectItems value="#{panelB.fooList}" var="s"
itemLabel="#{s}"
itemValue="#{s}"/>
<f:ajax event="click" execute="@this" render="@this :graphs"/>
</h:selectManyCheckbox>
And below I have a div for script,and script itself:
<h:form id="graphs">
<div id="graph">
</div>
</h:form>
and script part, responsible for getting JSON data from servlet:
$.ajax({
dataType: "json",
url: 'http://localhost:8080/graph/get/#{panelB.makeQuery()}/'
};
this method : panelB.makeQuery()
just takes the fooList and makes a string for servlet.
When I enter the page, this method is called, and it's working correctly, but when I click on any checkbox, the graphs disapear, and method makeQuery()
is never invoked.
I tried: -changing render on selectMany -adding onevent="drawCahrt()"
nothing works. Please help. Thank you