jsf - Update a bar chart with a select one menu -


i want display bar chart according item have selectionned.

<h:outputtext value="document: " /> <h:selectonemenu value="#{chartbean.document}" converter="#{documentconverter}" required="true">      <f:selectitems value="#{chartbean.listselectitemdocument}"/>      <p:ajax event="change" update="barchart" immediate="true"/> </h:selectonemenu>    <p:barchart id="barchart" value="#{chartbean.categorymodel}"       title="interactive bar chart" style="height:300px" min="0" >    <p:ajax event="itemselect" listener="#{chartbean.itemselectbar}" update="growl" />   </p:barchart> 

i work primeface library.

public cartesianchartmodel getcategorymodel() {     createcategorymodel();     return categorymodel;   }   private void createcategorymodel() {       categorymodel = new cartesianchartmodel();     chartseries dled = new chartseries();     if(mdocument!=null)     {         dled.setlabel("dled");         list<date> listdate = muserdocumentmanger.listdate(mdocument);         calendar calendar = new gregoriancalendar();         for(date ldate : listdate)         {             calendar.settime(ldate);             dled.set(date,number);         }            categorymodel.addseries(dled);       }     } 

when choose item of list, nothing happened ... helping me.

thanks helps

the solution create equal method in class document


Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -