0

I would like to a progress meter in jsf to show the current state of how many rows have been processed as more rows as being processed, I want it to update dynamically. I have tried the following so far: Frontend:

<h:panelGroup id="progress" rendered="#{extractDataController.showProgress}">
                          <h:outputText value="Rows Extracted:"/>
                          <h:outputText value="#{extractDataController.rowsProcessed}"/>
                          <h:outputText value=" / "/>
                          <h:outputText value="#{extractDataController.totalRows}"/>

                             </h:panelGroup>

and in the bean I incerement the rowsProcessed variable after the processing of row is complete. But it doesnt update on the frontend. How do i do that?

BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555
Arnold
  • 181
  • 3
  • 12
  • Where are you updating the `panelGroup`? – Andrei Olar Mar 23 '17 at 11:57
  • from the extractDataController managed bean, the incrementing of the rowsprocessed variable is going fine in the bean, but it is not showing the updated values with each increment in the frontend, even though its binded – Arnold Mar 23 '17 at 12:01
  • It is not showing the updated value because you are not updating the UI. – Andrei Olar Mar 23 '17 at 12:05
  • how do i do that? such that efficiently such that with every update of the rowcounter, the ui also updates efficiently – Arnold Mar 23 '17 at 12:17
  • I think you want to call the update from a backing bean, so take a look at this: http://stackoverflow.com/questions/11365094/can-i-update-a-jsf-component-from-a-jsf-backing-bean-method – Andrei Olar Mar 23 '17 at 12:19
  • it doesnt work for me, even though i added the id of the element on the frontend – Arnold Mar 23 '17 at 13:12

0 Answers0