0 Replies Latest reply on Dec 5, 2010 8:45 PM by bhanu sistla

    Chart is not getting refresh while clicking on the left side data

    bhanu sistla Newbie

      I am currently facing a critical issue, currently i have a requirement to display the charts and needs to be refresh when user click on the left side data. Here are the more details, curretly i am using jenia4faces to display the charts (This has tag libraries to display the chart and internally uses JFreechart). So i am able to display the data using datatable at left panel, so my requirement is to display the chart based on the data clicked on the left side panel. I am able to display the chart for one time, but when i click on the next data the chart is not getting refresh. Here is the code snipped

       

      To display the data at left panel.

       

      <h:panelGroup id="__recordMenu">
          <rich:dataTable id="__recordDataTableId"
              cellpadding="0" cellspacing="0" width="100%"
              var="type" value="#{patientRecTypeList.data}"
              binding="#{patientRecTypeList.dataTable}">

              <rich:column>
                 <a4j:commandLink value="#{type.name}"
                      action="#{patientRecTypeList.selectedRow}"
                      reRender="__chartId,__recordMenu,__rec_series_display"
                      limitToList="true">
                  </a4j:commandLink>
              </rich:column>

              <!--<a4j:support
                  event="onRowClick"
                  actionListener="#{patientRecTypeList.selectRow}"
                  reRender="__recordMenu,__rec_series_display,__id_chart_id_id"
                  limitToList="true"/> -->

       

          </rich:dataTable>


      </h:panelGroup>

       

      So this displays the data and when i click on the line the chart has to be refresh code to display refresh the chart is

       

                      <h:panelGroup>
                          <h:panelGroup id="__id_chart_id">
                              <h:outputText value="#{patientRecordList.currentDate}" />
                              <jd:barChart3d dataset="#{patientRecordList.chartDataSet}" width="450"
                                  height="300" fileExt="#{patientRecordList.fileType}"
                                  chartTitle="Line Chart" includeLegend="true"
                                  axisXLabel="x axis desc" axisYLabel="y axis desc"
                                  type="Line"/>
                          </h:panelGroup>
                          <h:panelGroup id="__rec_series_display">
                              <ui:include src="/record/grid.xhtml"/>
                          </h:panelGroup>
                      </h:panelGroup>

       

       

      The thing is currently i am trying to display graph at top and data related to it at bottom and chart is not getting refresh but the data at bottom is getting refresh.

       

      Any help will be helpfull

       

      Thanks

      Bhanu S